//****************************************************************************** //** SCATMECH: Polarized Light Scattering C++ Class Library //** //** File: coated.cpp //** //** Thomas A. Germer //** Optical Technology Division, National Institute of Standards and Technology //** 100 Bureau Dr. Stop 8443; Gaithersburg, MD 20899-8443 //** Phone: (301) 975-2876; FAX: (301) 975-6991 //** Email: thomas.germer@nist.gov //** //** Version: 6.00 (February 2008) //** //****************************************************************************** #include "scatmech.h" #include "coatedmie.h" #include "bobvlieg.h" #include "askuser.h" using namespace std; namespace SCATMECH { using namespace BobVlieg_Supp; // // CLASS CONSTRUCTOR...(Performs all initializations.) // CoatedMieScatterer:: CoatedMieScatterer() { NSTOP=0; NMX=0; } void CoatedMieScatterer:: setup() { SphericalScatterer::setup(); COMPLEX REFREL = m; COMPLEX Y=x*REFREL; double ymod=abs(Y); //C //C*** Series expansion terminated after NSTOP terms //C Logarithmic derivatives calculated from NMX on down double XSTOP=x+4.*pow(x,0.3333)+2.; NMX=(int)(((XSTOP>ymod)? XSTOP : ymod )+15); NSTOP=(int)(XSTOP); A.resize(NMX); B.resize(NMX); E.resize(NMX); F.resize(NMX); //int NN=NMX-1; int N; double x = k*(radius-thickness); double y = k*(radius); COMPLEX m2 = (COMPLEX)coating.index(lambda)/(COMPLEX)medium.index(lambda); COMPLEX m1 = (COMPLEX)sphere.index(lambda)/(COMPLEX)medium.index(lambda); for (N=0;N