Grating1D: obtain and change parameters


Get and set parameters

void Grating1D::setTheta (double)
 set angle of incidence
double Grating1D::getTheta ()
 get angle of incidence
void Grating1D::setLambda (double)
 set incident wavelength in vacuum
double Grating1D::getLambda ()
 get the incident wavelength in vacuum
void Grating1D::setPeriod (double)
 size of the grating including padding
double Grating1D::getPeriod (void)
 get the size of the grating including padding
double Grating1D::getGratingSize (void)
 get the size of the grating excluding padding
void Grating1D::setnPermSegs (int)
 set the number of pixels per layer
int Grating1D::getnPermSegs (void)
 get the number of pixels per layer
void Grating1D::setPolMode (string)
 set polarization mode of the incident field (TE or TM)
string Grating1D::getPolMode ()
 get the polarization mode
void Grating1D::setN0 (complex< double >)
 set the refractive index of region one (halfspace of incident field)
complex< double > Grating1D::getN0 ()
 get the refractive index of region one (halfspace of incident field)
void Grating1D::setN3 (complex< double >)
 set the refractive index of region 3 (halfspace of transmitted field)
complex< double > Grating1D::getN3 ()
 get the refractive index of region 3 (halfspace of transmitted field)
void Grating1D::setNPad (complex< double >)
 set refractive index of the material in which the element is embedded
complex< double > Grating1D::getNPad ()
 get refractive index of the material in which the element is embedded
void Grating1D::setIncid (Vector< complex< double > >)
 set fourier orders of the incident field
complex< double > Grating1D::getIncid (int)
 get fourier order (nOrds-1)/2+n
void Grating1D::setMatPad (int)
 set material of the padding
void Grating1D::setPadding (double)
 set the size of the padding
double Grating1D::getPadding (void)
 get the size of the padding
int Grating1D::getnOrds ()
 number of Fourier orders used for the calculations
int Grating1D::getnLayers (void)
 number of layers
double Grating1D::getEmbSize ()
 size of the embedding
complex< double > Grating1D::getLhsMat (int, int)
 get one element of the lhsMatBand
complex< double > Grating1D::getRhsVec (int)
 get element of the rhsVec
complex< double > Grating1D::getA (int, int)
 Matrix to calculate the transmitted modes (S-Matrix algorithm).
complex< double > Grating1D::getAdash (int, int)
 Matrix to calculate the reflected modes (S-Matrix algorithm).
complex< double > Grating1D::getGamma (int)
 n_th order of gamma

usually not used externally

void Grating1D::setEquations (void)
 set equations to calculate boundary equations
void Grating1D::setLhsMatTE (void)
 set the equations for the boundary equations if polarisation is TE
void Grating1D::setLhsMatTM (void)
 set the equations for the boundary equations if polarisation is TM
void Grating1D::solveEquations (void)
 only T-Matrix: solve the equation system obtained by setEquations();
void Grating1D::setSMatrix (void)
 calculate the S-Matrix (only S-Matrix approach)
void Grating1D::findEfficiency (string)
 calculate the efficiencies from the transmission orders
void Grating1D::findEfficiencyT (void)
void Grating1D::findEfficiencyS (void)
void Grating1D::calcSTR (void)
 calculate the reflection and transmission orders and efficiencies with the S-Matrix approach
void Grating1D::importMaterials (string)
 import Neumann coeffeicients to calculate the reefractive index of a material
void Grating1D::calcGamma (void)
 calculate the gamma values gamma[n] = n0*k*sin(theta)+2*Pi*n/d (Ben Layet, eq 2.18)
void Grating1D::setLhsMatBand (int, int, complex< double >)
 set the value of one element of the T-Matrix in a banded storage system
int Grating1D::nLines (string)
double Grating1D::delta (int, int)
F_Matrix< complex< double > > Grating1D::unit (int i)

Function Documentation

void Grating1D::calcGamma ( void   )  [inherited]

calculate the gamma values gamma[n] = n0*k*sin(theta)+2*Pi*n/d (Ben Layet, eq 2.18)

Definition at line 189 of file Grating1D.cpp.

References Grating1D::gamma, Grating1D::lambda, Grating1D::n0, Grating1D::period, and Grating1D::theta.

Referenced by Grating1D::calcIntField(), Grating1D::setLambda(), Grating1D::setParameters(), and Grating1D::setPeriod().

void Grating1D::calcSTR ( void   )  [inherited]

calculate the reflection and transmission orders and efficiencies with the S-Matrix approach

double Grating1D::delta ( int  i,
int  j 
) [inherited]

Definition at line 1314 of file Grating1D.cpp.

