|
@@ -37,13 +37,51 @@
|
|
|
namespace nmie {
|
|
|
int ScattCoeffs(const unsigned int L, const int pl, std::vector<double>& x, std::vector<std::complex<double> >& m, const int nmax, std::vector<std::complex<double> >& an, std::vector<std::complex<double> >& bn);
|
|
|
int ExpansionCoeffs(const unsigned int L, const int pl, std::vector<double>& x, std::vector<std::complex<double> >& m, const int nmax, std::vector<std::vector<std::complex<double> > >& an, std::vector<std::vector<std::complex<double> > >& bn, std::vector<std::vector<std::complex<double> > >& cn, std::vector<std::vector<std::complex<double> > >& dn);
|
|
|
- int nMie(const unsigned int L, const int pl, std::vector<double>& x, std::vector<std::complex<double> >& m, const unsigned int nTheta, std::vector<double>& Theta, const int nmax, double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr, double *g, double *Albedo, std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2);
|
|
|
- int nMie(const unsigned int L, std::vector<double>& x, std::vector<std::complex<double> >& m, const unsigned int nTheta, std::vector<double>& Theta, double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr, double *g, double *Albedo, std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2);
|
|
|
- int nMie(const unsigned int L, const int pl, std::vector<double>& x, std::vector<std::complex<double> >& m, const unsigned int nTheta, std::vector<double>& Theta, double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr, double *g, double *Albedo, std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2);
|
|
|
- int nMie(const unsigned int L, std::vector<double>& x, std::vector<std::complex<double> >& m, const unsigned int nTheta, std::vector<double>& Theta, const int nmax, double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr, double *g, double *Albedo, std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2);
|
|
|
+ // pl, nmax, mode_n, mode_type
|
|
|
+ int nMie(const unsigned int L,
|
|
|
+ const int pl,
|
|
|
+ std::vector<double>& x, std::vector<std::complex<double> >& m,
|
|
|
+ const unsigned int nTheta, std::vector<double>& Theta,
|
|
|
+ const int nmax,
|
|
|
+ double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr,
|
|
|
+ double *g, double *Albedo,
|
|
|
+ std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2,
|
|
|
+ int mode_n, int mode_type);
|
|
|
+ // pl and nmax
|
|
|
+ int nMie(const unsigned int L,
|
|
|
+ const int pl,
|
|
|
+ std::vector<double>& x, std::vector<std::complex<double> >& m,
|
|
|
+ const unsigned int nTheta, std::vector<double>& Theta,
|
|
|
+ const int nmax,
|
|
|
+ double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr,
|
|
|
+ double *g, double *Albedo,
|
|
|
+ std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2);
|
|
|
+ // no pl and nmax
|
|
|
+ int nMie(const unsigned int L,
|
|
|
+ std::vector<double>& x, std::vector<std::complex<double> >& m,
|
|
|
+ const unsigned int nTheta, std::vector<double>& Theta,
|
|
|
+ double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr,
|
|
|
+ double *g, double *Albedo,
|
|
|
+ std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2);
|
|
|
+ // pl
|
|
|
+ int nMie(const unsigned int L,
|
|
|
+ const int pl,
|
|
|
+ std::vector<double>& x, std::vector<std::complex<double> >& m,
|
|
|
+ const unsigned int nTheta, std::vector<double>& Theta,
|
|
|
+ double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr,
|
|
|
+ double *g, double *Albedo,
|
|
|
+ std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2);
|
|
|
+ // nmax
|
|
|
+ int nMie(const unsigned int L,
|
|
|
+ std::vector<double>& x, std::vector<std::complex<double> >& m,
|
|
|
+ const unsigned int nTheta, std::vector<double>& Theta,
|
|
|
+ const int nmax,
|
|
|
+ double *Qext, double *Qsca, double *Qabs, double *Qbk, double *Qpr,
|
|
|
+ double *g, double *Albedo,
|
|
|
+ std::vector<std::complex<double> >& S1, std::vector<std::complex<double> >& S2);
|
|
|
int nField(const unsigned int L, const int pl, const std::vector<double>& x, const std::vector<std::complex<double> >& m, const int nmax, const int mode_n, const int mode_type, const unsigned int ncoord, const std::vector<double>& Xp, const std::vector<double>& Yp, const std::vector<double>& Zp, std::vector<std::vector<std::complex<double> > >& E, std::vector<std::vector<std::complex<double> > >& H);
|
|
|
|
|
|
- // constants for field evaluation
|
|
|
+ // constants for per mode evaluation
|
|
|
enum Modes {kAll = -1, kElectric = 0, kMagnetic = 1};
|
|
|
|
|
|
template <typename FloatType = double>
|
|
@@ -91,7 +129,9 @@ namespace nmie {
|
|
|
void SetFieldCoords(const std::vector< std::vector<FloatType> >& coords);
|
|
|
// Modify index of PEC layer
|
|
|
void SetPECLayer(int layer_position = 0);
|
|
|
-
|
|
|
+ // Modify the mode taking into account for evaluation of output variables
|
|
|
+ void SetModeNmaxAndType(int mode_n, int mode_type){mode_n_ = mode_n; mode_type_ = mode_type;};
|
|
|
+
|
|
|
// Set a fixed value for the maximun number of terms
|
|
|
void SetMaxTerms(int nmax);
|
|
|
// Get maximun number of terms
|
|
@@ -173,6 +213,9 @@ namespace nmie {
|
|
|
std::vector<FloatType> theta_;
|
|
|
// Should be -1 if there is no PEC.
|
|
|
int PEC_layer_position_ = -1;
|
|
|
+
|
|
|
+ int mode_n_ = Modes::kAll;
|
|
|
+ int mode_type_ = Modes::kAll;
|
|
|
|
|
|
// with calcNmax(int first_layer);
|
|
|
int nmax_ = -1;
|