|
GOAT (Geometrical optics application tool) 0.1
|
Classes | |
| class | Matrix |
| This class represents a threedimensional (numeric) Matrix as a template. More... | |
| class | Vector |
| Template class for threedimensional vectors. More... | |
Functions | |
| double | abs (const Vector< double > &r) |
| Fehlermeldung ausgeben. | |
| double | abs (const Vector< int > &r) |
| Calculates the absolute value of an integer vector. | |
| double | abs (const Vector< long long int > &r) |
| Calculates the absolute value of an integer vector. | |
| double | abs (const Vector< std::complex< double > > &r) |
| Calculates the absolute value of a complex vector \( (abs(\vec{r})=\sqrt{\vec{r} \cdot \vec{r} }) \). | |
| double | abs (std::complex< double > x) |
| absolute value of the complex valued variable x | |
| double | abs2 (const Vector< double > &r) |
| Calculates the squared absolute value of double vector. | |
| double | abs2 (const Vector< std::complex< double > > &r) |
| Calculates the squared absolute value of double vector \( (abs2(\vec{r})=\vec{r} \cdot \vec{r} ) \). | |
| double | abs2 (double x) |
| Squared absolute value of x. | |
| double | abs2 (std::complex< double > x) |
| Absolute value of the complex number x \( abs(x)=\sqrt{x \cdot x} \). | |
| double | arctan (double y, double x) |
| Vector< double > | arg (Vector< std::complex< double > > &r) |
| std::complex< double > | asin (std::complex< double > z) |
| template<class T> | |
| Vector< T > | cart2sphere (const Vector< T > &x) |
| Transformation from cartesian coordinates to spherical coordinates. | |
| Vector< double > | cart2sphere (double x, double y, double z) |
| Converts a vector, described by its cartesian components, into a vector in spherical coordinates ( \((r, \vartheta, \varphi) \)) | |
| Vector< double > | ceil (const Vector< double > &r) |
| Vector< std::complex< double > > | conj (const Vector< std::complex< double > > &r) |
| Conjugate complex of the vector r. | |
| double * | conv2double (int numV, Vector< std::complex< double > > *r) |
| This function returns an array with all components of the Vector-array r. | |
| Vector< std::complex< double > > * | conv2vector (int num, double *r) |
| This function converts a list of doubles into a list of complex vectors. | |
| Vector< std::complex< double > > | convd2c (const Vector< double > &r) |
| Vector< std::complex< double > > | convd2c (const Vector< std::complex< double > > &r) |
| Matrix< std::complex< double > > | cunity () |
| unity matrix (complex) | |
| Vector< double > | emax (Vector< double > &P1, Vector< double > &P2) |
| Vector< double > | ephi (double theta, double phi) |
| returns a normalized vector in phi-direction on a unit sphere with spherical coordinates /p theta and /p phi | |
| Vector< double > | er (double theta, double phi) |
| returns a normalized vector in r-direction on a unit sphere with spherical coordinates /p theta and /p phi | |
| void | errmsg (char *S) |
| Vector< double > | etheta (double theta, double phi) |
| returns a normalized vector in theta-direction on a unit sphere with spherical coordinates /p theta and /p phi | |
| double | findmax (std::vector< double > d, std::size_t &index) |
| finds maximum in data This function finds the maximal value inside a vector | |
| Vector< double > | floor (const Vector< double > &r) |
| rounding up, Component-by-component | |
| std::complex< double > | freflect (int pol, double alpha, std::complex< double > n1, std::complex< double > n2) |
| Calculates the Fresnel coefficient for reflection This function calculates the amplitude Fresnel coefficient for the reflected part of the ray. | |
| std::complex< double > | Fresnel_reflect (int pol, Vector< double > k, Vector< double > n, std::complex< double > n1, std::complex< double > n2) |
| Calculates the Fresnel coefficient for reflection This function calculates the amplitude Fresnel coefficient for the reflected part of the ray. | |
| std::complex< double > | Fresnel_trans (int pol, Vector< double > k, Vector< double > n, std::complex< double > n1, std::complex< double > n2) |
| Calculates the Fresnel coefficient for transmission This function calculates the amplitude Fresnel coefficient for the transmitted part of the ray. | |
| std::complex< double > | ftrans (int pol, double alpha, std::complex< double > n1, std::complex< double > n2) |
| Calculates the Fresnel coefficient for transmission This function calculates the amplitude Fresnel coefficient for the transmitted part of the ray. | |
| std::size_t | FWHM (std::vector< double > d, std::size_t index) |
| estimates the full width at half maximum of a peak around at the position inside a vector The function gives back the full width at half maximum (FWHM) by finding the first point with less than (or equal to) the half of the maximal value left and right from position index inside the vector d | |
| void | getKSystem (const Vector< double > &n, const Vector< double > &k, Vector< double > &e1, Vector< double > &e2, Vector< double > &e3) |
| Calculates the three direction vectors of a coordinate system formed by the surface normal n and the propagation vector k. | |
| Vector< std::complex< double > > | grad2d (double(*f(Vector< std::complex< double > >)), Vector< std::complex< double > > r, double d) |
| calculates the gradient of a given function at a certain position | |
| Vector< int > | iceil (const Vector< double > &r) |
| Vector< int > | ifloor (const Vector< double > &r) |
| rounding up, component-by-component rounding | |
| std::complex< double > | ihoch (int l) |
| Vector< double > | imag (Vector< std::complex< double > > r) |
| returns a vector with the imaginary parts of the components of the complex vector r | |
| bool | isnan (Vector< double > v) |
| returns true if one of the components of v is NaN | |
| bool | isnan (Vector< std::complex< double > > v) |
| returns true if one of the components of v is NaN | |
| Vector< std::complex< double > > | makeReal (const Vector< std::complex< double > > &r) |
| double | mean (std::vector< double > d) |
| Calculates the mean of the data stored in d. | |
| std::vector< double > | movingAvg (std::vector< double > d, int n) |
| calculates the moving average of the data Calculates the (unweighted) moving average over the data stored in d. The average will be calculated over n elements | |
| Vector< double > | nanV (const char *tagp) |
| double | newton_root (std::function< double(double)> f, std::function< double(double)> df, double x0=0, double eps=std::numeric_limits< double >::min()) |
| Vector< double > | norm (const Vector< double > &r) |
| Vector< std::complex< double > > | norm (const Vector< std::complex< double > > &r) |
| Matrix< double > | null () |
| Null-matrix (all components are zero) | |
| std::complex< double > | operator* (int y, std::complex< double > x) |
| std::complex< double > | operator* (long long int y, std::complex< double > x) |
| std::complex< double > | operator* (std::complex< double > x, int y) |
| std::complex< double > | operator* (std::complex< double > x, long long int y) |
| std::complex< double > | operator+ (int y, std::complex< double > x) |
| std::complex< double > | operator+ (long long int y, std::complex< double > x) |
| std::complex< double > | operator+ (std::complex< double > x, int y) |
| std::complex< double > | operator+ (std::complex< double > x, long long int y) |
| std::complex< double > | operator- (int y, std::complex< double > x) |
| std::complex< double > | operator- (long long int y, std::complex< double > x) |
| std::complex< double > | operator- (std::complex< double > x, int y) |
| std::complex< double > | operator- (std::complex< double > x, long long int y) |
| std::complex< double > | operator/ (int y, std::complex< double > x) |
| std::complex< double > | operator/ (long long int y, std::complex< double > x) |
| std::complex< double > | operator/ (std::complex< double > x, int y) |
| std::complex< double > | operator/ (std::complex< double > x, long long int y) |
| std::ostream & | operator<< (std::ostream &is, const Vector< double > &r) |
| std::ostream & | operator<< (std::ostream &is, const Vector< int > &r) |
| std::ostream & | operator<< (std::ostream &is, const Vector< std::complex< double > > &r) |
| std::istream & | operator>> (std::istream &is, Vector< double > &r) |
| std::istream & | operator>> (std::istream &is, Vector< int > &r) |
| std::istream & | operator>> (std::istream &is, Vector< std::complex< double > > &r) |
| input operator, reads complex vector from file | |
| Vector< double > | real (Vector< std::complex< double > > r) |
| returns a vector with the real parts of the components of the complex vector r | |
| Vector< double > | rotate (const Vector< double > &r, double dtheta, double dphi) |
| void | rotate (Vector< double > &r, double phi) |
| double | sDreieck (Vector< double >, Vector< double >, Vector< double >) |
| double | sign (double x) |
| template<class T> | |
| Vector< T > | sphere2cart (const Vector< T > &P) |
| Transforms vector from spherical coordinates into cartesian coordinates. | |
| Vector< double > | sphere2cart (double r, double theta, double phi) |
| Converts a vector, described by its spherical components ( \((r, \vartheta, \varphi) \)), into a vector in cartesian coordinates. | |
| void | sphereunitv (Vector< double > &P, Vector< double > &er, Vector< double > ðeta, Vector< double > &ephi) |
| double | sqr (double x) |
| square of x | |
| double | sViereck (Vector< double >, Vector< double >, Vector< double >, Vector< double >) |
| std::complex< double > | tan (std::complex< double > z) |
| bool | testnan (double x) |
| tests x on NaN | |
| std::string | tl (std::string) |
| Converts string into lowercase This function converts all characters in a string into lower case. | |
| char * | toString (char *S, Vector< double > P) |
| Converts a double vector into a string. | |
| char * | toString (char *S, Vector< std::complex< double > > P) |
| Converts a complex vector into a string. | |
| void | trafo (const Vector< double > &e0, const Vector< double > &e1, const Vector< double > &e2, Matrix< double > &H, Matrix< double > &R) |
| Calculates the transformation matrices from the laboratory coordinate system into a local system and vice versa. | |
| Matrix< double > | unity () |
| unity matrix (double precision) | |
| Vector< std::complex< double > > | vdc (const Vector< double > &r) |
special operators for mixed types | |
Operators for calculations with mixed types. | |
| Matrix< std::complex< double > > | operator* (const Matrix< double > &, const Matrix< std::complex< double > > &) |
| Matrix< std::complex< double > > | operator* (const Matrix< std::complex< double > > &, const Matrix< double > &) |
| Matrix< std::complex< double > > | operator+ (const Matrix< double > &, const Matrix< std::complex< double > > &) |
| Matrix< std::complex< double > > | operator+ (const Matrix< std::complex< double > > &, const Matrix< double > &) |
| Matrix< std::complex< double > > | operator- (const Matrix< double > &, const Matrix< std::complex< double > > &) |
| Matrix< std::complex< double > > | operator- (const Matrix< std::complex< double > > &, const Matrix< double > &) |
| Vector< std::complex< double > > | operator* (const Matrix< double > &, const Vector< std::complex< double > > &) |
| Vector< std::complex< double > > | operator* (const Matrix< std::complex< double > > &, const Vector< double > &) |
| Matrix< std::complex< double > > | operator* (const Matrix< double > &, const std::complex< double > &) |
| Matrix< std::complex< double > > | operator* (const Matrix< std::complex< double > > &, const double &) |
| Matrix< std::complex< double > > | operator* (const double &, const Matrix< std::complex< double > > &) |
| Matrix< std::complex< double > > | operator* (const std::complex< double > &, const Matrix< double > &) |
| Matrix< std::complex< double > > | operator/ (const Matrix< double > &, const std::complex< double > &) |
| Matrix< std::complex< double > > | operator/ (const Matrix< std::complex< double > > &, const double &) |
Rotation matrices | |
Rotation matrices around the principal axis of the cartesian coordinate system (angles are given in radiants) | |
| Matrix< double > | Dx (double phi) |
| Rotation matrix around x axis This function returns the matrix for a rotation around the x-axis: | |
| Matrix< double > | Dy (double phi) |
| Rotation matrix around y axis This function returns the matrix for a rotation around the y-axis: | |
| Matrix< double > | Dz (double phi) |
| Rotation matrix around z axis This function returns the matrix for a rotation around the z-axis: | |
| Matrix< double > | rotMatrix (const Vector< double > a, double gamma) |
| Rotation matrix for rotation around the axis a by the angle gamma. | |
| Matrix< double > | rotMatrix (double alpha, double beta, double gamma) |
| Rotation matrix calculated from rotation around x-axis, y-axis and z-axis. | |
| Matrix< double > | rotMatrixA (Vector< double > n, Vector< double > k, double gamma) |
| Calculates rotation matrix for a rotation around an axis passing through a given point and pointing in a defined direction. | |
| Matrix< double > | rotMatrix (Vector< double > P, double dtheta, double dphi) |
Standard operators for vectors | |
Standard operators for vectors with mixed types | |
| Vector< double > | operator- (const Vector< double > &r1, const Vector< int > &r2) |
| Vector< double > | operator- (const Vector< int > &r1, const Vector< double > &r2) |
| Vector< double > | operator- (const Vector< double > &r1, const Vector< long long int > &r2) |
| Vector< double > | operator- (const Vector< long long int > &r1, const Vector< double > &r2) |
| Vector< long long int > | operator- (const Vector< int > &r1, const Vector< long long int > &r2) |
| Vector< long long int > | operator- (const Vector< long long int > &r1, const Vector< int > &r2) |
| Vector< std::complex< double > > | operator- (const Vector< double > &r1, const Vector< std::complex< double > > &r2) |
| Vector< std::complex< double > > | operator- (const Vector< std::complex< double > > &r1, const Vector< double > &r2) |
| Vector< std::complex< double > > | operator- (const Vector< std::complex< double > > &r1, const Vector< int > &r2) |
| Vector< std::complex< double > > | operator- (const Vector< int > &r1, const Vector< std::complex< double > > &r2) |
| Vector< std::complex< double > > | operator- (const Vector< std::complex< double > > &r1, const Vector< long long int > &r2) |
| Vector< std::complex< double > > | operator- (const Vector< long long int > &r1, const Vector< std::complex< double > > &r2) |
| Vector< std::complex< double > > | operator+ (const Vector< double > &r1, const Vector< std::complex< double > > &r2) |
| Vector< std::complex< double > > | operator+ (const Vector< std::complex< double > > &r1, const Vector< double > &r2) |
| Vector< double > | operator+ (const Vector< int > &r1, const Vector< double > &r2) |
| Vector< double > | operator+ (const Vector< double > &r1, const Vector< int > &r2) |
| Vector< std::complex< double > > | operator+ (const Vector< std::complex< double > > &r1, const Vector< int > &r2) |
| Vector< std::complex< double > > | operator+ (const Vector< int > &r1, const Vector< std::complex< double > > &r2) |
| Vector< double > | operator+ (const Vector< long long int > &r1, const Vector< double > &r2) |
| Vector< double > | operator+ (const Vector< double > &r1, const Vector< long long int > &r2) |
| Vector< std::complex< double > > | operator+ (const Vector< std::complex< double > > &r1, const Vector< long long int > &r2) |
| Vector< std::complex< double > > | operator+ (const Vector< long long int > &r1, const Vector< std::complex< double > > &r2) |
| Vector< double > | operator* (int x, const Vector< double > &r) |
| Vector< double > | operator* (const Vector< double > &r, int x) |
| Vector< double > | operator* (double x, const Vector< int > &r) |
| Vector< double > | operator* (const Vector< int > &r, double x) |
| Vector< double > | operator* (long long int x, const Vector< double > &r) |
| Vector< double > | operator* (const Vector< double > &r, long long int x) |
| Vector< double > | operator* (double x, const Vector< long long int > &r) |
| Vector< double > | operator* (const Vector< long long int > &r, double x) |
| Vector< std::complex< double > > | operator* (std::complex< double > x, const Vector< double > &r) |
| multiplication between a complex valued scalar and a double valued vector | |
| Vector< std::complex< double > > | operator* (const Vector< double > &r, std::complex< double > x) |
| multiplication between a double valued vector and a complex valued scalar | |
| Vector< std::complex< double > > | operator* (std::complex< double > x, const Vector< int > &r) |
| Vector< std::complex< double > > | operator* (const Vector< int > &r, std::complex< double > x) |
| Vector< std::complex< double > > | operator* (std::complex< double > x, const Vector< long long int > &r) |
| Vector< std::complex< double > > | operator* (const Vector< long long int > &r, std::complex< double > x) |
| Vector< std::complex< double > > | operator/ (const Vector< double > &r, std::complex< double > x) |
| Vector< double > | operator/ (const Vector< double > &r, int x) |
| Vector< double > | operator/ (const Vector< double > &r, long long int x) |
| Vector< std::complex< double > > | operator/ (const Vector< std::complex< double > > &r, double x) |
| Vector< std::complex< double > > | operator/ (const Vector< std::complex< double > > &r, int x) |
| Vector< std::complex< double > > | operator/ (const Vector< std::complex< double > > &r, long long int x) |
| Vector< double > | operator/ (const Vector< int > &r, double x) |
| Vector< double > | operator/ (const Vector< long long int > &r, double x) |
| Vector< std::complex< double > > | operator/ (const Vector< int > &r, std::complex< double > x) |
| Vector< std::complex< double > > | operator/ (const Vector< long long int > &r, std::complex< double > x) |
| std::complex< double > | operator* (const Vector< double > &a, const Vector< std::complex< double > > &b) |
| std::complex< double > | operator* (const Vector< std::complex< double > > &a, const Vector< double > &b) |
| double | operator* (const Vector< double > &a, const Vector< int > &b) |
| double | operator* (const Vector< int > &a, const Vector< double > &b) |
| std::complex< double > | operator* (const Vector< std::complex< double > > &a, const Vector< int > &b) |
| std::complex< double > | operator* (const Vector< int > &a, const Vector< std::complex< double > > &b) |
| Vector< std::complex< double > > | operator% (const Vector< std::complex< double > > &a, const Vector< double > &b) |
| Vector< std::complex< double > > | operator% (const Vector< double > &a, const Vector< std::complex< double > > &b) |
| Vector< std::complex< double > > | operator% (const Vector< std::complex< double > > &a, const Vector< int > &b) |
| Vector< std::complex< double > > | operator% (const Vector< int > &a, const Vector< std::complex< double > > &b) |
| Vector< std::complex< double > > | operator% (const Vector< double > &a, const Vector< int > &b) |
| Vector< std::complex< double > > | operator% (const Vector< int > &a, const Vector< double > &b) |
element-wise multiplication | |
Element-wise multiplication of two vectors with different types | |
| Vector< double > | emult (const Vector< double > &r1, const Vector< int > &r2) |
| Vector< double > | emult (const Vector< int > &r1, const Vector< double > &r2) |
| Vector< double > | emult (const Vector< double > &r1, const Vector< long long int > &r2) |
| Vector< double > | emult (const Vector< long long int > &r1, const Vector< double > &r2) |
Variables | |
| const Matrix< std::complex< double > > | CUNITY = Matrix<std::complex<double> >(Vector<std::complex<double> >(1, 0, 0), Vector<std::complex<double> >(0, 1, 0), Vector<std::complex<double> >(0, 0, 1)) |
| Unity matrix (complex-valued) | |
| const Vector< double > | one =Vector<double>(1.0, 1.0, 1.0) |
| double valued vector with all components set to 1 | |
| const Matrix< double > | UNITY = Matrix<double>(Vector<double>(1.0, 0.0, 0.0), Vector<double>(0.0, 1.0, 0.0), Vector<double>(0.0, 0.0, 1.0)) |
| Unity matrix (double-valued) | |
| double GOAT::maths::abs | ( | const Vector< double > & | r | ) |
Fehlermeldung ausgeben.
Calculates the absolute value of a double vector
| double GOAT::maths::abs | ( | const Vector< int > & | r | ) |
Calculates the absolute value of an integer vector.
| double GOAT::maths::abs | ( | const Vector< long long int > & | r | ) |
Calculates the absolute value of an integer vector.
| double GOAT::maths::abs | ( | const Vector< std::complex< double > > & | r | ) |
Calculates the absolute value of a complex vector \( (abs(\vec{r})=\sqrt{\vec{r} \cdot \vec{r} }) \).
| double GOAT::maths::abs | ( | std::complex< double > | x | ) |
absolute value of the complex valued variable x
absolute value of x (sqrt (re(x)^2+im(x)+^2)
| double GOAT::maths::abs2 | ( | const Vector< double > & | r | ) |
Calculates the squared absolute value of double vector.
| double GOAT::maths::abs2 | ( | const Vector< std::complex< double > > & | r | ) |
Calculates the squared absolute value of double vector \( (abs2(\vec{r})=\vec{r} \cdot \vec{r} ) \).
| double GOAT::maths::abs2 | ( | double | x | ) |
Squared absolute value of x.
| double GOAT::maths::abs2 | ( | std::complex< double > | x | ) |
Absolute value of the complex number x \( abs(x)=\sqrt{x \cdot x} \).
| double GOAT::maths::arctan | ( | double | y, |
| double | x ) |
| std::complex< double > GOAT::maths::asin | ( | std::complex< double > | z | ) |
| Vector< double > GOAT::maths::cart2sphere | ( | double | x, |
| double | y, | ||
| double | z ) |
Converts a vector, described by its cartesian components, into a vector in spherical coordinates ( \((r, \vartheta, \varphi) \))
| x | x-component |
| y | y-component |
| z | z-component |
Conjugate complex of the vector r.
| double * GOAT::maths::conv2double | ( | int | numV, |
| Vector< std::complex< double > > * | r ) |
This function returns an array with all components of the Vector-array r.
converts an array of complex valued vectors into an double valued array This function converts an array of complex vectors into a double valued array, where the real and the imaginary part of each component is stored in a separate cell inside the new array
| numV | number of elements in vector list r |
| r | List of vectors to convert |
| no | number of elements in the vector array |
| r | vector array |
| Vector< std::complex< double > > * GOAT::maths::conv2vector | ( | int | num, |
| double * | r ) |
This function converts a list of doubles into a list of complex vectors.
converts an array of double valued vectors into an double valued array This function converts an array of double vectors into a double valued array, where the real and the imaginary part of each component is stored in a separate cell inside the new array
| num | Number of complex vectors to convert |
| r | List of double values |
| no | number of elements in the vector array |
| r | vector array |
| Matrix< std::complex< double > > GOAT::maths::cunity | ( | ) |
unity matrix (complex)
| Matrix< double > GOAT::maths::Dx | ( | double | phi | ) |
Rotation matrix around x axis This function returns the matrix for a rotation around the x-axis:
\[ D_x=\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos \varphi & \sin \varphi \\ 0 & -\sin \varphi & \cos \varphi \end{array}\right) \]
| Matrix< double > GOAT::maths::Dy | ( | double | phi | ) |
Rotation matrix around y axis This function returns the matrix for a rotation around the y-axis:
\[ D_y=\left( \begin{array}{ccc} \cos\varphi & 0 & \sin \varphi \\ 0 & 1 & 0 \\ -\sin\varphi & 0 & \cos \varphi \end{array}\right) \]
| Matrix< double > GOAT::maths::Dz | ( | double | phi | ) |
Rotation matrix around z axis This function returns the matrix for a rotation around the z-axis:
\[ D_z=\left( \begin{array}{ccc} \cos\varphi & -\sin\varphi & 0 \\ \sin\varphi & \cos\varphi & 0 \\0 & 0 & 1 \end{array}\right) \]
| Vector< double > GOAT::maths::emult | ( | const Vector< double > & | r1, |
| const Vector< long long int > & | r2 ) |
| Vector< double > GOAT::maths::emult | ( | const Vector< long long int > & | r1, |
| const Vector< double > & | r2 ) |
| Vector< double > GOAT::maths::ephi | ( | double | theta, |
| double | phi ) |
returns a normalized vector in phi-direction on a unit sphere with spherical coordinates /p theta and /p phi
| Vector< double > GOAT::maths::er | ( | double | theta, |
| double | phi ) |
returns a normalized vector in r-direction on a unit sphere with spherical coordinates /p theta and /p phi
| void GOAT::maths::errmsg | ( | char * | S | ) |
| Vector< double > GOAT::maths::etheta | ( | double | theta, |
| double | phi ) |
returns a normalized vector in theta-direction on a unit sphere with spherical coordinates /p theta and /p phi
| double GOAT::maths::findmax | ( | std::vector< double > | d, |
| std::size_t & | index ) |
finds maximum in data This function finds the maximal value inside a vector
| [in] | d | vector with the data |
| [out] | Index | of the maximum inside d |
rounding up, Component-by-component
| std::complex< double > GOAT::maths::freflect | ( | int | pol, |
| double | alpha, | ||
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
Calculates the Fresnel coefficient for reflection This function calculates the amplitude Fresnel coefficient for the reflected part of the ray.
| pol | Direction of the polarization (PARALLEL or SENKRECHT/PERPENDICULAR |
| alpha | Angle of incidence (in radiants) |
| n1 | Refractive index of the medium on the side of the incident ray |
| n2 | Refractive index of the medium on the side of the outgoing(transmitted) ray |
| std::complex< double > GOAT::maths::Fresnel_reflect | ( | int | pol, |
| Vector< double > | k, | ||
| Vector< double > | n, | ||
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
Calculates the Fresnel coefficient for reflection This function calculates the amplitude Fresnel coefficient for the reflected part of the ray.
| pol | Direction of the polarization (PARALLEL or SENKRECHT/PERPENDICULAR |
| k | Directional vector for the incident ray |
| n | Surface normal |
| n1 | Refractive index of the medium on the side of the incident ray |
| n2 | Refractive index of the medium on the side of the outgoing(transmitted) ray |
| std::complex< double > GOAT::maths::Fresnel_trans | ( | int | pol, |
| Vector< double > | k, | ||
| Vector< double > | n, | ||
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
Calculates the Fresnel coefficient for transmission This function calculates the amplitude Fresnel coefficient for the transmitted part of the ray.
| pol | Direction of the polarization (PARALLEL or SENKRECHT/PERPENDICULAR |
| k | Directional vector for the incident ray |
| n | Surface normal |
| n1 | Refractive index of the medium on the side of the incident ray |
| n2 | Refractive index of the medium on the side of the outgoing(transmitted) ray |
| std::complex< double > GOAT::maths::ftrans | ( | int | pol, |
| double | alpha, | ||
| std::complex< double > | n1, | ||
| std::complex< double > | n2 ) |
Calculates the Fresnel coefficient for transmission This function calculates the amplitude Fresnel coefficient for the transmitted part of the ray.
| pol | Direction of the polarization (PARALLEL or SENKRECHT/PERPENDICULAR |
| alpha | Angle of incidence (in radiants) |
| n1 | Refractive index of the medium on the side of the incident ray |
| n2 | Refractive index of the medium on the side of the outgoing(transmitted) ray |
| std::size_t GOAT::maths::FWHM | ( | std::vector< double > | d, |
| std::size_t | index ) |
estimates the full width at half maximum of a peak around at the position inside a vector The function gives back the full width at half maximum (FWHM) by finding the first point with less than (or equal to) the half of the maximal value left and right from position index inside the vector d
| d | data |
| index | position of the peak |
| void GOAT::maths::getKSystem | ( | const Vector< double > & | n, |
| const Vector< double > & | k, | ||
| Vector< double > & | e1, | ||
| Vector< double > & | e2, | ||
| Vector< double > & | e3 ) |
Calculates the three direction vectors of a coordinate system formed by the surface normal n and the propagation vector k.
| n | Surface normal |
| k | propagation vector |
| e0 | normalized direction vector for the first coordinate axis, equal to n |
| e1 | normalized direction vector for the first coordinate axis, \(\vec{e_1}=\vec{e_2}\times\vec{e_0}\) |
| e2 | normalized direction vector for the third coordinate axis: \(\vec{e_2}=\vec{n}\times\vec{k}\). If \(\vec{e_2}=0\), \(\vec{e_2}= \frac{\vec{n}\times\vec{e_x}}{\left|\vec{n}\times\vec{e_x}\right|\) |
| Vector< std::complex< double > > GOAT::maths::grad2d | ( | double(*< ::< > > double | ) |
calculates the gradient of a given function at a certain position
This function gives the gradient (as complex vector) of a function /f at the position /p x, where the gradient is approximated by \(\nabla f(\vec{r})= \frac{f(r\vec + \vec e_x \cdot d)}{d}\)
rounding up, component-by-component rounding
| std::complex< double > GOAT::maths::ihoch | ( | int | l | ) |
returns a vector with the imaginary parts of the components of the complex vector r
| bool GOAT::maths::isnan | ( | Vector< double > | v | ) |
returns true if one of the components of v is NaN
| bool GOAT::maths::isnan | ( | Vector< std::complex< double > > | v | ) |
returns true if one of the components of v is NaN
| Vector< std::complex< double > > GOAT::maths::makeReal | ( | const Vector< std::complex< double > > & | r | ) |
| double GOAT::maths::mean | ( | std::vector< double > | d | ) |
Calculates the mean of the data stored in d.
| std::vector< double > GOAT::maths::movingAvg | ( | std::vector< double > | d, |
| int | n ) |
calculates the moving average of the data Calculates the (unweighted) moving average over the data stored in d. The average will be calculated over n elements
| d | Vector with the data |
| n | Number of elements over which the average is calculated if n is even the n+1 elements were used for averaging |
| Vector< double > GOAT::maths::nanV | ( | const char * | tagp | ) |
| double GOAT::maths::newton_root | ( | std::function< double(double)> | f, |
| std::function< double(double)> | df, | ||
| double | x0 = 0, | ||
| double | eps = std::numeric_limits< double >::min() ) |
| Matrix< double > GOAT::maths::null | ( | ) |
Null-matrix (all components are zero)
| Vector< std::complex< double > > GOAT::maths::operator% | ( | const Vector< double > & | a, |
| const Vector< int > & | b ) |
| Vector< std::complex< double > > GOAT::maths::operator% | ( | const Vector< double > & | a, |
| const Vector< std::complex< double > > & | b ) |
| Vector< std::complex< double > > GOAT::maths::operator% | ( | const Vector< int > & | a, |
| const Vector< double > & | b ) |
| Vector< std::complex< double > > GOAT::maths::operator% | ( | const Vector< int > & | a, |
| const Vector< std::complex< double > > & | b ) |
| Vector< std::complex< double > > GOAT::maths::operator% | ( | const Vector< std::complex< double > > & | a, |
| const Vector< double > & | b ) |
| Vector< std::complex< double > > GOAT::maths::operator% | ( | const Vector< std::complex< double > > & | a, |
| const Vector< int > & | b ) |
| Matrix< std::complex< double > > GOAT::maths::operator* | ( | const double & | , |
| const Matrix< std::complex< double > > & | ) |
| Matrix< std::complex< double > > GOAT::maths::operator* | ( | const Matrix< double > & | , |
| const Matrix< std::complex< double > > & | ) |
| Matrix< std::complex< double > > GOAT::maths::operator* | ( | const Matrix< double > & | , |
| const std::complex< double > & | ) |
| Vector< std::complex< double > > GOAT::maths::operator* | ( | const Matrix< double > & | , |
| const Vector< std::complex< double > > & | ) |
| Matrix< std::complex< double > > GOAT::maths::operator* | ( | const Matrix< std::complex< double > > & | , |
| const double & | ) |
| Matrix< std::complex< double > > GOAT::maths::operator* | ( | const Matrix< std::complex< double > > & | , |
| const Matrix< double > & | ) |
| Vector< std::complex< double > > GOAT::maths::operator* | ( | const Matrix< std::complex< double > > & | , |
| const Vector< double > & | ) |
| Matrix< std::complex< double > > GOAT::maths::operator* | ( | const std::complex< double > & | , |
| const Matrix< double > & | ) |
| std::complex< double > GOAT::maths::operator* | ( | const Vector< double > & | a, |
| const Vector< std::complex< double > > & | b ) |
| Vector< std::complex< double > > GOAT::maths::operator* | ( | const Vector< double > & | r, |
| std::complex< double > | x ) |
multiplication between a double valued vector and a complex valued scalar
| std::complex< double > GOAT::maths::operator* | ( | const Vector< int > & | a, |
| const Vector< std::complex< double > > & | b ) |
| Vector< std::complex< double > > GOAT::maths::operator* | ( | const Vector< int > & | r, |
| std::complex< double > | x ) |
| Vector< std::complex< double > > GOAT::maths::operator* | ( | const Vector< long long int > & | r, |
| std::complex< double > | x ) |
| std::complex< double > GOAT::maths::operator* | ( | const Vector< std::complex< double > > & | a, |
| const Vector< double > & | b ) |
| std::complex< double > GOAT::maths::operator* | ( | const Vector< std::complex< double > > & | a, |
| const Vector< int > & | b ) |
|
inline |
|
inline |
| Vector< std::complex< double > > GOAT::maths::operator* | ( | std::complex< double > | x, |
| const Vector< double > & | r ) |
multiplication between a complex valued scalar and a double valued vector
| Vector< std::complex< double > > GOAT::maths::operator* | ( | std::complex< double > | x, |
| const Vector< int > & | r ) |
| Vector< std::complex< double > > GOAT::maths::operator* | ( | std::complex< double > | x, |
| const Vector< long long int > & | r ) |
|
inline |
|
inline |
| Matrix< std::complex< double > > GOAT::maths::operator+ | ( | const Matrix< double > & | , |
| const Matrix< std::complex< double > > & | ) |
| Matrix< std::complex< double > > GOAT::maths::operator+ | ( | const Matrix< std::complex< double > > & | , |
| const Matrix< double > & | ) |
| Vector< double > GOAT::maths::operator+ | ( | const Vector< double > & | r1, |
| const Vector< long long int > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator+ | ( | const Vector< double > & | r1, |
| const Vector< std::complex< double > > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator+ | ( | const Vector< int > & | r1, |
| const Vector< std::complex< double > > & | r2 ) |
| Vector< double > GOAT::maths::operator+ | ( | const Vector< long long int > & | r1, |
| const Vector< double > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator+ | ( | const Vector< long long int > & | r1, |
| const Vector< std::complex< double > > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator+ | ( | const Vector< std::complex< double > > & | r1, |
| const Vector< double > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator+ | ( | const Vector< std::complex< double > > & | r1, |
| const Vector< int > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator+ | ( | const Vector< std::complex< double > > & | r1, |
| const Vector< long long int > & | r2 ) |
|
inline |
|
inline |
|
inline |
|
inline |
| Matrix< std::complex< double > > GOAT::maths::operator- | ( | const Matrix< double > & | , |
| const Matrix< std::complex< double > > & | ) |
| Matrix< std::complex< double > > GOAT::maths::operator- | ( | const Matrix< std::complex< double > > & | , |
| const Matrix< double > & | ) |
| Vector< double > GOAT::maths::operator- | ( | const Vector< double > & | r1, |
| const Vector< long long int > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator- | ( | const Vector< double > & | r1, |
| const Vector< std::complex< double > > & | r2 ) |
| Vector< long long int > GOAT::maths::operator- | ( | const Vector< int > & | r1, |
| const Vector< long long int > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator- | ( | const Vector< int > & | r1, |
| const Vector< std::complex< double > > & | r2 ) |
| Vector< double > GOAT::maths::operator- | ( | const Vector< long long int > & | r1, |
| const Vector< double > & | r2 ) |
| Vector< long long int > GOAT::maths::operator- | ( | const Vector< long long int > & | r1, |
| const Vector< int > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator- | ( | const Vector< long long int > & | r1, |
| const Vector< std::complex< double > > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator- | ( | const Vector< std::complex< double > > & | r1, |
| const Vector< double > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator- | ( | const Vector< std::complex< double > > & | r1, |
| const Vector< int > & | r2 ) |
| Vector< std::complex< double > > GOAT::maths::operator- | ( | const Vector< std::complex< double > > & | r1, |
| const Vector< long long int > & | r2 ) |
|
inline |
|
inline |
|
inline |
|
inline |
| Matrix< std::complex< double > > GOAT::maths::operator/ | ( | const Matrix< double > & | , |
| const std::complex< double > & | ) |
| Matrix< std::complex< double > > GOAT::maths::operator/ | ( | const Matrix< std::complex< double > > & | , |
| const double & | ) |
| Vector< std::complex< double > > GOAT::maths::operator/ | ( | const Vector< double > & | r, |
| std::complex< double > | x ) |
| Vector< std::complex< double > > GOAT::maths::operator/ | ( | const Vector< int > & | r, |
| std::complex< double > | x ) |
| Vector< std::complex< double > > GOAT::maths::operator/ | ( | const Vector< long long int > & | r, |
| std::complex< double > | x ) |
| Vector< std::complex< double > > GOAT::maths::operator/ | ( | const Vector< std::complex< double > > & | r, |
| double | x ) |
| Vector< std::complex< double > > GOAT::maths::operator/ | ( | const Vector< std::complex< double > > & | r, |
| int | x ) |
| Vector< std::complex< double > > GOAT::maths::operator/ | ( | const Vector< std::complex< double > > & | r, |
| long long int | x ) |
|
inline |
|
inline |
|
inline |
|
inline |
| std::ostream & GOAT::maths::operator<< | ( | std::ostream & | is, |
| const Vector< double > & | r ) |
| std::ostream & GOAT::maths::operator<< | ( | std::ostream & | is, |
| const Vector< int > & | r ) |
| std::ostream & GOAT::maths::operator<< | ( | std::ostream & | is, |
| const Vector< std::complex< double > > & | r ) |
| std::istream & GOAT::maths::operator>> | ( | std::istream & | is, |
| Vector< double > & | r ) |
| std::istream & GOAT::maths::operator>> | ( | std::istream & | is, |
| Vector< int > & | r ) |
| std::istream & GOAT::maths::operator>> | ( | std::istream & | is, |
| Vector< std::complex< double > > & | r ) |
input operator, reads complex vector from file
This function reads the content of a complex vector provided by real and imaginary part of each component
returns a vector with the real parts of the components of the complex vector r
| void GOAT::maths::rotate | ( | Vector< double > & | r, |
| double | phi ) |
Rotation matrix for rotation around the axis a by the angle gamma.
| Matrix< double > GOAT::maths::rotMatrix | ( | double | alpha, |
| double | beta, | ||
| double | gamma ) |
Rotation matrix calculated from rotation around x-axis, y-axis and z-axis.
| alpha | Rotation angle around x-axis |
| beta | Rotation angle around y-axis |
| gamma | Rotation angle around z-axis |
Calculates rotation matrix for a rotation around an axis passing through a given point and pointing in a defined direction.
| n | Point on the axis |
| k | Direction of the axis |
| gamma | Rotation angle |
|
inline |
| Vector< double > GOAT::maths::sphere2cart | ( | double | r, |
| double | theta, | ||
| double | phi ) |
Converts a vector, described by its spherical components ( \((r, \vartheta, \varphi) \)), into a vector in cartesian coordinates.
| r | r-component |
| theta | \((\vartheta\))-component |
| phi | \((\varphi\))-component |
| void GOAT::maths::sphereunitv | ( | Vector< double > & | P, |
| Vector< double > & | er, | ||
| Vector< double > & | etheta, | ||
| Vector< double > & | ephi ) |
| double GOAT::maths::sqr | ( | double | x | ) |
square of x
square of x (i.e. x^2)
| double GOAT::maths::sViereck | ( | Vector< double > | , |
| Vector< double > | , | ||
| Vector< double > | , | ||
| Vector< double > | ) |
| std::complex< double > GOAT::maths::tan | ( | std::complex< double > | z | ) |
| bool GOAT::maths::testnan | ( | double | x | ) |
tests x on NaN
| std::string GOAT::maths::tl | ( | std::string | ) |
Converts string into lowercase This function converts all characters in a string into lower case.
| char * GOAT::maths::toString | ( | char * | S, |
| Vector< double > | P ) |
Converts a double vector into a string.
| S | string in which the components of the vector P will be written. The components will be written in one row, separated by spaces. |
| P | Vector |
| char * GOAT::maths::toString | ( | char * | S, |
| Vector< std::complex< double > > | P ) |
Converts a complex vector into a string.
| S | string in which the components of the vector P will be written. The components (first real part, then imaginary part) will be written in one row, separated by spaces. |
| P | Vector |
| void GOAT::maths::trafo | ( | const Vector< double > & | e0, |
| const Vector< double > & | e1, | ||
| const Vector< double > & | e2, | ||
| Matrix< double > & | H, | ||
| Matrix< double > & | R ) |
Calculates the transformation matrices from the laboratory coordinate system into a local system and vice versa.
| e0 | direction of the first local axis |
| e1 | direction of the second local axis |
| e2 | direction of the third local axis |
| Matrix< double > GOAT::maths::unity | ( | ) |
unity matrix (double precision)