GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
GOAT::raytracing::pulseCalculation< T > Class Template Reference

This class provides functionality to calculate field distributions for short pulses. More...

#include <pulsecalculation.h>

Public Member Functions

void calcTrafoParms ()
void field (double t)
 This function calculates the fields at time. Keep in mind, that it works only if the class has the list with the refractive index functions.
double field (double t, int settings=PULSECALCULATION_CLEAR_SA)
 This function calculates the fields at time. Keep in mind, that it works only if the class has the list with the refractive index functions.
void fieldCalculation ()
 This function makes the raytracing (normally only used internally)
void fieldCalculation ()
 This function makes the raytracing (normally only used internally)
void fieldCalculation (double omega)
 This function makes one raytracing step at frequency omega.
void fieldCalculation (double omega)
 This function makes one raytracing step at frequency omega.
double findHitTime (int ObjNo)
 Make an estimation, when the pulse hits the object the first time Often it is a problem, to find the pulse in the time domain, especially for very short pulses. This function gives an estimation, by searchíng the first element of the array around the chosen object which was hit by a ray. Then, the time the light needs to travel from the light source until this point will be calculated.
double findHitTime (int ObjNo)
 Make an estimation, when the pulse hits the object the first time Often it is a problem, to find the pulse in the time domain, especially for very short pulses. This function gives an estimation, by searching the first element of the array around the chosen object which was hit by a ray. Then, the time the light needs to travel from the light source until this point will be calculated.
int getNumberOfThreads ()
 get the number of threads used for the calculation
INDEX_TYPE getNumCellsPerDirection ()
double getReferenceTime ()
TrafoParms getTrafoParms ()
 pulseCalculation ()
 pulseCalculation (Scene S)
 pulseCalculation (Scene S)
void reset ()
 Clears all arrays.
void reset ()
 Clears all arrays.
void setBandwidth (double dWvl)
 Set Bandwith of the light source(s) Approximately,.
void setBandwidth (double dWvl)
 Set Bandwith of the light source(s) Approximately,.
void setCenterWavelength (double wvl)
 Set center wavelength of the pulse.
void setCenterWavelength (double wvl)
 Set center wavelength of the pulse.
void setDefaults ()
void setNumberOfThreads (int n)
 set the number of threads used for the calculation
void setNumReflex (int numReflex)
void setNumReflex (int numReflex)
 set the number of internal reflections to be considered
void setNumWavelengthsPerRange (int nS)
 Set number of wavelengths per range. For the calculation, the spectral range is subdivided into a number of wavelength ranges. This method set the number of wavelength steps per spectral range.
void setNumWavelengthsPerRange (int nS)
 Set number of wavelengths per range. For the calculation, the spectral range is subdivided into a number of wavelength ranges. This method set the number of wavelength steps per spectral range.
void setPulseWidth (double dt)
 Sets the spectral width according to the pulse width and adjusts the widht of the subdivisions.
void setPulseWidth (double dt)
 Sets the spectral width according to the pulse width and adjusts the widht of the subdivisions.
void setReferenceTime (double tref)
void setReferenceTime (double tref)
void setRefractiveIndexFunctions (std::vector< std::function< std::complex< double >(double) > > nList)
 sets the list of functions, which describe the wavelength dependend refractive index (length must be number of objects + 1)
void setRefractiveIndexFunctions (std::vector< std::function< std::complex< double >(double) > > nList)
 sets the list of functions, which describe the wavelength dependend refractive index (length must be number of objects + 1)
void setRepetitionRate (double rep)
 Set the repetition rate (in fs) The repetition rate is the frequency resolution within the calculation. This function sets trafoparms::nS to the next integer value. The used repetition rate used in the calculation is then given by bandwith df/(nI*nS)
void setRepetitionRate (double rep)
 Set the repetition rate (in fs) The repetition rate is the frequency resolution within the calculation. This function sets trafoparms::nS to the next integer value. The used repetition rate used in the calculation is then given by bandwith df/(nI*nS)
void setSpatialResolution (double dx)
 sets the spatial resolution to a value near to dx
void setSpatialResolution (double dx)
 sets the spatial resolution to a value near to dx
void setSpectralRanges (int n)
 Number of spectral ranges in which one raytracing calculation is made.
void setSpectralRanges (int n)
 set the number of spectral ranges in which one raytracing calculation is made

Public Attributes

double domega
 spectral resolution
