OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
olb::ElParticle3D< T > Class Template Reference

#include <elParticle3D.h>

+ Inheritance diagram for olb::ElParticle3D< T >:
+ Collaboration diagram for olb::ElParticle3D< T >:

Public Member Functions

 ElParticle3D ()
 
 ElParticle3D (std::vector< T > pos, T mas=1., T rad=1., T charge=1.)
 
 ElParticle3D (std::vector< T > pos, std::vector< T > vel, T mas=1., T rad=1., T charge=1.)
 
 ElParticle3D (const ElParticle3D< T > &p)
 
virtual ~ElParticle3D ()
 
virtual void serialize (T serial[])
 
virtual void unserialize (T *)
 
- Public Member Functions inherited from olb::Particle3D< T >
 Particle3D ()
 
 Particle3D (std::vector< T > pos, T mas=1., T rad=1., int id=0, T masAdd=0.)
 
 Particle3D (std::vector< T > pos, std::vector< T > vel, T mas=1., T rad=1., int id=0, T masAdd=0.)
 
 Particle3D (const Particle3D< T > &p)
 
void setPos (std::vector< T > pos)
 
void setStoredPos (std::vector< T > pos)
 
std::vector< T > & getStoredPos ()
 
std::vector< T > & getPos ()
 
const std::vector< T > & getPos () const
 
void setVel (std::vector< T > vel)
 
void setStoredVel (std::vector< T > vel)
 
std::vector< T > & getStoredVel ()
 
int getID ()
 
void setID (int id)
 
std::vector< T > & getVel ()
 
const std::vector< T > & getVel () const
 
void addForce (std::vector< T > &frc)
 
void setForce (std::vector< T > &frc)
 
void resetForce ()
 
std::vector< T > & getForce ()
 
const std::vector< T > & getForce () const
 
void setStoreForce (std::vector< T > &storeForce)
 
void resetStoreForce ()
 
std::vector< T > & getStoreForce ()
 
const std::vector< T > & getStoreForce () const
 
void serialize (T serial[])
 
void unserialize (T *)
 
void print ()
 
void printDeep (std::string message)
 
const T & getMass ()
 
const T & getAddedMass ()
 
const T & getEffectiveMass ()
 
const T & getInvMass ()
 
const T & getInvEffectiveMass ()
 
const T & getMass () const
 
const T & getAddedMass () const
 
const T & getEffectiveMass () const
 
void setMass (T m)
 
void setAddedMass (T m)
 
const T & getRad ()
 
const T & getRad () const
 
void setRad (T r)
 
const int & getCuboid ()
 
void setCuboid (int c)
 
const bool & getActive ()
 
const bool & getActive () const
 
void setActive (bool act)
 

Public Attributes

_charge
 
- Public Attributes inherited from olb::Particle3D< T >
std::vector< std::pair< size_t, T > > _verletList
 

Static Public Attributes

static const int serialPartSize = 10
 
- Static Public Attributes inherited from olb::Particle3D< T >
static const int serialPartSize = 19
 

Additional Inherited Members

- Protected Attributes inherited from olb::Particle3D< T >
std::vector< T > _pos
 
std::vector< T > _vel
 
std::vector< T > _force
 
_invMas
 
_invMasAdd
 
_invEffectiveMas
 
_effectiveMas
 
_mas
 
_masAdd
 
_rad
 
int _cuboid
 globIC
 
int _id
 
bool _active
 
std::vector< T > _storePos
 
std::vector< T > _storeVel
 
std::vector< T > _storeForce
 

Detailed Description

template<typename T>
class olb::ElParticle3D< T >

Definition at line 41 of file elParticle3D.h.

Constructor & Destructor Documentation

◆ ElParticle3D() [1/4]

template<typename T >
olb::ElParticle3D< T >::ElParticle3D ( )

Definition at line 40 of file elParticle3D.hh.

41 : Particle3D<T>(),
42 _charge(1.)
43{ }

◆ ElParticle3D() [2/4]

template<typename T >
olb::ElParticle3D< T >::ElParticle3D ( std::vector< T > pos,
T mas = 1.,
T rad = 1.,
T charge = 1. )

Definition at line 46 of file elParticle3D.hh.

47 : Particle3D<T>(pos, mas, rad),
48 _charge(charge)
49{ }

◆ ElParticle3D() [3/4]

template<typename T >
olb::ElParticle3D< T >::ElParticle3D ( std::vector< T > pos,
std::vector< T > vel,
T mas = 1.,
T rad = 1.,
T charge = 1. )

Definition at line 52 of file elParticle3D.hh.

54 : Particle3D<T>(pos, vel, mas, rad),
55 _charge(charge)
56{
57}

◆ ElParticle3D() [4/4]

template<typename T >
olb::ElParticle3D< T >::ElParticle3D ( const ElParticle3D< T > & p)

Definition at line 60 of file elParticle3D.hh.

61 : Particle3D<T>(p),
62 _charge(p._charge)
63{ }

◆ ~ElParticle3D()

template<typename T >
virtual olb::ElParticle3D< T >::~ElParticle3D ( )
inlinevirtual

Definition at line 47 of file elParticle3D.h.

47{};

Member Function Documentation

◆ serialize()

template<typename T >
void olb::ElParticle3D< T >::serialize ( T serial[])
virtual

Definition at line 66 of file elParticle3D.hh.

67{
68 serial[0] = this->_pos[0];
69 serial[1] = this->_pos[1];
70 serial[2] = this->_pos[2];
71 serial[3] = this->_vel[0];
72 serial[4] = this->_vel[1];
73 serial[5] = this->_vel[2];
74 serial[6] = this->_rad;
75 serial[7] = this->_mas;
76 serial[8] = (double) this->_active;
77 serial[9] = _charge;
78}
std::vector< T > _vel
Definition particle3D.h:118
std::vector< T > _pos
Definition particle3D.h:117

◆ unserialize()

template<typename T >
void olb::ElParticle3D< T >::unserialize ( T * data)
virtual

Definition at line 81 of file elParticle3D.hh.

82{
83 this->_pos[0] = data[0];
84 this->_pos[1] = data[1];
85 this->_pos[2] = data[2];
86 this->_vel[0] = data[3];
87 this->_vel[1] = data[4];
88 this->_vel[2] = data[5];
89 this->_rad = data[6];
90 this->_mas = data[7];
91 this->_active = (bool) data[8];
92 _charge = data[9];
93}

Member Data Documentation

◆ _charge

template<typename T >
T olb::ElParticle3D< T >::_charge

Definition at line 51 of file elParticle3D.h.

◆ serialPartSize

template<typename T >
const int olb::ElParticle3D< T >::serialPartSize = 10
static

Definition at line 50 of file elParticle3D.h.


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