void Grating1D::findEfficiency ( string  method  )  [inherited]

calculate the efficiencies from the transmission orders

Redirects to the correct function to calculate the transmission efficients dependent on the solving method used.

Definition at line 874 of file Grating1D.cpp.

References Grating1D::findEfficiencyS(), and Grating1D::findEfficiencyT().

void Grating1D::findEfficiencyS ( void   )  [inherited]

void Grating1D::findEfficiencyT ( void   )  [inherited]

complex< double > Grating1D::getA ( int  layer,
int  comp 
) [inherited]

Matrix to calculate the transmitted modes (S-Matrix algorithm).

Definition at line 180 of file Grating1D.cpp.

References Grating1D::maxOrd, and Grating1D::solVec.

Referenced by Grating1D::getIntField().

complex< double > Grating1D::getAdash ( int  layer,
int  comp 
) [inherited]

Matrix to calculate the reflected modes (S-Matrix algorithm).

Definition at line 181 of file Grating1D.cpp.

References Grating1D::maxOrd, and Grating1D::solVec.

Referenced by Grating1D::getIntField().

double Grating1D::getEmbSize (  )  [inherited]

size of the embedding

Definition at line 187 of file Grating1D.cpp.

References Grating1D::embPeriod.

complex< double > Grating1D::getGamma ( int  n  )  [inherited]

n_th order of gamma

Definition at line 188 of file Grating1D.cpp.

References Grating1D::gamma.

Referenced by Grating1D::findEfficiencyS(), Grating1D::getIntField(), Grating1D::setLhsMatTE(), and Grating1D::setLhsMatTM().

double Grating1D::getGratingSize ( void   )  [inherited]

get the size of the grating excluding padding

Returns:
the size of the grating (excludes padding)

Definition at line 106 of file Grating1D.cpp.

References Grating1D::gratingSize.

Referenced by Grating1D::writeParameters().

complex< double > Grating1D::getIncid ( int  i  )  [inherited]

get fourier order (nOrds-1)/2+n

Parameters:
i the number of the Fourier coefficient
Returns:
the i_th Fourier coefficient

Definition at line 174 of file Grating1D.cpp.

References Grating1D::incid.

double Grating1D::getLambda (  )  [inherited]

get the incident wavelength in vacuum

Returns:
the wavelength of the incident field

Definition at line 92 of file Grating1D.cpp.

References Grating1D::lambda.

complex< double > Grating1D::getLhsMat ( int  i,
int  j 
) [inherited]

get one element of the lhsMatBand

Returns:
the element (i,j) of the boundary condition equations

Definition at line 203 of file Grating1D.cpp.

References Grating1D::lhsMatBand.

complex< double > Grating1D::getN0 (  )  [inherited]

get the refractive index of region one (halfspace of incident field)

Returns:
the refractive index of region 1

Definition at line 155 of file Grating1D.cpp.

References Grating1D::n0.

complex< double > Grating1D::getN3 (  )  [inherited]

get the refractive index of region 3 (halfspace of transmitted field)

Returns:
the refractive index of region 3

Definition at line 159 of file Grating1D.cpp.

References Grating1D::n3.

int Grating1D::getnLayers ( void   )  [inherited]

number of layers

Definition at line 186 of file Grating1D.cpp.

References Grating1D::nLayers.

Referenced by Grating1D::writeParameters().

int Grating1D::getnOrds (  )  [inherited]

number of Fourier orders used for the calculations

Returns:
the number of Fourier orders used for the calculations

Definition at line 167 of file Grating1D.cpp.

complex< double > Grating1D::getNPad (  )  [inherited]

get refractive index of the material in which the element is embedded

Returns:
the refractive index of the padding

Definition at line 163 of file Grating1D.cpp.

References Grating1D::nPad.

int Grating1D::getnPermSegs ( void   )  [inherited]

get the number of pixels per layer

Returns:
the number of pixels per layer

Definition at line 136 of file Grating1D.cpp.

References Grating1D::nPermSegs.

double Grating1D::getPadding ( void   )  [inherited]

get the size of the padding

Returns:
the size of the padding

Definition at line 124 of file Grating1D.cpp.

References Grating1D::padding.

Referenced by Grating1D::writeParameters().

double Grating1D::getPeriod ( void   )  [inherited]

get the size of the grating including padding

Returns:
the computational period of the system (includes padding)

Definition at line 104 of file Grating1D.cpp.

References Grating1D::period.

string Grating1D::getPolMode (  )  [inherited]

get the polarization mode

Returns:
the polarisation mode

Definition at line 147 of file Grating1D.cpp.

References Grating1D::polMode.

