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

#include <rotatingParticle3D.h>

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

Public Member Functions

 RotatingParticle3D ()
 
 RotatingParticle3D (std::vector< T > pos, T mas=1., T rad=1.)
 
 RotatingParticle3D (std::vector< T > pos, std::vector< T > vel, T mas=1., T rad=1.)
 
 RotatingParticle3D (const RotatingParticle3D< T > &p)
 
std::vector< T > & getAVel ()
 
const std::vector< T > & getAVel () const
 
std::vector< T > & getTorque ()
 
const std::vector< T > & getTorque () const
 
void serialize (T serial[])
 
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)
 

Static Public Attributes

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

Additional Inherited Members

- Public Attributes inherited from olb::Particle3D< T >
std::vector< std::pair< size_t, T > > _verletList
 
- 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::RotatingParticle3D< T >

Definition at line 44 of file rotatingParticle3D.h.

Constructor & Destructor Documentation

◆ RotatingParticle3D() [1/4]

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

Definition at line 40 of file rotatingParticle3D.hh.

41 : Particle3D<T>::Particle3D(), _aVel(3, T()), _torque(3, T())
42{ }

◆ RotatingParticle3D() [2/4]

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

Definition at line 45 of file rotatingParticle3D.hh.

46 : Particle3D<T>::Particle3D(pos, mas, rad), _aVel(3, T()), _torque(3, T())
47{ }

◆ RotatingParticle3D() [3/4]

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

Definition at line 55 of file rotatingParticle3D.hh.

57 : Particle3D<T>::Particle3D(pos, vel, mas, rad), _aVel(3, T()), _torque(3, T())
58{ }

◆ RotatingParticle3D() [4/4]

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

Definition at line 50 of file rotatingParticle3D.hh.

51 : Particle3D<T>::Particle3D(p), _aVel(p.getAVel()), _torque(p._torque)
52{ }

Member Function Documentation

◆ getAVel() [1/2]

template<typename T >
std::vector< T > & olb::RotatingParticle3D< T >::getAVel ( )
inline

Definition at line 61 of file rotatingParticle3D.hh.

62{
63 return _aVel;
64}

◆ getAVel() [2/2]

template<typename T >
const std::vector< T > & olb::RotatingParticle3D< T >::getAVel ( ) const
inline

Definition at line 67 of file rotatingParticle3D.hh.

68{
69 return _aVel;
70}

◆ getTorque() [1/2]

template<typename T >
std::vector< T > & olb::RotatingParticle3D< T >::getTorque ( )
inline

Definition at line 73 of file rotatingParticle3D.hh.

74{
75 return _torque;
76}

◆ getTorque() [2/2]

template<typename T >
const std::vector< T > & olb::RotatingParticle3D< T >::getTorque ( ) const
inline

Definition at line 79 of file rotatingParticle3D.hh.

80{
81 return _torque;
82}

◆ serialize()

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

Definition at line 85 of file rotatingParticle3D.hh.

86{
87 for (int i = 0; i < 3; i++) {
88 serial[i] = this->_pos[i];
89 serial[i + 3] = this->_vel[i];
90 serial[i + 6] = this->_force[i];
91 }
92 serial[9] = this->_mas;
93 serial[10] = this->_rad;
94 serial[11] = this->_cuboid;
95 serial[12] = (double) this->_active;
96 serial[13] = (double) _aVel[0];
97 serial[14] = (double) _aVel[1];
98 serial[15] = (double) _aVel[2];
99 serial[16] = (double) _torque[0];
100 serial[17] = (double) _torque[1];
101 serial[18] = (double) _torque[2];
102}
std::vector< T > _vel
Definition particle3D.h:118
std::vector< T > _pos
Definition particle3D.h:117
std::vector< T > _force
Definition particle3D.h:119
int _cuboid
globIC
Definition particle3D.h:128

◆ unserialize()

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

Definition at line 105 of file rotatingParticle3D.hh.

106{
107 for (int i = 0; i < 3; i++) {
108 this->_pos[i] = data[i];
109 this->_vel[i] = data[i + 3];
110 this->_force[i] = data[i + 6];
111 }
112 this->_mas = data[9];
113 this->_rad = data[10];
114 this->_cuboid = int(data[11]);
115 this->_active = (bool) data[12];
116 _aVel[0] = (bool) data[13];
117 _aVel[1] = (bool) data[14];
118 _aVel[2] = (bool) data[15];
119 _torque[0] = (bool) data[16];
120 _torque[1] = (bool) data[17];
121 _torque[2] = (bool) data[18];
122}

Member Data Documentation

◆ serialPartSize

template<typename T >
const int olb::RotatingParticle3D< T >::serialPartSize = 19
static

Definition at line 57 of file rotatingParticle3D.h.


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