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

#include <magneticParticle3D.h>

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

Public Member Functions

 MagneticParticle3D ()
 
 MagneticParticle3D (std::vector< T > pos, T mas=1., T rad=1., int id=0)
 
 MagneticParticle3D (std::vector< T > pos, std::vector< T > vel, T mas=1., T rad=1., int id=0, T masAdd=1.)
 
 MagneticParticle3D (const MagneticParticle3D< T > &p)
 
 MagneticParticle3D (std::vector< T > pos, std::vector< T > vel, T mas, T rad, int id, std::vector< T > dMoment, std::vector< T > aVel, std::vector< T > torque, T magnetisation)
 
 MagneticParticle3D (std::vector< T > pos, std::vector< T > vel, T mas, T rad, int id, std::vector< T > dMoment, std::vector< T > aVel, std::vector< T > torque, T magnetisation, int sActivity)
 
void serialize (T serial[])
 
void unserialize (T *)
 
void resetTorque ()
 
void setMoment (std::vector< T > moment)
 
std::vector< T > & getMoment ()
 
const std::vector< T > & getMoment () const
 
void setAVel (std::vector< T > aVel)
 
std::vector< T > & getAVel ()
 
const std::vector< T > & getAVel () const
 
void setTorque (std::vector< T > torque)
 
std::vector< T > & getTorque ()
 
const std::vector< T > & getTorque () const
 
void setMagnetisation (T magnetisation)
 
T & getMagnetisation ()
 
const T & getMagnetisation () const
 
void setSActivity (int sActivity)
 
int & getSActivity ()
 
void setAggloItr (typename std::deque< std::list< MagneticParticle3D< T > * > >::iterator aggloItr)
 
std::deque< std::list< MagneticParticle3D< T > * > >::iterator & getAggloItr ()
 
- 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 = 28
 
- 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::MagneticParticle3D< T >

Definition at line 44 of file magneticParticle3D.h.

Constructor & Destructor Documentation

◆ MagneticParticle3D() [1/6]

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

Definition at line 42 of file magneticParticle3D.hh.

43 : Particle3D<T>::Particle3D(), _dMoment(3, T()), _aVel(3, T()), _torque(3, T()), _magnetisation(T())
44{ }

◆ MagneticParticle3D() [2/6]

template<typename T >
olb::MagneticParticle3D< T >::MagneticParticle3D ( std::vector< T > pos,
T mas = 1.,
T rad = 1.,
int id = 0 )

◆ MagneticParticle3D() [3/6]

template<typename T >
olb::MagneticParticle3D< T >::MagneticParticle3D ( std::vector< T > pos,
std::vector< T > vel,
T mas = 1.,
T rad = 1.,
int id = 0,
T masAdd = 1. )

Definition at line 52 of file magneticParticle3D.hh.

54 : Particle3D<T>::Particle3D(pos, vel, mas, rad), _dMoment(3, T()), _aVel(3, T()), _torque(3, T()), _magnetisation(T())
55{ }

◆ MagneticParticle3D() [4/6]

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

Definition at line 47 of file magneticParticle3D.hh.

48 : Particle3D<T>::Particle3D(p), _dMoment(p._dMoment), _aVel(p._aVel), _torque(p._torque), _magnetisation(p._magnetisation), _sActivity(p._sActivity)
49{ }

◆ MagneticParticle3D() [5/6]

template<typename T >
olb::MagneticParticle3D< T >::MagneticParticle3D ( std::vector< T > pos,
std::vector< T > vel,
T mas,
T rad,
int id,
std::vector< T > dMoment,
std::vector< T > aVel,
std::vector< T > torque,
T magnetisation )

Definition at line 58 of file magneticParticle3D.hh.

60 : Particle3D<T>::Particle3D(pos, vel, mas, rad, id),
61 _dMoment(dMoment), _aVel(aVel), _torque(torque), _magnetisation(magnetisation)
62{ }

◆ MagneticParticle3D() [6/6]

template<typename T >
olb::MagneticParticle3D< T >::MagneticParticle3D ( std::vector< T > pos,
std::vector< T > vel,
T mas,
T rad,
int id,
std::vector< T > dMoment,
std::vector< T > aVel,
std::vector< T > torque,
T magnetisation,
int sActivity )

Definition at line 65 of file magneticParticle3D.hh.

67 : Particle3D<T>::Particle3D(pos, vel, mas, rad, id),
68 _dMoment(dMoment), _aVel(aVel), _torque(torque), _magnetisation(magnetisation), _sActivity(sActivity)
69{ }

Member Function Documentation

◆ getAggloItr()

template<typename T >
std::deque< std::list< MagneticParticle3D< T > * > >::iterator & olb::MagneticParticle3D< T >::getAggloItr ( )
inline

Definition at line 135 of file magneticParticle3D.hh.

136{
137 return _aggloItr;
138}
+ Here is the caller graph for this function:

◆ getAVel() [1/2]

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

Definition at line 104 of file magneticParticle3D.hh.

105{
106 return _aVel;
107}

◆ getAVel() [2/2]

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

Definition at line 110 of file magneticParticle3D.hh.

111{
112 return _aVel;
113}

◆ getMagnetisation() [1/2]

template<typename T >
T & olb::MagneticParticle3D< T >::getMagnetisation ( )
inline

Definition at line 159 of file magneticParticle3D.hh.

160{
161 return _magnetisation;
162}