complex< double > Grating1D::getRhsVec ( int  i  )  [inherited]

get element of the rhsVec

Parameters:
i the component of the right hand side vector of the boundary condition equations
Returns:
the i_th component of rhsVec

Definition at line 179 of file Grating1D.cpp.

References Grating1D::rhsVec.

double Grating1D::getTheta (  )  [inherited]

get angle of incidence

Returns:
the angle of incidence in degrees

Definition at line 80 of file Grating1D.cpp.

References Grating1D::theta.

Referenced by Grating1D::setSMatrix(), and Grating1D::writeParameters().

void Grating1D::importMaterials ( string  mFile  )  [inherited]

import Neumann coeffeicients to calculate the reefractive index of a material

When using Neumann coefficients to calculate the wavelength dependent refractive index: Import the file that contains the coefficients of all used materials

Parameters:
mFile filename

Definition at line 256 of file Grating1D.cpp.

References Grating1D::lambda, Grating1D::nLines(), Grating1D::nMat, real(), and Grating1D::refIndMat.

Referenced by Grating1D::initLayers().

int Grating1D::nLines ( string  filename  )  [inherited]

Definition at line 1298 of file Grating1D.cpp.

Referenced by Grating1D::importMaterials().

void Grating1D::setEquations ( void   )  [inherited]

set equations to calculate boundary equations

set the equation system for the T-Matrix approach (redirected to TE or TM) Ben Layet eqs 2.49-2.51.
equations 2.49 and 2.51 are combined and the reflection and transmission orders are eliminated to reduce the size of the system. The reflection and transmission orders are then calculated in findEfficiency();

Definition at line 480 of file Grating1D.cpp.

References Grating1D::polMode, Grating1D::setLhsMatTE(), and Grating1D::setLhsMatTM().

Referenced by Grating1D::solve().

void Grating1D::setIncid ( Vector< complex< double > >  incident  )  [inherited]

set fourier orders of the incident field

Parameters:
incident the Fourier coefficients of the incident light

Definition at line 169 of file Grating1D.cpp.

References Grating1D::incid.

Referenced by Grating1D::setParameters().

void Grating1D::setLambda ( double  wavelength  )  [inherited]

set incident wavelength in vacuum

Changes the wavelength for the grating and for each layer. After changing the grating needs to be recalculated completely (layers+boundary conditions)

Parameters:
wavelength the wavelength in length units of the project

Definition at line 85 of file Grating1D.cpp.

References Grating1D::calcGamma(), Grating1D::lambda, Grating1D::layer, and Grating1D::nLayers.

Referenced by Grating1D::setParameters().

void Grating1D::setLhsMatBand ( int  ,
int  ,
complex< double >   
) [inherited]

set the value of one element of the T-Matrix in a banded storage system

void Grating1D::setLhsMatTE ( void   )  [inherited]

set the equations for the boundary equations if polarisation is TE

Definition at line 487 of file Grating1D.cpp.

References Grating1D::getGamma(), Grating1D::I, imag(), Grating1D::lambda, Grating1D::layer, Grating1D::lhsMatBand, Grating1D::n0, Grating1D::n3, Grating1D::nLayers, Grating1D::r, real(), Grating1D::t, Grating1D::za, and Grating1D::zb.

Referenced by Grating1D::setEquations().

void Grating1D::setLhsMatTM ( void   )  [inherited]

set the equations for the boundary equations if polarisation is TM

Definition at line 584 of file Grating1D.cpp.

References Grating1D::getGamma(), Grating1D::I, imag(), Grating1D::lambda, Grating1D::layer, Grating1D::lhsMatBand, Grating1D::n0, Grating1D::n3, Grating1D::nLayers, Grating1D::r, real(), Grating1D::t, Grating1D::za, and Grating1D::zb.

Referenced by Grating1D::setEquations().

void Grating1D::setMatPad ( int  mp  )  [inherited]

set material of the padding

Parameters:
mp the material of the padding

Definition at line 165 of file Grating1D.cpp.

References Grating1D::matPad.

void Grating1D::setN0 ( complex< double >  index  )  [inherited]

set the refractive index of region one (halfspace of incident field)

Parameters:
index the refractive index of region 1

Definition at line 149 of file Grating1D.cpp.

References Grating1D::layer, Grating1D::n0, and Grating1D::nLayers.

Referenced by Grating1D::setParameters().

void Grating1D::setN3 ( complex< double >  index  )  [inherited]

set the refractive index of region 3 (halfspace of transmitted field)

Parameters:
index the refractive index of region 3

Definition at line 157 of file Grating1D.cpp.

References Grating1D::n3.

Referenced by Grating1D::setParameters().

