GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
grid.h
Go to the documentation of this file.
1
5
6#ifndef __grid_H__
7#define __grid_H__
8
9#include <complex>
10#include "vector.h"
11#include "resutil.h"
12
13namespace GOAT
14{
15 namespace raytracing
16 {
22 class grid
23 {
24
25 maths::Vector <std::complex<double> > ****gridarray;
26 maths::Vector <std::complex<double> > ****newarray();
27 void delarray();
28
35 int isInside(int ix, int iy, int iz,double x0, double y0, double z0, double r0);
40 int isInside(int ix, int iy, int iz, maths::Vector<double> P, double r0);
41
42 double dx2, dy2, dz2;
43
44 public:
45
46 double rP;
48 double xmax, ymax, zmax, dx, dy, dz;
50
52 grid(int nx, int ny, int nz, double xmax, double ymax, double zmax);
53 grid(int nx, int ny, int nz, double r);
54
56
59
60 grid& operator= (const grid& g);
61
62 // Initialisiert ein grid mit anzein Einschluessen, die in ein
63 // stehen
64 void init_grid(objectInfo *ein, int anzein);
65
66 // Erzeugt leeres grid
67 void init_grid();
68
69 // Ausgabe des grids auf Standardausgabe
70 void show_grid();
71
72 // Ausgabe des grids in Datei fname
73 void show_grid(char* fname);
74
75 // Gibt die Koordinaten der gridzelle aus, in der der Punkt mit
76 // den Koordinaten x0, y0 und z0 liegt
77 maths::Vector<int> gridpunkt(double x0, double y0, double z0);
79 // Testet, ob die gridzelle ix, iy, iz innerhalb des Partikels liegt
80 int in_kugel(int ix, int iy, int iz);
81
82 // Testet, ob die gridzelle ix, iy, iz innerhalb des Einschlusses ein
83 // liegt
84 int inObject(int ix, int iy, int iz, objectInfo ein);
85
86 void set_parms(int nx, int ny, int nz, int xmax, int ymax, int zmax);
87 };
88 }
89}
90#endif /* __grid_H__ */
Template class for threedimensional vectors.
Definition vector.h:57
maths::Vector< std::complex< double > > & operator()(int i, int j, int k)
double dz2
dx2, dy2, dz2 half of the side length in x-, y- and z-direction
Definition grid.h:42
maths::Vector< std::complex< double > > **** newarray()
int isInside(int ix, int iy, int iz, double x0, double y0, double z0, double r0)
Function for testing of inside Tests, if the cell with indices ix, iy and iz lies inside a sphere of ...
maths::Vector< int > gridpunkt(maths::Vector< double > &P)
grid(int nx, int ny, int nz, double r)
grid & operator=(const grid &g)
void set_parms(int nx, int ny, int nz, int xmax, int ymax, int zmax)
int isInside(int ix, int iy, int iz, maths::Vector< double > P, double r0)
Function for testing of inside Tests, if the cell with indices ix, iy and iz lies inside a sphere of ...
void init_grid(objectInfo *ein, int anzein)
maths::Vector< int > gridpunkt(double x0, double y0, double z0)
void show_grid(char *fname)
int inObject(int ix, int iy, int iz, objectInfo ein)
maths::Vector< std::complex< double > > DUMMY
Definition grid.h:49
grid(int nx, int ny, int nz, double xmax, double ymax, double zmax)
maths::Vector< std::complex< double > > **** gridarray
Definition grid.h:25
int in_kugel(int ix, int iy, int iz)
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
This file contains the Vector template class and some useful functions around this class.