double dRWvl
 spectral width of one subdivision
double dWvl =0.02
 spectral width of the light (default 20nm)
INDEX_TYPE nn
 number of cells over the whole width of the calculation space (i.e. 2*r0).
int numReflex = INEL_MAX_NREFLEX
bool raytracingDone = false
 If true, the raytracing part was done and the field calculation starts directly.
rt
Raytrace_usp rt
Scene S
std::vector< SuperArray< std::vector< gridEntry > > > SA
 Here, all infos are stored to calculate the pulse (step lengths, index of the medium etc.)
SuperArray< GOAT::maths::Vector< std::complex< double > > > SAres
Trafo trafo
TrafoParms trafoparms
double tref = 0.0

Private Member Functions

void calcTrafoParms ()
void setDefaults ()

Private Attributes

int fieldCalls = 0
 how many times was field called (after last reset)
int number_of_threads =5
 number of threads used for calculation
int settings =0

Detailed Description

template<class T>
class GOAT::raytracing::pulseCalculation< T >

This class provides functionality to calculate field distributions for short pulses.

The class calculates the field distribution for a short pulsed light source. Also dispersion is considered, therefore a list of functionsis required, which describe the wavelength dependence of all objects and the surrounding medium. Since short pulses are considered, the light has a spectral width, which depends on the pulse width (Fourier transform). For the pulse a gaussian shape is assumed. All lengths and the wavelength is given in micro meters. The default wavelength is set to 1.0µm and the pulse width 10fs. As spectral width, the full width at half maximum (FWHM) is used. The result is stored in a SuperArray SAres, which holds the electric field at a certain time t which was given to the class by calling the function field

This class calculates the field distribution for a short pulsed light source. Also dispersion is considered, therefore a list of functions is required, which describe the wavelength dependence of all objects and the surrounding medium. Since short pulses are considered, the light has a spectral width, which depends on the pulse width (Fourier transform). For the pulse a gaussian shape is assumed. All lengths and the wavelength is given in micro meters. The default wavelength is set to 1.0μm and the default pulse width 100fs. As spectral width, the full width at half maximum (FWHM) is used. The result is stored in a SuperArray trafo.SAres, which holds the electric field at a certain time t which was given to the class by calling the function field. For the calculation, the spectral range is divided into divisions. For each division, one raytracing is done with the central wavelength. Here, for all steps (one step is the path between the light source and the next surface or the distance between subsequent surfaces) the step length and an information about the material will be stored. With this informations, the electric field at each point of interest within this wavelength range is calculated. Within this calculation step, the wavelength range can be subdivided in a number of wavelength steps. Here it is considered, that even though the wavelength is changed from step to step, we consider that the path of the ray is not changing. At the end, all contributions for all wavelength divisions are summed up to get the overall electric field. Comment: The number of divisions and subdivision changes the repetition rate.

Definition at line 26 of file pulsecalculation.h.

Constructor & Destructor Documentation

◆ pulseCalculation() [1/3]

template<class T>
GOAT::raytracing::pulseCalculation< T >::pulseCalculation ( )

◆ pulseCalculation() [2/3]

template<class T>
GOAT::raytracing::pulseCalculation< T >::pulseCalculation ( Scene S)

◆ pulseCalculation() [3/3]

template<class T>
GOAT::raytracing::pulseCalculation< T >::pulseCalculation ( Scene S)

Member Function Documentation

◆ calcTrafoParms() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::calcTrafoParms ( )

◆ calcTrafoParms() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::calcTrafoParms ( )
private

◆ field() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::field ( double t)

This function calculates the fields at time. Keep in mind, that it works only if the class has the list with the refractive index functions.

◆ field() [2/2]

template<class T>
double GOAT::raytracing::pulseCalculation< T >::field ( double t,
int settings = PULSECALCULATION_CLEAR_SA )

This function calculates the fields at time. Keep in mind, that it works only if the class has the list with the refractive index functions.

◆ fieldCalculation() [1/4]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::fieldCalculation ( )

This function makes the raytracing (normally only used internally)

◆ fieldCalculation() [2/4]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::fieldCalculation ( )

This function makes the raytracing (normally only used internally)

◆ fieldCalculation() [3/4]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::fieldCalculation ( double omega)

This function makes one raytracing step at frequency omega.

◆ fieldCalculation() [4/4]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::fieldCalculation ( double omega)

This function makes one raytracing step at frequency omega.

