Class Particles¶
Defined in File particle.hpp
Class Documentation¶
-
class Particles¶
Class to store particles data of a single species.
Public Functions
-
Particles()¶
-
Particles(input::InputParticles input_particle)¶
-
Particles(int npar)¶
-
Particles(int npar, int npar_max)¶
-
~Particles()¶
-
void AddID(int offset)¶
Add an integer offset to the particle ID.
- Parameters:
offset – Offset to be added
-
void CleanOut()¶
Function to clean up particles that are outside of the domain with ParticleStatus::Out status.
-
inline double *data_double(int i)¶
Helper function to iterate over double data arrays for HDF5 output.
Currently the index
irepresents the following data arrays:iData array
Description
0
xParticle \(x_i\) coordinate
1
yParticle \(y_i\) coordinate
2
zParticle \(z_i\) coordinate
3
uParticle \(v_{x, i}\) velocity
4
vParticle \(v_{y, i}\) velocity
5
wParticle \(v_{z, i}\) velocity
- Parameters:
i – Index of the data array
- Returns:
constexpr double* Pointer to the data array
-
inline ulong *data_uint32(int i)¶
Helper function to iterate over ulong data arrays for HDF5 output.
Currently the index
irepresents the following data arrays:iData array
Description
0
idParticle ID
1
statusParticle status
- Parameters:
i – Index of the data array
- Returns:
constexpr ulong* Pointer to the data array
-
void pswap(const int i, const int j)¶
Swap two particles data.
- Parameters:
i – Index of the first particle
j – Index of the second particle
-
void resize(int new_npar_max)¶
Resize the size of data arrays.
- Parameters:
new_npar_max – New maximum number of particles
Friends
-
Particles()¶