|
GOAT (Geometrical optics application tool) 0.1
|
This class calculates the time dependence of a field which calculated before. More...
#include <fft.h>
Public Member Functions | |
| void | calc (std::vector< std::vector< SuperArray< std::vector< gridEntry > > > > &SA, double t) |
| void | calc (std::vector< SuperArray< std::vector< gridEntry > > > &SA, double omegaStart, double omegaEnd, double t, bool do_clear=true) |
| calculation of the Fourier transformation. The calculation of the Fourier transformation is made in a certain frequency intervall at the time t | |
| void | clear () |
| Deletes all arrays (frees the memory) | |
| void | empty () |
| fills the entire result array with zero vectors | |
| double | getD () |
| relative change | |
| int | getNumberOfThreads () |
| get number of threads which can be used by the program | |
| void | initResult (double r0, INDEX_TYPE nx, INDEX_TYPE ny, INDEX_TYPE nz, std::vector< ObjectShape * > Obj, int numObjs) |
| Resets and initialize the result array. The result array will be cleared and renewed according to the parameters. | |
| void | initResult (SuperArray< maths::Vector< std::complex< double > > > &SA) |
| Resets and initialize the result array. The result array will be cleared and renewed according to the settings of the SuperArray SA. | |
| void | setNumberOfThreads (int n) |
| set number of threads which can be used by the program | |
| void | setReferenceTime (double tref) |
| Sets the reference time (in fs). | |
| void | setRefractiveIndexFunctions (std::vector< std::function< std::complex< double >(double) > > nList) |
| Set the refractive index functions. Here, the refractive index functions were given with help of a std::vector. Each function must return a complex number (the refractive index) and has a double value (the wavelength) as argument. | |
| void | setTrafoParms (TrafoParms trafoparms) |
| Sets the parameters used in the calculation. | |
| Trafo () | |
| Trafo (TrafoParms) | |
| Constructor for initialization Perform a calculation at the time t. | |
Public Attributes | |
| std::vector< std::function< std::complex< double >(double) > > | nList |
| List of the refractive index functions. | |
| SuperArray< maths::Vector< std::complex< double > > > | SAres |
| Container for the last result. | |
Private Member Functions | |
| GOAT::maths::Vector< std::complex< double > > | calcOne (std::vector< stepEntry > steps, double t) |
| std::complex< double > | calcPhase (std::vector< stepEntry > steps, double k0) |
| GOAT::maths::Vector< std::complex< double > > | integrate (double t, std::vector< gridEntry > ge, double omegastart, double omegastop) |
| double | pulseWeight (double omega) |
| void | setCurrNList (double wvl) |
| sets current values for the refractive indices This method calculates the refractive indices of the different objects for a given wavelength. | |
Private Attributes | |
| std::vector< std::complex< double > > | currNList |
| here, the refractive indices for the current wavelength are stored (for faster calculation) | |
| double | D = 0 |
| std::vector< double > | freq |
| int | number_of_threads |
| double | prefactor |
| double | sigma2 |
| for a gaussian pulse, the electric field, the temporal behavior is: \(E(t)=E0 \cdot e^{-t^2/(2*\sigma^2)}\) | |
| TrafoParms | tp |
| double | tref = 0.0 |
| double | twoSigma2 |
This class calculates the time dependence of a field which calculated before.
The calculation of the time dependence is made in two steps. In the first step, the fields are calculated with help of raytracing. This class uses the information from the raytracing (path of the rays) to make the concrete calculation of the electric field for different wavelength equivalent to a Fourier transform. The class requires an array of SuperArray elements which contain the the information over all steps for every ray (length of the step and material). The structure TrafoParms carries all information needed for the calculation. The spectral resolution, needed to prevent "ghost" peaks is a function of the time difference dt to a certain reference time tref: dt=|tref-t|. By default tref is set to 0, but if you are interested of a range around time, set tref to an approbriate time to reduce the amount of needed frequencies
| GOAT::raytracing::Trafo::Trafo | ( | ) |
| GOAT::raytracing::Trafo::Trafo | ( | TrafoParms | ) |
Constructor for initialization Perform a calculation at the time t.
| SA | Array of SuperArray elements. Contains the fields for the different wavelengths defined by the parameters in the corresponding TrafoParms structure, given in the constructor |
| void GOAT::raytracing::Trafo::calc | ( | std::vector< std::vector< SuperArray< std::vector< gridEntry > > > > & | SA, |
| double | t ) |
| void GOAT::raytracing::Trafo::calc | ( | std::vector< SuperArray< std::vector< gridEntry > > > & | SA, |
| double | omegaStart, | ||
| double | omegaEnd, | ||
| double | t, | ||
| bool | do_clear = true ) |
calculation of the Fourier transformation. The calculation of the Fourier transformation is made in a certain frequency intervall at the time t
| SA | this SuperArray structure contains the information gathered in the raytracing part. |
| omegaStart | Start frequency (in \(s^{-1}\) ) of the frequency intervall |
| omegaStop | End frequency (in \(s^{-1}\)) of the frequency intervall |
|
private |
|
private |
| void GOAT::raytracing::Trafo::clear | ( | ) |
Deletes all arrays (frees the memory)
| void GOAT::raytracing::Trafo::empty | ( | ) |
fills the entire result array with zero vectors
|
inline |
|
inline |
| void GOAT::raytracing::Trafo::initResult | ( | double | r0, |
| INDEX_TYPE | nx, | ||
| INDEX_TYPE | ny, | ||
| INDEX_TYPE | nz, | ||
| std::vector< ObjectShape * > | Obj, | ||
| int | numObjs ) |
Resets and initialize the result array. The result array will be cleared and renewed according to the parameters.
| r0 | Radius of the calculation space |
| nx | Number of grid elements in x-direction |
| ny | Number of grid elements in y-direction |
| nz | Number of grid elements in z-direction |
| Obj | List of all objects in the scene |
| numObjs | Numnber of objects in List |
| void GOAT::raytracing::Trafo::initResult | ( | SuperArray< maths::Vector< std::complex< double > > > & | SA | ) |
Resets and initialize the result array. The result array will be cleared and renewed according to the settings of the SuperArray SA.
|
private |
|
private |
|
inlineprivate |
|
inline |
| void GOAT::raytracing::Trafo::setReferenceTime | ( | double | tref | ) |
Sets the reference time (in fs).
| void GOAT::raytracing::Trafo::setRefractiveIndexFunctions | ( | std::vector< std::function< std::complex< double >(double) > > | nList | ) |
Set the refractive index functions. Here, the refractive index functions were given with help of a std::vector. Each function must return a complex number (the refractive index) and has a double value (the wavelength) as argument.
| void GOAT::raytracing::Trafo::setTrafoParms | ( | TrafoParms | trafoparms | ) |
Sets the parameters used in the calculation.
set the current transformation parameters (for details see: TrafoParms)
|
private |
| std::vector<std::function<std::complex<double>(double) > > GOAT::raytracing::Trafo::nList |
| SuperArray<maths::Vector<std::complex<double> > > GOAT::raytracing::Trafo::SAres |
|
private |
|
private |