◆ findHitTime() [1/2]

template<class T>
double GOAT::raytracing::pulseCalculation< T >::findHitTime ( int ObjNo)

Make an estimation, when the pulse hits the object the first time Often it is a problem, to find the pulse in the time domain, especially for very short pulses. This function gives an estimation, by searchíng the first element of the array around the chosen object which was hit by a ray. Then, the time the light needs to travel from the light source until this point will be calculated.

◆ findHitTime() [2/2]

template<class T>
double GOAT::raytracing::pulseCalculation< T >::findHitTime ( int ObjNo)

Make an estimation, when the pulse hits the object the first time Often it is a problem, to find the pulse in the time domain, especially for very short pulses. This function gives an estimation, by searching the first element of the array around the chosen object which was hit by a ray. Then, the time the light needs to travel from the light source until this point will be calculated.

◆ getNumberOfThreads()

template<class T>
int GOAT::raytracing::pulseCalculation< T >::getNumberOfThreads ( )

get the number of threads used for the calculation

◆ getNumCellsPerDirection()

template<class T>
INDEX_TYPE GOAT::raytracing::pulseCalculation< T >::getNumCellsPerDirection ( )
inline

Definition at line 90 of file pulsecalculation.h.

◆ getReferenceTime()

template<class T>
double GOAT::raytracing::pulseCalculation< T >::getReferenceTime ( )
inline

Definition at line 85 of file pulsecalculation.h.

◆ getTrafoParms()

template<class T>
TrafoParms GOAT::raytracing::pulseCalculation< T >::getTrafoParms ( )
inline

Definition at line 84 of file pulsecalculation.h.

◆ reset() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::reset ( )

Clears all arrays.

◆ reset() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::reset ( )

Clears all arrays.

◆ setBandwidth() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setBandwidth ( double dWvl)

Set Bandwith of the light source(s) Approximately,.

\[\frac{\Delta\lambda}{\lamda}=\frac{\Delta\omega}{\omega}\Rightarrow \Delta\omega=\Delta\lambda \cdot \frac{2\pi c}{\lambda^2}\]

Set Bandwith of the light source(s)

◆ setBandwidth() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setBandwidth ( double dWvl)

Set Bandwith of the light source(s) Approximately,.

\[\frac{\Delta\lambda}{\lamda}=\frac{\Delta\omega}{\omega}\Rightarrow \Delta\omega=\Delta\lambda \cdot \frac{2\pi c}{\lambda^2}\]

Set Bandwith of the light source(s)

◆ setCenterWavelength() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setCenterWavelength ( double wvl)

Set center wavelength of the pulse.

◆ setCenterWavelength() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setCenterWavelength ( double wvl)

Set center wavelength of the pulse.

◆ setDefaults() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setDefaults ( )

◆ setDefaults() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setDefaults ( )
private

◆ setNumberOfThreads()

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setNumberOfThreads ( int n)

set the number of threads used for the calculation

◆ setNumReflex() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setNumReflex ( int numReflex)

◆ setNumReflex() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setNumReflex ( int numReflex)

set the number of internal reflections to be considered

◆ setNumWavelengthsPerRange() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setNumWavelengthsPerRange ( int nS)

Set number of wavelengths per range. For the calculation, the spectral range is subdivided into a number of wavelength ranges. This method set the number of wavelength steps per spectral range.

◆ setNumWavelengthsPerRange() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setNumWavelengthsPerRange ( int nS)

Set number of wavelengths per range. For the calculation, the spectral range is subdivided into a number of wavelength ranges. This method set the number of wavelength steps per spectral range.

◆ setPulseWidth() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setPulseWidth ( double dt)

Sets the spectral width according to the pulse width and adjusts the widht of the subdivisions.

◆ setPulseWidth() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setPulseWidth ( double dt)

Sets the spectral width according to the pulse width and adjusts the widht of the subdivisions.

◆ setReferenceTime() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setReferenceTime ( double tref)

◆ setReferenceTime() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setReferenceTime ( double tref)

◆ setRefractiveIndexFunctions() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setRefractiveIndexFunctions ( std::vector< std::function< std::complex< double >(double) > > nList)

sets the list of functions, which describe the wavelength dependend refractive index (length must be number of objects + 1)

◆ setRefractiveIndexFunctions() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setRefractiveIndexFunctions ( std::vector< std::function< std::complex< double >(double) > > nList)