◆ getMagnetisation() [2/2]

template<typename T >
const T & olb::MagneticParticle3D< T >::getMagnetisation ( ) const
inline

Definition at line 165 of file magneticParticle3D.hh.

166{
167 return _magnetisation;
168}

◆ getMoment() [1/2]

template<typename T >
std::vector< T > & olb::MagneticParticle3D< T >::getMoment ( )
inline

Definition at line 80 of file magneticParticle3D.hh.

81{
82 return _dMoment;
83}

◆ getMoment() [2/2]

template<typename T >
const std::vector< T > & olb::MagneticParticle3D< T >::getMoment ( ) const
inline

Definition at line 86 of file magneticParticle3D.hh.

87{
88 return _dMoment;
89}

◆ getSActivity()

template<typename T >
int & olb::MagneticParticle3D< T >::getSActivity ( )
inline

Definition at line 171 of file magneticParticle3D.hh.

172{
173 return MagneticParticle3D<T>::_sActivity;
174}
+ Here is the caller graph for this function:

◆ getTorque() [1/2]

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

Definition at line 147 of file magneticParticle3D.hh.

148{
149 return _torque;
150}

◆ getTorque() [2/2]

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

Definition at line 153 of file magneticParticle3D.hh.

154{
155 return _torque;
156}

◆ resetTorque()

template<typename T >
void olb::MagneticParticle3D< T >::resetTorque ( )
inline

Definition at line 72 of file magneticParticle3D.hh.

73{
74 for (int i = 0; i < 3; i++) {
75 _torque[i] = 0.;
76 }
77}

◆ serialize()

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

Definition at line 177 of file magneticParticle3D.hh.

178{
179 for (int i = 0; i < 3; i++) {
180 serial[i] = this->_pos[i];
181 serial[i + 3] = this->_vel[i];
182 serial[i + 6] = this->_force[i];
183 }
184 serial[9] = this->_mas;
185 serial[10] = this->_rad;
186 serial[11] = (double) this->_cuboid;
187 serial[12] = (double) this->_active;
188 serial[13] = (double) this->_id;
189 for (int i = 0; i < 3; i++) {
190 serial[i + 14] = this->_storeForce[i];
191 serial[i + 17] = _dMoment[i];
192 serial[i + 20] = _aVel[i];
193 serial[i + 23] = _torque[i];
194 }
195 serial[26] = _magnetisation;
196 serial[27] = (double) _sActivity;
197}
std::vector< T > _vel
Definition particle3D.h:118
std::vector< T > _pos
Definition particle3D.h:117
std::vector< T > _force
Definition particle3D.h:119
std::vector< T > _storeForce
Definition particle3D.h:133
int _cuboid
globIC
Definition particle3D.h:128

◆ setAggloItr()

template<typename T >
void olb::MagneticParticle3D< T >::setAggloItr ( typename std::deque< std::list< MagneticParticle3D< T > * > >::iterator aggloItr)
inline

Definition at line 141 of file magneticParticle3D.hh.

142{
143 _aggloItr = aggloItr;
144}
+ Here is the caller graph for this function:

◆ setAVel()

template<typename T >
void olb::MagneticParticle3D< T >::setAVel ( std::vector< T > aVel)
inline

Definition at line 98 of file magneticParticle3D.hh.

99{
100 _aVel = aVel;
101}

◆ setMagnetisation()

template<typename T >
void olb::MagneticParticle3D< T >::setMagnetisation ( T magnetisation)
inline

Definition at line 122 of file magneticParticle3D.hh.

123{
124 _magnetisation = magnetisation;
125 //std::cout<< "Setting magnetisation: "<< _magnetisation << std::endl;
126}

◆ setMoment()

template<typename T >
void olb::MagneticParticle3D< T >::setMoment ( std::vector< T > moment)
inline

Definition at line 92 of file magneticParticle3D.hh.

93{
94 _dMoment = moment;
95}

◆ setSActivity()

template<typename T >
void olb::MagneticParticle3D< T >::setSActivity ( int sActivity)
inline

Definition at line 129 of file magneticParticle3D.hh.

130{
131 _sActivity = sActivity;
132}
+ Here is the caller graph for this function:

◆ setTorque()

template<typename T >
void olb::MagneticParticle3D< T >::setTorque ( std::vector< T > torque)
inline

Definition at line 116 of file magneticParticle3D.hh.

117{
118 _torque = torque;
119}

◆ unserialize()

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

Definition at line 200 of file magneticParticle3D.hh.

201{
202 for (int i = 0; i < 3; i++) {
203 this->_pos[i] = data[i];
204 this->_vel[i] = data[i + 3];
205 this->_force[i] = data[i + 6];
206 }
207 this->_mas = data[9];
208 this->_rad = data[10];
209 this->_cuboid = (int) data[11];
210 this->_active = (bool) data[12];
211 this->_id = (int) data[13];
212 for (int i = 0; i < 3; i++) {
213 this->_storeForce[i] = data[i + 14];
214 _dMoment[i] = data[i + 17];
215 _aVel[i] = data[i + 20];
216 _torque[i] = data[i + 23];
217 }
218 _magnetisation = data[26];
219 _sActivity = (int) data[27];
220}

Member Data Documentation

◆ serialPartSize

template<typename T >
const int olb::MagneticParticle3D< T >::serialPartSize = 28
static

Definition at line 79 of file magneticParticle3D.h.


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