void Grating1D::setNPad ( complex< double >  index  )  [inherited]

set refractive index of the material in which the element is embedded

Parameters:
index the refractive index of the padding

Definition at line 161 of file Grating1D.cpp.

References Grating1D::nPad.

Referenced by Grating1D::setParameters().

void Grating1D::setnPermSegs ( int  segments  )  [inherited]

set the number of pixels per layer

Change the number of pixels per layer. ATTENTION: The old structure gets deleted so the layers need to be initialised again (index, transition points etc.)

Parameters:
segments new number of pixels per layer

Definition at line 128 of file Grating1D.cpp.

References Grating1D::indices, Grating1D::lambda, Grating1D::layer, Grating1D::n0, Grating1D::nLayers, Grating1D::nPermSegs, Grating1D::period, Grating1D::polMode, Grating1D::setParameters(), Grating1D::slabThick, Grating1D::theta, and Grating1D::transpt.

Referenced by Grating1D::addFrame().

void Grating1D::setPadding ( double  pad  )  [inherited]

set the size of the padding

change the padding that is included in the solution of the Fourier modal method to reduce periodic effects. This might introduce some reflection from the side walls as it is not a perfectly matched layer. The period and the transition points are recalculated when changing the padding size

Parameters:
pad new size of the padding

Definition at line 109 of file Grating1D.cpp.

References Grating1D::gratingSegs, Grating1D::gratingSize, Grating1D::indices, Grating1D::lambda, Grating1D::layer, Grating1D::n0, Grating1D::nLayers, Grating1D::nPermSegs, Grating1D::padding, Grating1D::period, Grating1D::polMode, Grating1D::setParameters(), Grating1D::setPeriod(), Grating1D::slabThick, Grating1D::theta, and Grating1D::transpt.

Referenced by Grating1D::setParameters().

void Grating1D::setPeriod ( double  size  )  [inherited]

size of the grating including padding

change the period of the grating and each layer

Parameters:
size new period

Definition at line 97 of file Grating1D.cpp.

References Grating1D::calcGamma(), Grating1D::layer, Grating1D::nLayers, and Grating1D::period.

Referenced by Grating1D::addFrame(), Grating1D::setPadding(), and Grating1D::setParameters().

void Grating1D::setPolMode ( string  mode  )  [inherited]

set polarization mode of the incident field (TE or TM)

Change the polarisation mode. After changing the layers and boundary conditions need to be recalculated

Parameters:
mode new polarisation mode ("TE" or "TM")

Definition at line 140 of file Grating1D.cpp.

References Grating1D::layer, Grating1D::nLayers, and Grating1D::polMode.

Referenced by Grating1D::setParameters().

void Grating1D::setSMatrix ( void   )  [inherited]

calculate the S-Matrix (only S-Matrix approach)

calculate the S-Matrix (L.Li JOSA A, Vol20, No4, 2003) only R_ud and T_dd are calculated (equations 13a/b)

Definition at line 798 of file Grating1D.cpp.

References Grating1D::expTerm, Grating1D::F, Grating1D::G, Grating1D::getTheta(), Grating1D::I, Grating1D::lambda, Grating1D::layer, Grating1D::n0, Grating1D::n3, Grating1D::nLayers, Grating1D::period, Grating1D::polMode, Grating1D::Q1, Grating1D::Q2, Grating1D::R, Grating1D::R_tilde, Grating1D::T, Grating1D::T_tilde, Grating1D::tau, and Grating1D::unit().

Referenced by Grating1D::solve().

void Grating1D::setTheta ( double  angle  )  [inherited]

set angle of incidence

Parameters:
angle the angle in degrees

Definition at line 72 of file Grating1D.cpp.

References Grating1D::layer, Grating1D::nLayers, and Grating1D::theta.

Referenced by Grating1D::setParameters().

void Grating1D::solveEquations ( void   )  [inherited]

only T-Matrix: solve the equation system obtained by setEquations();

Solve the equations set by setEquations()

Definition at line 733 of file Grating1D.cpp.

References cplx::im, imag(), Grating1D::incid, Grating1D::layer, Grating1D::lhsMatBand, Grating1D::nUnknowns, Grating1D::polMode, Grating1D::r, cplx::re, real(), Grating1D::rhsVec, Grating1D::solVec, and zgbsv_().

Referenced by Grating1D::solve().

F_Matrix< complex<double> > Grating1D::unit ( int  i  )  [inline, inherited]

Definition at line 281 of file Grating1D.h.

Referenced by Grating1D::setSMatrix().


Generated on Thu May 7 16:28:03 2009 for FMM by  doxygen 1.5.5