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

This class makes a Kirchhoff calculation This class is directly connect with a Detector. The calculation itself works as follows: At first, a normal raytracing step is performed to calculate the electric field at a detector. This detector is used as a source field for the next step, where the field at a given area is calculated with help of the Kirhhoff integral. More...

#include <kirchhoff.h>

Inheritance diagram for GOAT::raytracing::Kirchhoff:
GOAT::raytracing::DetectorPlane GOAT::raytracing::Detector

Public Member Functions

void calc (DetectorPlane *det)
 This method make the calculation With this method, the calculation of the Kirchhoff-integral will be performed.
 Kirchhoff (double wvl, maths::Vector< double > P, maths::Vector< double > e1, maths::Vector< double > e2, int n1, int n2)
 constructor
Public Member Functions inherited from GOAT::raytracing::DetectorPlane
bool cross (maths::Vector< double > P, maths::Vector< double > k, int &i1, int &i2, double &l)
 implementation of the intersection checking function for the plane detector
 DetectorPlane (maths::Vector< double > P, maths::Vector< double > e1, maths::Vector< double > e2, int n1, int n2)
 DetectorPlane (maths::Vector< double > P, maths::Vector< double > n, double d, int N)
 DetectorPlane (void)
void setNorm (maths::Vector< double > n)
 set the normal on the detector
Public Member Functions inherited from GOAT::raytracing::Detector
void clean ()
 Clean all data, i.e. all data is set to zero (Data array is not removed)
void clear ()
 clear
double D1 ()
 return the length in the first direction
double D2 ()
 return the length in the second direction
 Detector (const Detector &Det)
 copy constructor
 Detector (int n1, int n2)
 Constructor which is called by the size of the array (n1 x n2)
 Detector (void)
maths::Vector< double > gete1 ()
 returns the direction of the first axis of the detector
maths::Vector< double > gete2 ()
 returns the direction of the second axis of the detector
bool load (const char *fn)
void mult (double fac)
 Multiply with factor. This functions multiplies all elements of the detector with the factor fac.
int N1 ()
 returns the dimension of the array in the first direction
int N2 ()
 returns the dimension of the array in the second direction
maths::Vector< double > norm ()
 returns the normal vector of the detectors surface
maths::Vector< std::complex< double > > & operator() (int i1, int i2)
 bracket operator which gives the content inside the array determined by the indices i1 and i2
Detectoroperator= (const Detector &D)
maths::Vector< double > position ()
 returns the position of the detector
void save (const char *fn)
 stores the content (the whole vector)
void saveabs (const char *fn)
 stores the content (absolute value of the electric field) of the detector array in the file determined by its filename fn
void saveimag (const char *fn, int coord)
 stores the content (imaginary part of one component of the the electric field, coord determines the coordinate 0,1,2 for x,y,z) of the detector array in the file fn
void savePhase (const char *fn, int coord)
 stores the content (phase of one component of the electric field, coord determines the coordinate 0,1,2 for x,y,z) of the detector array in the file fn
void savereal (const char *fn, int coord)
 stores the content (real part of one component of the the electric field, coord determines the coordinate 0,1,2 for x,y,z) of the detector array in the file fn
void setD (double d1, double d2)
void setD1 (double d1)
void setD2 (double d2)
void setN (int n1, int n2)
 set the dimensions of the array
void setN1 (int n1)
 set the dimension of the array in the first direction
void setN2 (int n2)
 set the dimension of the array in the second direction
void setPosition (maths::Vector< double > Pos)
 set the position of the detector
int Type ()
 returns kind of detector
 ~Detector (void)

Private Member Functions

maths::Vector< std::complex< double > > point (DetectorPlane *det, maths::Vector< double > P)

Private Attributes

double k
double wvl

Additional Inherited Members

Public Attributes inherited from GOAT::raytracing::Detector
std::vector< std::vector< maths::Vector< std::complex< double > > > > D
 Here, the data will be stored.
std::string fname
Protected Member Functions inherited from GOAT::raytracing::Detector
void init (int n1, int n2)
 initialise array (for internal use only)
Protected Attributes inherited from GOAT::raytracing::Detector
double d1 =0
double d2 =0
maths::Vector< double > e1
 unit vector in the first direction
maths::Vector< double > e2
 unit vector in the second direction
maths::Vector< double > n
int n1 =0
int n2 =0
maths::Vector< double > P
 Position of the detector.
int type =-1

Detailed Description

This class makes a Kirchhoff calculation This class is directly connect with a Detector. The calculation itself works as follows: At first, a normal raytracing step is performed to calculate the electric field at a detector. This detector is used as a source field for the next step, where the field at a given area is calculated with help of the Kirhhoff integral.

Definition at line 13 of file kirchhoff.h.

Constructor & Destructor Documentation

◆ Kirchhoff()

GOAT::raytracing::Kirchhoff::Kirchhoff ( double wvl,
maths::Vector< double > P,
maths::Vector< double > e1,
maths::Vector< double > e2,
int n1,
int n2 )

constructor

Parameters
wvlWavelength used for the caluclation of the electric field
PPosition of the Kirchhoff plane
e1first direction vector of one edge of the detector
e2second direction vector of the edge of the detector perpendicular to the first one
n1number of cells in e1-direction
n2number of cells in e2-direction

Member Function Documentation

◆ calc()

void GOAT::raytracing::Kirchhoff::calc ( DetectorPlane * det)

This method make the calculation With this method, the calculation of the Kirchhoff-integral will be performed.

Parameters
deta pointer to the Detector, which acts as the source

◆ point()

maths::Vector< std::complex< double > > GOAT::raytracing::Kirchhoff::point ( DetectorPlane * det,
maths::Vector< double > P )
private

Member Data Documentation

◆ k

double GOAT::raytracing::Kirchhoff::k
private

Definition at line 35 of file kirchhoff.h.

◆ wvl

double GOAT::raytracing::Kirchhoff::wvl
private

Definition at line 36 of file kirchhoff.h.


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