GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
GOAT::raytracing::Trafo Class Reference

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

Detailed Description

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

Definition at line 49 of file fft.h.

Constructor & Destructor Documentation

◆ Trafo() [1/2]

GOAT::raytracing::Trafo::Trafo ( )

◆ Trafo() [2/2]

GOAT::raytracing::Trafo::Trafo ( TrafoParms )

Constructor for initialization Perform a calculation at the time t.

Parameters
SAArray of SuperArray elements. Contains the fields for the different wavelengths defined by the parameters in the corresponding TrafoParms structure, given in the constructor

Member Function Documentation

◆ calc() [1/2]

void GOAT::raytracing::Trafo::calc ( std::vector< std::vector< SuperArray< std::vector< gridEntry > > > > & SA,
double t )

◆ calc() [2/2]

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

Parameters
SAthis SuperArray structure contains the information gathered in the raytracing part.
omegaStartStart frequency (in \(s^{-1}\) ) of the frequency intervall
omegaStopEnd frequency (in \(s^{-1}\)) of the frequency intervall

◆ calcOne()

GOAT::maths::Vector< std::complex< double > > GOAT::raytracing::Trafo::calcOne ( std::vector< stepEntry > steps,
double t )
private

◆ calcPhase()

std::complex< double > GOAT::raytracing::Trafo::calcPhase ( std::vector< stepEntry > steps,
double k0 )
private

◆ clear()

void GOAT::raytracing::Trafo::clear ( )

Deletes all arrays (frees the memory)

◆ empty()

void GOAT::raytracing::Trafo::empty ( )

fills the entire result array with zero vectors

◆ getD()

double GOAT::raytracing::Trafo::getD ( )
inline

relative change

Definition at line 103 of file fft.h.

◆ getNumberOfThreads()

int GOAT::raytracing::Trafo::getNumberOfThreads ( )
inline

get number of threads which can be used by the program

Definition at line 105 of file fft.h.

◆ initResult() [1/2]

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.

Parameters
r0Radius of the calculation space
nxNumber of grid elements in x-direction
nyNumber of grid elements in y-direction
nzNumber of grid elements in z-direction
ObjList of all objects in the scene
numObjsNumnber of objects in List

◆ initResult() [2/2]

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.

◆ integrate()

GOAT::maths::Vector< std::complex< double > > GOAT::raytracing::Trafo::integrate ( double t,
std::vector< gridEntry > ge,
double omegastart,
double omegastop )
private

◆ pulseWeight()

double GOAT::raytracing::Trafo::pulseWeight ( double omega)
private

◆ setCurrNList()

void GOAT::raytracing::Trafo::setCurrNList ( double wvl)
inlineprivate

sets current values for the refractive indices This method calculates the refractive indices of the different objects for a given wavelength.

Parameters
wvlcurrent wavelength

Definition at line 115 of file fft.h.

◆ setNumberOfThreads()

void GOAT::raytracing::Trafo::setNumberOfThreads ( int n)
inline

set number of threads which can be used by the program

Definition at line 104 of file fft.h.

◆ setReferenceTime()

void GOAT::raytracing::Trafo::setReferenceTime ( double tref)

Sets the reference time (in fs).

◆ setRefractiveIndexFunctions()

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.

◆ setTrafoParms()

void GOAT::raytracing::Trafo::setTrafoParms ( TrafoParms trafoparms)

Sets the parameters used in the calculation.

set the current transformation parameters (for details see: TrafoParms)

Member Data Documentation

◆ currNList

std::vector<std::complex<double > > GOAT::raytracing::Trafo::currNList
private

here, the refractive indices for the current wavelength are stored (for faster calculation)

Definition at line 130 of file fft.h.

◆ D

double GOAT::raytracing::Trafo::D = 0
private

Definition at line 131 of file fft.h.

◆ freq

std::vector<double> GOAT::raytracing::Trafo::freq
private

Definition at line 127 of file fft.h.

◆ nList

std::vector<std::function<std::complex<double>(double) > > GOAT::raytracing::Trafo::nList

List of the refractive index functions.

Definition at line 102 of file fft.h.

◆ number_of_threads

int GOAT::raytracing::Trafo::number_of_threads
private

Definition at line 132 of file fft.h.

◆ prefactor

double GOAT::raytracing::Trafo::prefactor
private

Definition at line 126 of file fft.h.

◆ SAres

SuperArray<maths::Vector<std::complex<double> > > GOAT::raytracing::Trafo::SAres

Container for the last result.

Definition at line 69 of file fft.h.

◆ sigma2

double GOAT::raytracing::Trafo::sigma2
private

for a gaussian pulse, the electric field, the temporal behavior is: \(E(t)=E0 \cdot e^{-t^2/(2*\sigma^2)}\)

Definition at line 125 of file fft.h.

◆ tp

TrafoParms GOAT::raytracing::Trafo::tp
private

Definition at line 129 of file fft.h.

◆ tref

double GOAT::raytracing::Trafo::tref = 0.0
private

Definition at line 128 of file fft.h.

◆ twoSigma2

double GOAT::raytracing::Trafo::twoSigma2
private

Definition at line 124 of file fft.h.


The documentation for this class was generated from the following file: