GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
vortex.h
Go to the documentation of this file.
1#pragma once
2#include "objectshape.h"
3namespace GOAT
4{
5 namespace raytracing
6 {
12 public ObjectShape
13 {
14 public:
20 double r,
21 double h,
22 double dh,
23 int m,
24 std::complex<double> n,
25 double r0 = 1.0,
26 const maths::Matrix<std::complex<double> > alpha = maths::CUNITY,
27 const maths::Vector<double>& Ex = maths::ex,
28 const maths::Vector<double>& Ey = maths::ey,
29 const maths::Vector<double>& Ez = maths::ez
30 );
31 double radius() { return r; }
32 double height() { return h; }
33 void setRadius(double r);
34 void setHeight(double h);
35 void setr0(double r0);
36 void setm(int m);
37 void binWrite(std::ofstream& os);
38 void binRead(std::ifstream& is);
41 double volume();
42 void initQuad();
46 void setPos(double x, double y, double z) { P = maths::Vector<double>(x, y, z); };
51 void scale(double sf);
52 int order() {return m;}
53 double vortexHeight() {return dh; }
54 protected :
55 double h = 1.0;
56 double r = 1.0;
57 int m = 1;
58 double dh = 1.0;
59
60 };
61 }
62}
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
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
bool isInside(const maths::Vector< double > &p)
checks if point P is inside the object
void setPos(double x, double y, double z)
sets reference point P
Definition vortex.h:46
int order()
returns the order (~topological charge)
Definition vortex.h:52
double volume()
Calculates the volume of the ellipsoid.
maths::Matrix< double > computeInertia()
Calculates the inertia matrix of the ellipsoid.
void binWrite(std::ofstream &os)
binary writing to file
void setr0(double r0)
set the radius of the calculation space
maths::Vector< double > norm(const maths::Vector< double > &p)
surface normal at the point P
void binRead(std::ifstream &is)
binary reading from file
double h
height of the vortex (without vortex structure)
Definition vortex.h:55
void setm(int m)
set the topological charge
void initQuad()
Sets the circumscribing cuboid (for use in inelastic calculations)
VortexPlate & operator=(VortexPlate &f)
maths::Vector< double > calcCoM()
Calculates the center of mass, which is in the case of an ellipsoid simply its center,...
Definition vortex.h:43
double dh
height of the vortex structure
Definition vortex.h:58
void setPos(maths::Vector< double > r)
sets reference point P
Definition vortex.h:45
VortexPlate(const maths::Vector< double > &P, double r, double h, double dh, int m, std::complex< double > n, double r0=1.0, const 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)
int m
topological charge of the vortex
Definition vortex.h:57
void scale(double sf)
Set the scaling factor (the half axis will be multiplied by this factor)
bool next(const maths::Vector< double > &Ps, const maths::Vector< double > &K, maths::Vector< double > &pout)
searches for the next (nearest) intersection of a ray with the object, p: current position of the ray...
double vortexHeight()
returns the height of the vortex structure
Definition vortex.h:53
double r
radius of the vortex
Definition vortex.h:56
VortexPlate(ObjectShape &os)
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