|
GOAT (Geometrical optics application tool) 0.1
|
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. | |
| T | 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 |
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.
| GOAT::raytracing::pulseCalculation< T >::pulseCalculation | ( | ) |
| GOAT::raytracing::pulseCalculation< T >::pulseCalculation | ( | Scene | S | ) |
| GOAT::raytracing::pulseCalculation< T >::pulseCalculation | ( | Scene | S | ) |
| void GOAT::raytracing::pulseCalculation< T >::calcTrafoParms | ( | ) |
|
private |
| 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.
| 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.
| void GOAT::raytracing::pulseCalculation< T >::fieldCalculation | ( | ) |
This function makes the raytracing (normally only used internally)
| void GOAT::raytracing::pulseCalculation< T >::fieldCalculation | ( | ) |
This function makes the raytracing (normally only used internally)
| void GOAT::raytracing::pulseCalculation< T >::fieldCalculation | ( | double | omega | ) |
This function makes one raytracing step at frequency omega.
| void GOAT::raytracing::pulseCalculation< T >::fieldCalculation | ( | double | omega | ) |
This function makes one raytracing step at frequency omega.
| 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.
| 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.
| int GOAT::raytracing::pulseCalculation< T >::getNumberOfThreads | ( | ) |
get the number of threads used for the calculation
|
inline |
Definition at line 90 of file pulsecalculation.h.
|
inline |
Definition at line 85 of file pulsecalculation.h.
|
inline |
Definition at line 84 of file pulsecalculation.h.
| void GOAT::raytracing::pulseCalculation< T >::reset | ( | ) |
Clears all arrays.
| void GOAT::raytracing::pulseCalculation< T >::reset | ( | ) |
Clears all arrays.
| 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)
| 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)
| void GOAT::raytracing::pulseCalculation< T >::setCenterWavelength | ( | double | wvl | ) |
Set center wavelength of the pulse.
| void GOAT::raytracing::pulseCalculation< T >::setCenterWavelength | ( | double | wvl | ) |
Set center wavelength of the pulse.
| void GOAT::raytracing::pulseCalculation< T >::setDefaults | ( | ) |
|
private |
| void GOAT::raytracing::pulseCalculation< T >::setNumberOfThreads | ( | int | n | ) |
set the number of threads used for the calculation
| void GOAT::raytracing::pulseCalculation< T >::setNumReflex | ( | int | numReflex | ) |
| void GOAT::raytracing::pulseCalculation< T >::setNumReflex | ( | int | numReflex | ) |
set the number of internal reflections to be considered
| 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.
| 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.
| void GOAT::raytracing::pulseCalculation< T >::setPulseWidth | ( | double | dt | ) |
Sets the spectral width according to the pulse width and adjusts the widht of the subdivisions.
| void GOAT::raytracing::pulseCalculation< T >::setPulseWidth | ( | double | dt | ) |
Sets the spectral width according to the pulse width and adjusts the widht of the subdivisions.
| void GOAT::raytracing::pulseCalculation< T >::setReferenceTime | ( | double | tref | ) |
| void GOAT::raytracing::pulseCalculation< T >::setReferenceTime | ( | double | tref | ) |
| 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)
| 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)
| 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)
| 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)
| void GOAT::raytracing::pulseCalculation< T >::setSpatialResolution | ( | double | dx | ) |
sets the spatial resolution to a value near to dx
| void GOAT::raytracing::pulseCalculation< T >::setSpatialResolution | ( | double | dx | ) |
sets the spatial resolution to a value near to dx
| void GOAT::raytracing::pulseCalculation< T >::setSpectralRanges | ( | int | n | ) |
Number of spectral ranges in which one raytracing calculation is made.
| void GOAT::raytracing::pulseCalculation< T >::setSpectralRanges | ( | int | n | ) |
set the number of spectral ranges in which one raytracing calculation is made
| double GOAT::raytracing::pulseCalculation< T >::domega |
spectral resolution
Definition at line 85 of file pulsecalculation.h.
| double GOAT::raytracing::pulseCalculation< T >::dRWvl |
spectral width of one subdivision
Definition at line 87 of file pulsecalculation.h.
| double GOAT::raytracing::pulseCalculation< T >::dWvl =0.02 |
spectral width of the light (default 20nm)
Definition at line 86 of file pulsecalculation.h.
|
private |
how many times was field called (after last reset)
Definition at line 113 of file pulsecalculation.h.
| 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.
|
private |
number of threads used for calculation
Definition at line 114 of file pulsecalculation.h.
| int GOAT::raytracing::pulseCalculation< T >::numReflex = INEL_MAX_NREFLEX |
Definition at line 95 of file pulsecalculation.h.
| 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.
| T GOAT::raytracing::pulseCalculation< T >::rt |
Definition at line 70 of file pulsecalculation.h.
| Raytrace_usp GOAT::raytracing::pulseCalculation< T >::rt |
Definition at line 80 of file pulsecalculation.h.
| Scene GOAT::raytracing::pulseCalculation< T >::S |
Definition at line 89 of file pulsecalculation.h.
| 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.
| SuperArray< GOAT::maths::Vector< std::complex< double > > > GOAT::raytracing::pulseCalculation< T >::SAres |
Definition at line 68 of file pulsecalculation.h.
|
private |
Definition at line 93 of file pulsecalculation.h.
| Trafo GOAT::raytracing::pulseCalculation< T >::trafo |
Definition at line 67 of file pulsecalculation.h.
| TrafoParms GOAT::raytracing::pulseCalculation< T >::trafoparms |
Definition at line 93 of file pulsecalculation.h.
| double GOAT::raytracing::pulseCalculation< T >::tref = 0.0 |
Definition at line 94 of file pulsecalculation.h.