GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
pulsecalculation_field.h
Go to the documentation of this file.
1#pragma once
2
3#include "superarray.h"
4#include "fft.h"
6#include <vector>
7#include "superarray.h"
8#include <sstream>
9#include <locale>
10#include <iomanip>
11
12
13namespace GOAT
14{
15 namespace raytracing
16 {
27 {
28 public:
36 double findHitTime(int ObjNo);
38 void fieldCalculation(double omega);
39 void setPulseWidth(double dt);
40 void setSpatialResolution(double dx);
41 void setRefractiveIndexFunctions(std::vector<std::function<std::complex<double>(double) > > nList);
43 void setSpectralRanges(int n);
50 void setCenterWavelength(double wvl);
55 void setBandwidth(double dWvl);
61 void setRepetitionRate(double rep);
66 void setPeriod (double time);
67
68 void field(double t);
69 void reset();
70 void setReferenceTime(double tref);
73 std::vector<SuperArray<std::vector<gridEntry> > > SA;
75 void addBoxDetector(Box* box) { BoxDetector.push_back(box); }
76 void saveIntensity(std::string FName, int i);
78 double getReferenceTime() { return tref; }
80
81
82 private:
83 /* In this function the default values (trafoparms) for the calculations are set as follows:
84 * dt : 1E-14s
85 * wvl : 1.0�m
86 * nI : 1
87 *
88 */
89 void setDefaults();
91 // std::vector< std::vector<SuperArray<std::vector<gridEntry> > > > SA;
92 double domega;
93 double dWvl=0.02;
94 double dRWvl;
95 INDEX_TYPE nn; // number of cells over the whole width of the calculation space (i.e. 2*r0)
97
98 bool raytracingDone = false;
99 std::vector<Box*> BoxDetector;
101 double tref = 0.0;
103 };
104 }
105}
class which represents a box (cuboid). It is derived by class ObjectShape This class is mainly used f...
Definition box.h:18
This class provides a raytracer to calculate the field distribution in a box detector for a ultrashor...
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
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 ...
double findHitTime(int ObjNo)
Make an estimation, when the pulse hits the object the first time Often it is a problem,...
void setPeriod(double time)
Set the period between two adjacent pulses (start->start) in fs.
double dRWvl
spectral width of one subdivision
void setSpatialResolution(double dx)
sets the spatial resolution to a value near to dx
void setRepetitionRate(double rep)
Set the repetition rate (in fs^-1) The repetition rate is the frequency resolution within the calcula...
bool raytracingDone
If true, the raytracing part was done and the field calculation starts directly.
void setNumWavelengthsPerRange(int nS)
Set number of wavelengths per range. For the calculation, the spectral range is subdivided into a num...
SuperArray< GOAT::maths::Vector< std::complex< double > > > SAres
void fieldCalculation()
This function makes the raytracing (normally only used internally)
void fieldCalculation(double omega)
This function makes one raytracing step at frequency omega.
std::vector< SuperArray< std::vector< gridEntry > > > SA
Here, all infos are stored to calculate the pulse (step lengths, index of the medium etc....
void saveIntensity(std::string FName, int i)
void setPulseWidth(double dt)
Sets the spectral width according to the pulse width and adjusts the widht of the subdivisions.
double dWvl
spectral width of the light (default 20nm)
void setSpectralRanges(int n)
Number of spectral ranges in which one raytracing calculation is made.
void setCenterWavelength(double wvl)
Set center wavelength of the pulse.
void field(double t)
This function calculates the fields at time t. Keep in mind, that it works only if the class has the ...
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 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
Structure, which acts as a container for all informations needed to process the calculation.
Definition fft.h:25