GLAMERDOC++
Gravitational Lensing Code Library
Loading...
Searching...
No Matches
particle_types.h
Go to the documentation of this file.
1//
2// particle_types.h
3// GLAMER
4//
5// Created by Ben Metcalf on 12/11/2018.
6//
10#ifndef particle_types_h
11#define particle_types_h
12
13#include "point.h"
14
32enum class SimFileFormat {
33 glmb
37 ,csv3
38 ,csv4
39 ,csv5
40 ,csv6
41 ,gadget2
42 ,ascii
43};
44
45// Atomic data class for simulation particles with individual sizes and masses
46template<typename T = float>
47struct ParticleType{
48 T &operator[](int i){return x[i];}
49 T *operator*(){return x;}
50 T x[3];
51
52 float Mass;
53 float Size;
54 int type;
55
56 float size(){return Size;}
57 float mass(){return Mass;}
58};
59
60// Atomic data class for simulation particles with individual sizes, masses and velocities
61template<typename T = float>
62struct ParticleTypeV{
63 T &operator[](int i){return x[i];}
64 T *operator*(){return x;}
65 T x[3];
66
67 T v[3];
68
69 float Mass;
70 float Size;
71 int type;
72
73 float size(){return Size;}
74 float mass(){return Mass;}
75};
76
79 float &operator[](int i){return x[i];}
80 float *operator*(){return x;}
81 float x[3];
82
83 static float Mass;
84 static float Size;
85
86 float size(){return ParticleTypeSimple::Size;}
87 float mass(){return ParticleTypeSimple::Mass;}
88};
89
92 float &operator[](int i){return x[i];}
93 float *operator*(){return x;}
94 float x[2];
95
96 float Mass;
97 float Size;
98
99 float size(){return Size;}
100 float mass(){return Mass;}
101};
102
104struct StarType{
105 double &operator[](int i){return x[i];}
106 Point_3d<> operator*(){return x;}
107 Point_3d<> x;
108 float Mass;
109
110 float mass() const {return Mass;}
111 static float size() {return 0;}
112};
113
114
115#endif /* particle_types_h */
SimFileFormat
Definition particle_types.h:32
@ csv6
see above
@ gadget2
Gadget 2 output file format.
@ ascii
the original ascii GLAMER format.
@ csv3
see above
@ csv4
see above
@ csv5
see above
Atomic data class for simulation particles of the same size and mass.
Definition particle_types.h:91
Atomic data class for simulation particles of the same size and mass.
Definition particle_types.h:78
Atomic data class for stars with different masses.
Definition particle_types.h:104