FML
Loading...
Searching...
No Matches
COLAParticle< NDIM > Struct Template Reference

Example of a particle for COLA N-body simulations that is compatible with the make IC and N-body methods If you only want 1LPT then simply remove all 2LPT stuff below The types used below can be changed (automatically inferred by algorithms) More...

#include <SimpleParticle.h>

Public Member Functions

long long int get_id () const
 Get the ID of the particle.
 
void set_id (long long int _id)
 Set the ID of the particle.
 
constexpr int get_ndim () const
 Get the dimension of the position.
 
double * get_pos ()
 Get a pointer to the position of the particle.
 
double * get_vel ()
 Get a pointer to the velocity of the particle.
 
double * get_q ()
 Get a pointer to the Lagrangian position of the particle.
 
double * get_D_1LPT ()
 Get a pointer to the initial 1LPT displacement field at the particles initial position.
 
double * get_D_2LPT ()
 Get a pointer to the initial 2LPT displacement field at the particles initial position.
 
double * get_D_3LPTa ()
 Get a pointer to the initial 3LPTa displacement field at the particles initial position.
 
double * get_D_3LPTb ()
 Get a pointer to the initial 3LPTb displacement field at the particles initial position.
 

Data Fields

double Pos [NDIM]
 Position.
 
double q [NDIM]
 Lagrangian Position.
 
double Vel [NDIM]
 Velocity.
 
double D_1LPT [NDIM]
 1LPT displacement vector
 
double D_2LPT [NDIM]
 2LPT displacement vector
 
double D_3LPTa [NDIM]
 3LPTa displacement vector
 
double D_3LPTb [NDIM]
 3LPTb displacement vector
 
long long int id
 ID of the particle.
 

Detailed Description

template<int NDIM>
struct COLAParticle< NDIM >

Example of a particle for COLA N-body simulations that is compatible with the make IC and N-body methods If you only want 1LPT then simply remove all 2LPT stuff below The types used below can be changed (automatically inferred by algorithms)

Definition at line 29 of file SimpleParticle.h.

Member Function Documentation

◆ get_D_1LPT()

template<int NDIM>
double * COLAParticle< NDIM >::get_D_1LPT ( )
inline

Get a pointer to the initial 1LPT displacement field at the particles initial position.

Definition at line 61 of file SimpleParticle.h.

61{ return D_1LPT; }
double D_1LPT[NDIM]
1LPT displacement vector

◆ get_D_2LPT()

template<int NDIM>
double * COLAParticle< NDIM >::get_D_2LPT ( )
inline

Get a pointer to the initial 2LPT displacement field at the particles initial position.

Definition at line 63 of file SimpleParticle.h.

63{ return D_2LPT; }
double D_2LPT[NDIM]
2LPT displacement vector

◆ get_D_3LPTa()

template<int NDIM>
double * COLAParticle< NDIM >::get_D_3LPTa ( )
inline

Get a pointer to the initial 3LPTa displacement field at the particles initial position.

Definition at line 65 of file SimpleParticle.h.

65{ return D_3LPTa; }
double D_3LPTa[NDIM]
3LPTa displacement vector

◆ get_D_3LPTb()

template<int NDIM>
double * COLAParticle< NDIM >::get_D_3LPTb ( )
inline

Get a pointer to the initial 3LPTb displacement field at the particles initial position.

Definition at line 67 of file SimpleParticle.h.

67{ return D_3LPTb; }
double D_3LPTb[NDIM]
3LPTb displacement vector

◆ get_id()

template<int NDIM>
long long int COLAParticle< NDIM >::get_id ( ) const
inline

Get the ID of the particle.

Definition at line 49 of file SimpleParticle.h.

49{ return id; }
long long int id
ID of the particle.

◆ get_ndim()

template<int NDIM>
int COLAParticle< NDIM >::get_ndim ( ) const
inlineconstexpr

Get the dimension of the position.

Definition at line 53 of file SimpleParticle.h.

53{ return NDIM; }
const int NDIM

◆ get_pos()

template<int NDIM>
double * COLAParticle< NDIM >::get_pos ( )
inline

Get a pointer to the position of the particle.

Definition at line 55 of file SimpleParticle.h.

55{ return Pos; }
double Pos[NDIM]
Position.

◆ get_q()

template<int NDIM>
double * COLAParticle< NDIM >::get_q ( )
inline

Get a pointer to the Lagrangian position of the particle.

Definition at line 59 of file SimpleParticle.h.

59{ return q; }
double q[NDIM]
Lagrangian Position.

◆ get_vel()

template<int NDIM>
double * COLAParticle< NDIM >::get_vel ( )
inline

Get a pointer to the velocity of the particle.

Definition at line 57 of file SimpleParticle.h.

57{ return Vel; }
double Vel[NDIM]
Velocity.

◆ set_id()

template<int NDIM>
void COLAParticle< NDIM >::set_id ( long long int _id)
inline

Set the ID of the particle.

Definition at line 51 of file SimpleParticle.h.

51{ id = _id; }

Field Documentation

◆ D_1LPT

template<int NDIM>
double COLAParticle< NDIM >::D_1LPT[NDIM]

1LPT displacement vector

Definition at line 38 of file SimpleParticle.h.

◆ D_2LPT

template<int NDIM>
double COLAParticle< NDIM >::D_2LPT[NDIM]

2LPT displacement vector

Definition at line 40 of file SimpleParticle.h.

◆ D_3LPTa

template<int NDIM>
double COLAParticle< NDIM >::D_3LPTa[NDIM]

3LPTa displacement vector

Definition at line 42 of file SimpleParticle.h.

◆ D_3LPTb

template<int NDIM>
double COLAParticle< NDIM >::D_3LPTb[NDIM]

3LPTb displacement vector

Definition at line 44 of file SimpleParticle.h.

◆ id

template<int NDIM>
long long int COLAParticle< NDIM >::id

ID of the particle.

Definition at line 46 of file SimpleParticle.h.

◆ Pos

template<int NDIM>
double COLAParticle< NDIM >::Pos[NDIM]

Position.

Definition at line 32 of file SimpleParticle.h.

◆ q

template<int NDIM>
double COLAParticle< NDIM >::q[NDIM]

Lagrangian Position.

Definition at line 34 of file SimpleParticle.h.

◆ Vel

template<int NDIM>
double COLAParticle< NDIM >::Vel[NDIM]

Velocity.

Definition at line 36 of file SimpleParticle.h.


The documentation for this struct was generated from the following file: