Commit d80df707 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Update str() function signature to directly access ScattererConfiguration::_rcf

parent a6e2d744
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -369,10 +369,10 @@ void scr2(
 * to radial coordinates, then it calls `sphar()` to calculate the vector of spherical
 * harmonics of the incident field.
 *
 * \param sconf: `ScattererConfiguration *` Pointer to scatterer configuration object.
 * \param rcf: `double **` Matrix of sphere configuration fractional radii.
 * \param c1: `ParticleDescriptor *` Pointer to a ParticleDescriptor instance.
 */
void str(ScattererConfiguration *sconf, ParticleDescriptor *c1);
void str(double **rcf, ParticleDescriptor *c1);

/*! \brief Compute radiation torques on particles on a k-vector oriented system.
 *
+2 −2
Original line number Diff line number Diff line
@@ -2442,7 +2442,7 @@ void scr2(
#endif
}

void str(ScattererConfiguration *sconf, ParticleDescriptor *c1) {
void str(double **rcf, ParticleDescriptor *c1) {
  dcomplex *ylm;
  const double pi = acos(-1.0);
  int last_configuration;
@@ -2457,7 +2457,7 @@ void str(ScattererConfiguration *sconf, ParticleDescriptor *c1) {
      c1->gcsv[i18 - 1] = gcss;
      int nsh = c1->nshl[last_configuration - 1];
      for (int j16 = 1; j16 <= nsh; j16++) {
	c1->rc[last_configuration - 1][j16 - 1] = sconf->get_rcf(last_configuration - 1, j16 - 1) * c1->ros[last_configuration - 1];
	c1->rc[last_configuration - 1][j16 - 1] = rcf[last_configuration - 1][j16 - 1] * c1->ros[last_configuration - 1];
      } // j16 loop
    }
    c1->gcs += gcss;