GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
pulsecalculation.h
Go to the documentation of this file.
1#pragma once
2
3#include "superarray.h"
4#include "fft.h"
5#include "raytrace_usp.h"
6#include <vector>
7
8
9
10
11namespace GOAT
12{
13 namespace raytracing
14 {
15 #define PULSECALCULATION_CLEAR_SA 0
16 #define PULSECALCULATION_NOT_CLEAR_SA 1
18
36 {
37 public:
45 double findHitTime(int ObjNo);
47 void fieldCalculation(double omega);
48 void setPulseWidth(double dt);
49 void setSpatialResolution(double dx);
50 void setRefractiveIndexFunctions(std::vector<std::function<std::complex<double>(double) > > nList);
52 void setSpectralRanges(int n);
59 void setCenterWavelength(double wvl);
64 void setBandwidth(double dWvl);
70 void setRepetitionRate(double rep);
71 void setNumberOfThreads(int n);
73
75 void reset();
76 void setReferenceTime(double tref);
79 std::vector<SuperArray<std::vector<gridEntry> > > SA;
81
82 double domega;
83 double dWvl=0.02;
85 double getReferenceTime() { return tref; }
86 /*
87 * Returns the number of cells per direction, nn along each axis of the calculation space.
88 * The spatial resolution is then 2*r0/nn. This number is changed by calling #setSpatialResolution
89 */
91
92 private:
93 int settings=0;
94 /* In this function the default values (trafoparms) for the calculations are set as follows:
95 * dt : 1E-14s
96 * wvl : 1.0&mu;m
97 * nI : 1
98 *
99 */
100 void setDefaults();
102 // std::vector< std::vector<SuperArray<std::vector<gridEntry> > > > SA;
103
104 double dRWvl;
105 INDEX_TYPE nn;
106 Scene S;
107
108 bool raytracingDone = false;
109
111 double tref = 0.0;
113 int fieldCalls = 0;
115 };
116 }
117}
This class performs ray tracing in preparation for a later calculation of short pulses This class per...
Class defining a scene with lightsources and objects. This is a container used to inform the Raytrace...
Definition raytrace.h:28
Template class to store arbitrary information in a 3D-grid This template class provides a virtual 3D-...
Definition superarray.h:26
This class calculates the time dependence of a field which calculated before.
Definition fft.h:50
This class provides functionality to calculate field distributions for short pulses.
void setCenterWavelength(double wvl)
Set center wavelength of the pulse.
int fieldCalls
how many times was field called (after last reset)
INDEX_TYPE nn
number of cells over the whole width of the calculation space (i.e. 2*r0).
void setSpatialResolution(double dx)
sets the spatial resolution to a value near to dx
double dRWvl
spectral width of one subdivision
double findHitTime(int ObjNo)
Make an estimation, when the pulse hits the object the first time Often it is a problem,...
double dWvl
spectral width of the light (default 20nm)
void setNumReflex(int numReflex)
set the number of internal reflections to be considered
void setNumberOfThreads(int n)
set the number of threads used for the calculation
void setNumWavelengthsPerRange(int nS)
Set number of wavelengths per range. For the calculation, the spectral range is subdivided into a num...
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
int number_of_threads
number of threads used for calculation
void setPulseWidth(double dt)
Sets the spectral width according to the pulse width and adjusts the widht of the subdivisions.
void setRepetitionRate(double rep)
Set the repetition rate (in fs) The repetition rate is the frequency resolution within the calculatio...
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 li...
bool raytracingDone
If true, the raytracing part was done and the field calculation starts directly.
int getNumberOfThreads()
get the number of threads used for the calculation
void setSpectralRanges(int n)
set the number of spectral ranges in which one raytracing calculation is made
void fieldCalculation(double omega)
This function makes one raytracing step at frequency omega.
void fieldCalculation()
This function makes the raytracing (normally only used internally)
void reset()
Clears all arrays.
double domega
spectral resolution
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 ...
void setBandwidth(double dWvl)
Set Bandwith of the light source(s) Approximately,.
Raytracer used for ultrashort pulse calculation with raytracing only.
Definition asphericLens.h:6
constexpr int PULSECALCULATION_NOT_CLEAR_RESULT
Flag, set when the results should not be cleared when calling field () in pulseCalculation.
constexpr int INEL_MAX_NREFLEX
long long int INDEX_TYPE
Definition superarray.h:16
This class is used for the iray class. This class is intended for internal use only....
Definition fresnel.h:7
#define PULSECALCULATION_CLEAR_SA
Structure, which acts as a container for all informations needed to process the calculation.
Definition fft.h:25