28#define KEIN_SCHNITTPUNKT -1
46 std::complex<double>
n;
51 std::vector<ObjectShape*>
Obj;
99 maths::Vector<std::complex<double> >& Pol, std::complex<double>
n0,
double r0,
double
100 k0,
const int Anzein = 0, std::vector<ObjectShape*>
Einschluss = std::vector<ObjectShape*>(),
bool logRay =
false);
101 tubedRay(
const maths::Vector<double>& p,
double dy,
double dz,
const maths::Vector<std::complex<double> >& Pol,
const maths::Vector<double>& K, std::complex<double>
n0,
double r0,
double k0,
const int Anzein = 0, std::vector<ObjectShape*>
Einschluss = std::vector<ObjectShape*>(),
bool logRay =
false);
110 void tunnel(
maths::Vector<std::complex<double> > Pol, std::complex<double> na, std::complex<double> np,
int l);
115 void setphi(
int i,
const std::complex<double>& p) {
phi[i] = p; }
218 std::complex<double>
phi[5];
This class represents a threedimensional (numeric) Matrix as a template.
Template class for threedimensional vectors.
Abstract base class for all volume objects This abstract class provides a template for all volume obj...
Abstract base class for all rays used for the raytracing process. This abstract base class for all ra...
int objIndex
index of the current object
std::complex< double > n0
current refractive index and refractive index of the host material
bool inObject
is in an object
std::vector< ObjectShape * > Obj
list of all objects
RayBase * tray
transmitted ray (used by the raytracer, for internal use only)
maths::Vector< double > k[5]
void setAmp(int i, const maths::Vector< std::complex< double > > &A)
sets the value of the electric field of the i-th sub-ray
void setphi(int i, const std::complex< double > &p)
maths::Vector< std::complex< double > > E[5]
void setP(int i, const maths::Vector< double > &p)
tubedRay reflect(maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
bool Einschluss()
like isInObject (for compatibilty reasons, will be removed in future)
void refract(maths::Vector< double > *n, std::complex< double > n1, std::complex< double > n2)
This method refracts the beam.
tubedRay & operator=(const tubedRay &S)
double pjump(void)
for internal use only
void tunnel(maths::Vector< std::complex< double > > Pol, std::complex< double > n1, std::complex< double > n2)
Strahl wird gebrochen.
double Intensity(int i)
returns the squared magnitude of the electric field
std::complex< double > getphi(int i)
tubedRay(Plane E, const maths::Vector< double > &p, double dy, double dz, const maths::Vector< std::complex< double > > &Pol, std::complex< double > n0, double r0, double k0, const int Anzein=0, std::vector< ObjectShape * > Einschluss=std::vector< ObjectShape * >(), bool logRay=false)
maths::Vector< double > ka
tubedRay(const maths::Vector< double > &p, double dy, double dz, const maths::Vector< std::complex< double > > &Pol, const maths::Vector< double > &K, std::complex< double > n0, double r0, double k0, const int Anzein=0, std::vector< ObjectShape * > Einschluss=std::vector< ObjectShape * >(), bool logRay=false)
maths::Vector< std::complex< double > > getAmp(int i)
returns the value of the electric field of the i-th sub-ray
void initElectricField(const maths::Vector< std::complex< double > > &Pol, int AnzRays=1)
void refract(maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
Strahl wird reflektiert.
tubedRay(tubedRayBuffer &B)
maths::Vector< double > nextCaustic(double &l)
int schneidePlane(const Plane &E, double d, maths::Vector< double > &S1, maths::Vector< double > &S2)
void getP(maths::Vector< double > p[5])
returns an array whichs holds the current positions of the sub-rays
double crossXAxis(const maths::Vector< double > &P1, const maths::Vector< double > &P2, const maths::Vector< double > &k)
maths::Vector< double > getk(int i)
returns the directional vector of the i-th sub-ray
double normVol(maths::Vector< double > P[5], maths::Vector< double > k, maths::Vector< double > n)
void initElectricFieldGauss(int i, const Plane &Eb, const maths::Vector< std::complex< double > > &Pol)
ObjectShape * Einschluss(int i)
maths::Vector< double > getP()
returns the position of the central sub-ray (same as getP(4) )
int objectIndex()
index of the current object or -1
maths::Vector< double > getP(int i)
returns the position of the i-th sub-ray
double pjump(maths::Vector< double > P1[5], maths::Vector< double > P2[5], const double epsilon=1E-10)
This method checks if there is a phase jump due to self focusing The method checks if neighboring edg...
int currentObjectIndex()
returns index of the currently hitted object
std::complex< double > phi[5]
void setRefract(std::complex< double > n)
set current refractive index
maths::Vector< double > crossPlane(const maths::Vector< double > Pe, const maths::Vector< double > n)
maths::Vector< double > P[5]
void setk(int i, const maths::Vector< double > &K)
bool schneidePlane(maths::Vector< double > *Erg, const Plane &E)
tubedRay reflect(maths::Vector< double > *n, std::complex< double > n1, std::complex< double > n2)
This method reflects the beam.
maths::Vector< double > getk()
return the directional vector of the central sub-ray (same as getk(4) )
std::complex< double > getRefract()
returns the current refractive index
double pjump(maths::Vector< double > P1[5], maths::Vector< double > P2[5], maths::Vector< double > *S)
This method checks if there is a phase jump due to self focusing The method checks if neighboring edg...
bool next()
do the next step
double cross(const maths::Vector< double > P10, const maths::Vector< double > P11, const maths::Vector< double > P20, const maths::Vector< double > P21)
void reflectRay(RayBase *&tray, maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
reflects ray
void setN0(std::complex< double > n)
bool isInObject()
Is the ray currently inside an object?
maths::Matrix< std::complex< double > > Fresnel_reflect(double alpha, std::complex< double > n1, std::complex< double > n2)
calculates the Fresnel matrix for the reflected beam (used in method reflect)
void checkObjectIntersection(int Index[5], maths::Vector< double > *Pmin)
void setGetunnelt(bool v)
void tunnel(maths::Vector< std::complex< double > > Pol, std::complex< double > na, std::complex< double > np, int l)
maths::Vector< double > OK
tubedRay(const tubedRay &ray)
maths::Vector< double > schneidePlane(const Plane &E, bool &found)
maths::Matrix< std::complex< double > > Fresnel_trans(double alpha, std::complex< double > beta, std::complex< double > n1, std::complex< double > n2)
calculates the Fresnel matrix for the refracted beam (used in method reflect)
void initElectricField(const maths::Vector< std::complex< double > > &Pol, const int numRays, double dx, Plane Eb)
friend std::ostream & operator<<(std::ostream &os, tubedRay S)
maths::Vector< std::complex< double > > getE()
gives back electric field strength
This file contains the definition of a template for 3x3 matrices, which can be used together with the...
Raytracer used for ultrashort pulse calculation with raytracing only.
double abs2(double x)
returns the squared absolute value of x
void binRead(lensSide ls, std::ifstream &is)
read a lensSide structure from a binary file
void binWrite(lensSide ls, std::ofstream &os)
write a lensSide structure in a binary file
std::ostream & operator<<(std::ostream &os, Box B)
output operator for the Box class
This class is used for the iray class. This class is intended for internal use only....
maths::Vector< double > F
(virtual) beam waist
maths::Vector< double > k
position of the beam
bool isGauss
direction of the beam
double r0
list of objects in the scene
maths::Vector< double > P[5]
current refractive index
maths::Vector< std::complex< double > > *** Gitter
radius of the calculation space
int numObj
current electric field of the edge ray (index 0-3) and of the center ray (index 4)
std::vector< ObjectShape * > Obj
number of objects within the scene
maths::Vector< double > k[5]
current position of the edge ray (index 0-3) and of the center ray (index 4)
maths::Vector< std::complex< double > > E[5]
current direction of the edge ray (index 0-3) and of the center ray (index 4)
This file contains the Vector template class and some useful functions around this class.