Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Particle_v< T > Class Template Reference

class handling particles (position only) More...

#include <class_particles.hpp>

Inheritance diagram for Particle_v< T >:
Collaboration diagram for Particle_v< T >:

Public Member Functions

 Particle_v ()
 
template<typename U , typename V >
 Particle_v (Vec_3D< U > position, Vec_3D< V > velocity)
 
T & operator() (unsigned int i)
 
const T & operator() (unsigned int i) const
 
- Public Member Functions inherited from Particle_x< T >
 Particle_x ()
 
template<typename U >
 Particle_x (Vec_3D< U > position)
 
T & operator[] (unsigned int i)
 get position coordinates More...
 
const T & operator[] (unsigned int i) const
 

Public Attributes

Vec_3D< T > velocity
 
- Public Attributes inherited from Particle_x< T >
Vec_3D< T > position
 

Detailed Description

template<typename T>
class Particle_v< T >

class handling particles (position only)

Template Parameters
Tcoordinate type (float, double or long double)

operator [] to get position coordinates operator () to get velocity coordinates

Definition at line 55 of file class_particles.hpp.

Constructor & Destructor Documentation

template<typename T>
Particle_v< T >::Particle_v ( )
inline

Definition at line 59 of file class_particles.hpp.

59 {};
template<typename T>
template<typename U , typename V >
Particle_v< T >::Particle_v ( Vec_3D< U >  position,
Vec_3D< V >  velocity 
)
inline

Definition at line 61 of file class_particles.hpp.

61  :
62  Particle_x<T>(position), velocity(velocity) {};
class handling particles (position only)
Vec_3D< T > position
Vec_3D< T > velocity

Member Function Documentation

template<typename T>
T& Particle_v< T >::operator() ( unsigned int  i)
inline

Definition at line 68 of file class_particles.hpp.

68 { return velocity[i]; }
Vec_3D< T > velocity
template<typename T>
const T& Particle_v< T >::operator() ( unsigned int  i) const
inline

Definition at line 69 of file class_particles.hpp.

69 { return velocity[i]; }
Vec_3D< T > velocity

Member Data Documentation

template<typename T>
Vec_3D<T> Particle_v< T >::velocity

Definition at line 62 of file class_particles.hpp.


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