sets the list of functions, which describe the wavelength dependend refractive index (length must be number of objects + 1)

◆ setRepetitionRate() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setRepetitionRate ( double rep)

Set the repetition rate (in fs) The repetition rate is the frequency resolution within the calculation. This function sets trafoparms::nS to the next integer value. The used repetition rate used in the calculation is then given by bandwith df/(nI*nS)

◆ setRepetitionRate() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setRepetitionRate ( double rep)

Set the repetition rate (in fs) The repetition rate is the frequency resolution within the calculation. This function sets trafoparms::nS to the next integer value. The used repetition rate used in the calculation is then given by bandwith df/(nI*nS)

◆ setSpatialResolution() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setSpatialResolution ( double dx)

sets the spatial resolution to a value near to dx

◆ setSpatialResolution() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setSpatialResolution ( double dx)

sets the spatial resolution to a value near to dx

◆ setSpectralRanges() [1/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setSpectralRanges ( int n)

Number of spectral ranges in which one raytracing calculation is made.

◆ setSpectralRanges() [2/2]

template<class T>
void GOAT::raytracing::pulseCalculation< T >::setSpectralRanges ( int n)

set the number of spectral ranges in which one raytracing calculation is made

Member Data Documentation

◆ domega

template<class T>
double GOAT::raytracing::pulseCalculation< T >::domega

spectral resolution

Definition at line 85 of file pulsecalculation.h.

◆ dRWvl

template<class T>
double GOAT::raytracing::pulseCalculation< T >::dRWvl

spectral width of one subdivision

Definition at line 87 of file pulsecalculation.h.

◆ dWvl

template<class T>
double GOAT::raytracing::pulseCalculation< T >::dWvl =0.02

spectral width of the light (default 20nm)

Definition at line 86 of file pulsecalculation.h.

◆ fieldCalls

template<class T>
int GOAT::raytracing::pulseCalculation< T >::fieldCalls = 0
private

how many times was field called (after last reset)

Definition at line 113 of file pulsecalculation.h.

◆ nn

template<class T>
INDEX_TYPE GOAT::raytracing::pulseCalculation< T >::nn

number of cells over the whole width of the calculation space (i.e. 2*r0).

Definition at line 88 of file pulsecalculation.h.

◆ number_of_threads

template<class T>
int GOAT::raytracing::pulseCalculation< T >::number_of_threads =5
private

number of threads used for calculation

Definition at line 114 of file pulsecalculation.h.

◆ numReflex

template<class T>
int GOAT::raytracing::pulseCalculation< T >::numReflex = INEL_MAX_NREFLEX

Definition at line 95 of file pulsecalculation.h.

◆ raytracingDone

template<class T>
bool GOAT::raytracing::pulseCalculation< T >::raytracingDone = false

If true, the raytracing part was done and the field calculation starts directly.

Definition at line 91 of file pulsecalculation.h.

◆ rt [1/2]

template<class T>
T GOAT::raytracing::pulseCalculation< T >::rt

Definition at line 70 of file pulsecalculation.h.

◆ rt [2/2]

Definition at line 80 of file pulsecalculation.h.

◆ S

template<class T>
Scene GOAT::raytracing::pulseCalculation< T >::S

Definition at line 89 of file pulsecalculation.h.

◆ SA

template<class T>
std::vector< SuperArray< std::vector< gridEntry > > > GOAT::raytracing::pulseCalculation< T >::SA

Here, all infos are stored to calculate the pulse (step lengths, index of the medium etc.)

Definition at line 69 of file pulsecalculation.h.

◆ SAres

template<class T>
SuperArray< GOAT::maths::Vector< std::complex< double > > > GOAT::raytracing::pulseCalculation< T >::SAres

Definition at line 68 of file pulsecalculation.h.

◆ settings

template<class T>
int GOAT::raytracing::pulseCalculation< T >::settings =0
private

Definition at line 93 of file pulsecalculation.h.

◆ trafo

template<class T>
Trafo GOAT::raytracing::pulseCalculation< T >::trafo

Definition at line 67 of file pulsecalculation.h.

◆ trafoparms

template<class T>
TrafoParms GOAT::raytracing::pulseCalculation< T >::trafoparms

Definition at line 93 of file pulsecalculation.h.

◆ tref

template<class T>
double GOAT::raytracing::pulseCalculation< T >::tref = 0.0

Definition at line 94 of file pulsecalculation.h.


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