GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
GOAT::raytracing::Ray_pow Class Reference

This class provides a ray which carries a special power. More...

#include <ray_pow.h>

Inheritance diagram for GOAT::raytracing::Ray_pow:
GOAT::raytracing::IRay GOAT::raytracing::RayBase

Public Member Functions

 Ray_pow ()
 Ray_pow (const Ray_pow &r)
 Copy constructor.
 Ray_pow (double pow, const maths::Vector< double > &p, const maths::Vector< std::complex< double > > &Pol, const maths::Vector< double > &K, std::complex< double > n0, double r0, double k0, const int numObjs, std::vector< ObjectShape * > Einschluss)
Ray_pow reflect (maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
void reflectRay (RayBase *&tray, maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
void refract (maths::Matrix< std::complex< double > > FT, maths::Vector< double > N, std::complex< double > n1, std::complex< double > n2)
 ~Ray_pow (void)
Public Member Functions inherited from GOAT::raytracing::IRay
bool checkObjectIntersection (int &Index, maths::Vector< double > &Pmin)
double cross (const maths::Vector< double > P10, const maths::Vector< double > P11, const maths::Vector< double > P20, const maths::Vector< double > P21)
maths::Vector< double > crossPlane (const maths::Vector< double > Pe, const maths::Vector< double > n)
 calculates the intersection point between the ray and a plane, which is defined by the vector P and the normal n
int currentObjectIndex ()
 returns the index of the hidden object or -1
maths::Matrix< std::complex< double > > Fresnel_reflect (double alpha, std::complex< double > n1, std::complex< double > n2)
 returns Fresnel matrix for the reflection calculation (alpha: angle of incidence, n1,n2 are the refractive indices)
maths::Matrix< std::complex< double > > Fresnel_trans (double alpha, std::complex< double > beta, std::complex< double > n1, std::complex< double > n2)
 returns Fresnel matrix for the transmission calculation (alpha: angle of incidence, n1,n2 are the refractive indices)
maths::Vector< std::complex< double > > getE ()
 gives back electric field strength
maths::Vector< double > getk ()
 Returns the direction of the ray.
ObjectShapegetObject (int i)
 Returns the i-th object (for internal use only)
maths::Vector< double > getP ()
 Returns the current position of the ray.
std::complex< double > getRefract ()
 Returns the current refractive index.
void initElectricField (const maths::Vector< std::complex< double > > &PolS, const maths::Vector< std::complex< double > > &PolP, const int AnzRays)
 initialises the electric field vectors with help of polarisation vectors PolS and PolP, numOfRays can be omitted
void initElectricField (const Plane &Eb, const maths::Vector< std::complex< double > > &Pol, const int numOfRays=1)
 initialises the electric field with help of the Plane Eb and the polarisation Pol, numOfRays can be omitted. (Here, only one polarisation is given, the other is skipped)
void initElectricField (const Plane &Eb, const maths::Vector< std::complex< double > > &Pol1, const maths::Vector< std::complex< double > > &Pol2, const int AnzRays)
void initElectricFieldGauss (const Plane &Eb, const maths::Vector< std::complex< double > > &PolS, const maths::Vector< std::complex< double > > &PolP, Gauss g)
 Initialises the ray for gaussian beam with help of the plane Eb and the polarisation vectors PolS and PolP. The parameters for the gaussian beam are stored in g.
void initElectricFieldGauss (double sigma2, maths::Vector< double > focuspos, maths::Vector< std::complex< double > > Pol)
void initElectricFieldGauss (maths::Vector< std::complex< double > > &Pol, Gauss g)
 Initialises the ray for gaussian beam with help of the plane Eb and the polarisation vector Pol (second polarisation is not used, E2 is set to E1). The parameters for the gaussian beam are stored in g.
maths::Vector< double > intersectRect (const maths::Vector< double > P, const maths::Vector< double > e1, const maths::Vector< double > e2)
 IRay ()
 IRay (const IRay &r)
 IRay (const maths::Vector< double > &p, const maths::Vector< std::complex< double > > &Pol, const maths::Vector< double > &K, std::complex< double > n0, double r0, double k0, const int numObj=0, std::vector< ObjectShape * > obj=std::vector< ObjectShape * >())
 Contructor.
bool isInObject ()
 Returns true if ray is inside an object.
bool next ()
 make the next step (has to include phase progress)
int objectIndex ()
 Returns the index of the last hidden object (or -1 if no object was hidden)
maths::Vector< std::complex< double > > Pol1 ()
 direction of the first polarisation
maths::Vector< std::complex< double > > Pol2 ()
 direction of the second polarisation
IRay reflect (maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
 This function reflects ray on the surface. Here, the ray is reflected and the transmitted ray is created.
int reflections ()
 Returns the number of reflections the beam has already passed through.
void refract (maths::Vector< double > N, std::complex< double > n1, std::complex< double > n2)
 This function refracts the ray on the surface.
void setiR (int i)
 Sets the current reflexion counter (for internal use only)
void setk (const maths::Vector< double > &K)
 Sets the direction of the ray.
void setP (const maths::Vector< double > &p)
 Current position of the ray.
void setRefract (std::complex< double > n)
 Sets the current refractive index.
 ~IRay ()

Public Attributes

double Pow
 Power held by the ray in Watts.
Public Attributes inherited from GOAT::raytracing::IRay
maths::Vector< std::complex< double > > E1
maths::Vector< std::complex< double > > E2
 electric fields
maths::Vector< double > k
 current direction
maths::Vector< double > P
 current position
Public Attributes inherited from GOAT::raytracing::RayBase
bool inObject =false
 is in an object
int iR =0
 number of reflections already done
double k0 =2.0*M_PI
 wave number
std::complex< double > n
std::complex< double > n0
 current refractive index and refractive index of the host material
int numObj =0
 number of objects
std::vector< ObjectShape * > Obj
 list of all objects
int objIndex =0
 index of the current object
double r0 =1.0
double rc =1.0
 radius of the calculation sphere
int status = RAYBASE_STATUS_NONE
bool suppress_phase_progress =false
 suppress phase change in next(), needed for short pulse consideration
RayBasetray =0
 transmitted ray (used by the raytracer, for internal use only)

Friends

std::ostream & operator<< (std::ostream &os, Ray_pow S)
 output operator

Additional Inherited Members

Protected Attributes inherited from GOAT::raytracing::IRay
bool isValid
double KORR
maths::Vector< double > OK

Detailed Description

This class provides a ray which carries a special power.

Definition at line 10 of file ray_pow.h.

Constructor & Destructor Documentation

◆ Ray_pow() [1/3]

GOAT::raytracing::Ray_pow::Ray_pow ( )

◆ Ray_pow() [2/3]

GOAT::raytracing::Ray_pow::Ray_pow ( double pow,
const maths::Vector< double > & p,
const maths::Vector< std::complex< double > > & Pol,
const maths::Vector< double > & K,
std::complex< double > n0,
double r0,
double k0,
const int numObjs,
std::vector< ObjectShape * > Einschluss )

Constructor.

Parameters
powpower of the ray (in W)
pposition of the ray
PolDirection vector for the electric field
KDirection of the ray
n0refractive index of the surroundings
r0radius of the calculation sphere
k0wavenumber, i.e. \( k_0=\frac{2\pi}{\lambda_0}\) with the wavelength in the vacuum \(\lambda_0\)
numObjsnumber of objects (optional, default numObjs=0)
Objslist with objects (optional, default Objs=NULL)

◆ Ray_pow() [3/3]

GOAT::raytracing::Ray_pow::Ray_pow ( const Ray_pow & r)
inline

Copy constructor.

Definition at line 35 of file ray_pow.h.

◆ ~Ray_pow()

GOAT::raytracing::Ray_pow::~Ray_pow ( void )

Member Function Documentation

◆ reflect()

Ray_pow GOAT::raytracing::Ray_pow::reflect ( maths::Vector< double > n,
std::complex< double > n1,
std::complex< double > n2 )

reflects the ray on a surface, returns the transmitted ray

Parameters
nsurface normal
n1refractive index (incident side)
n2refractive index (side of the transmitted ray)

◆ reflectRay()

void GOAT::raytracing::Ray_pow::reflectRay ( RayBase *& tray,
maths::Vector< double > n,
std::complex< double > n1,
std::complex< double > n2 )
virtual

Reflects the ray and gives the transmitted ray back.

Parameters
[out]traytransmitted ray
[in]nsurface normal
[in]n1refractive index (incident side)
[in]n2refractive index (transmitted side)

Reimplemented from GOAT::raytracing::IRay.

◆ refract()

void GOAT::raytracing::Ray_pow::refract ( maths::Matrix< std::complex< double > > FT,
maths::Vector< double > N,
std::complex< double > n1,
std::complex< double > n2 )

refracts the ray with help of the Fresnel matrix (for internal use only).

Parameters
FTFresnel matrix
Nsurface normal
n1refractive index (incident side)
n2refractive index (transmitted side)

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
Ray_pow S )
friend

output operator

Member Data Documentation

◆ Pow

double GOAT::raytracing::Ray_pow::Pow

Power held by the ray in Watts.

Definition at line 65 of file ray_pow.h.


The documentation for this class was generated from the following file: