GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
sphericLens.h
Go to the documentation of this file.
1#include "lens.h"
2#include "objectshape.h"
3#pragma once
4namespace GOAT
5{
6 namespace raytracing
7 {
28 public ObjectShape
29 {
30 public:
32 std::complex<double> n,
34 GOAT::maths::Matrix<std::complex<double> > alpha=maths::CUNITY,
35 const maths::Vector<double>& Ex = maths::ex,
36 const maths::Vector<double>& Ey = maths::ey,
37 const maths::Vector<double>& Ez = maths::ez,
39 );
40
41 void binWrite(std::ofstream& os);
42 void binRead(std::ifstream& is);
43 void scale(double sf);
44 void initQuad();
45 void setr0(double r0);
62 bool isInside(const maths::Vector<double>& p) { return false; }
63 double volume();
64
65 // ------- Set methods -----------
67 void setPos(double x, double y, double z);
68 void setParms(lensParms& lp) { this->lp = lp; init(); lp = this->lp; }
69
70 maths::Vector<double> calcCoM() { return maths::dzero; };
71 lensParms getParms() { return lp; }
72
73
74 private:
This class represents a threedimensional (numeric) Matrix as a template.
Definition matrix.h:23
Template class for threedimensional vectors.
Definition vector.h:57
double sf
scaling factor, it is used to scale the shape of the object
int type
type of the object
maths::Matrix< std::complex< double > > alpha
polarisability matrix
maths::Vector< double > P
position of the object
double r0
radius of the calculation sphere
std::complex< double > n
refractive index of the object
void setPos(maths::Vector< double > r)
set the position of the lens
void binWrite(std::ofstream &os)
binary writing to file
void setParms(lensParms &lp)
set the lens parameter
Definition sphericLens.h:68
bool next(const maths::Vector< double > &p, const maths::Vector< double > &k, maths::Vector< double > &pout)
returns the next intersection point of a ray with this object The ray is desribed by the starting poi...
void initQuad()
calculates the circumferent cuboid (needed e.g. for the inelastic scattering calculations)
sphericLens(const maths::Vector< double > &P, std::complex< double > n, lensParms lp, GOAT::maths::Matrix< std::complex< double > > alpha=maths::CUNITY, const maths::Vector< double > &Ex=maths::ex, const maths::Vector< double > &Ey=maths::ey, const maths::Vector< double > &Ez=maths::ez, const int type=OBJECTSHAPE_SPHERIC_LENS)
maths::Vector< double > currentnorm
Definition sphericLens.h:77
bool isInside(const maths::Vector< double > &p)
not yet implemented
Definition sphericLens.h:62
maths::Vector< double > norm(const maths::Vector< double > &P)
returns surface normal at P The arbitrary calculation of the normal at P is complex and time consumin...
Definition sphericLens.h:52
void setr0(double r0)
defines the radius of the calculation sphere
double volume()
calculates the volume of the lens
void setPos(double x, double y, double z)
set the position of the lens
lensParms getParms()
not yet implemented
Definition sphericLens.h:71
void binRead(std::ifstream &is)
binary reading from file
maths::Vector< double > calcCoM()
calculates center of mass (needed by setCenter2CoM () )
Definition sphericLens.h:70
const Matrix< std::complex< double > > CUNITY
Unity matrix (complex-valued)
Definition matrix.h:475
Raytracer used for ultrashort pulse calculation with raytracing only.
Definition asphericLens.h:6
This class is used for the iray class. This class is intended for internal use only....
Definition fresnel.h:7
#define OBJECTSHAPE_SPHERIC_LENS
Shape is a spheric lens.
Definition objectshape.h:30
Structure, which holds the full information about the spheric lens The side surfaces of the lens are ...
Definition lens.h:35