ESyS-Particle  2.3.4
CRotParticle Class Reference

Class for a rotational particle. More...

#include <RotParticle.h>

Inheritance diagram for CRotParticle:
Collaboration diagram for CRotParticle:

Classes

class  exchangeType
 

Public Types

typedef double(CRotParticle::* ScalarFieldFunction) () const
 
typedef Vec3(CRotParticle::* VectorFieldFunction) () const
 
- Public Types inherited from CParticle
typedef double(CParticle::* ScalarFieldFunction) () const
 
typedef Vec3(CParticle::* VectorFieldFunction) () const
 

Public Member Functions

 CRotParticle ()
 
 CRotParticle (const esys::lsm::SimpleParticleData &particleData)
 
 CRotParticle (const CParticle &particle)
 
 CRotParticle (double rad, double mass, const Vec3 &pos, const Vec3 &vel, const Vec3 &force, int id, bool is_dyn, bool is_rot)
 
 CRotParticle (double rad, double mass, const Vec3 &pos, const Vec3 &vel, const Vec3 &force, int id, Quaternion &quat, double inertRot, const Vec3 &moment, const Vec3 &angvel, bool is_dyn, bool is_rot)
 
 CRotParticle (double rad, double mass, const Vec3 &pos, const Vec3 &oldpos, const Vec3 &initpos, const Vec3 &vel, const Vec3 &force, int id, const Quaternion &quat, const Quaternion &initquat, double inertRot, const Vec3 &moment, const Vec3 &angvel, bool is_dyn, bool is_rot)
 
virtual ~CRotParticle ()
 
Vec3 getDisplacement () const
 
void resetDisplacement ()
 
virtual void setDensity (double)
 
const Vec3getAngVel () const
 
Vec3 getAngVelNR () const
 
void setAngVel (const Vec3 &V)
 
Quaternion getInitQuat () const
 
Quaternion getQuat () const
 
void setQuat (const Quaternion &quat)
 
double getInertRot () const
 
void setInertRot (double inertRot)
 
double getInvInertRot () const
 
Vec3 getMoment () const
 
void applyMoment (const Vec3 &)
 
void integrate (double)
 
void integrateTherm (double dt)
 
virtual void thermExpansion ()
 
void zeroForce ()
 
virtual void zeroHeat ()
 
void rescale ()
 
void setCircular (const Vec3 &cv)
 
double getAngularKineticEnergy () const
 
double getLinearKineticEnergy () const
 
double getKineticEnergy () const
 
void writeAsDXLine (ostream &, int slid=0)
 
virtual void setNonDynamic ()
 
virtual void setNonDynamicLinear ()
 
virtual void setNonDynamicRot ()
 
Quaternion getQuatFromRotVec (const Vec3 &vec) const
 
void rotateBy (const Vec3 &vec)
 
void rotateTo (const Vec3 &vec)
 
void print ()
 
virtual void saveSnapShotData (std::ostream &oStream)
 
virtual void saveCheckPointData (std::ostream &oStream)
 
virtual void loadCheckPointData (std::istream &iStream)
 
CRotParticle::exchangeType getExchangeValues ()
 
void setExchangeValues (const CRotParticle::exchangeType &e)
 
template<typename TmplVisitor >
void visit (TmplVisitor &visitor)
 
double sigma_xx_2D () const
 
double sigma_xy_2D () const
 
double sigma_yy_2D () const
 
- Public Member Functions inherited from CParticle
 CParticle ()
 
 CParticle (double, double, const Vec3 &, const Vec3 &, const Vec3 &, int, bool)
 
 CParticle (double, double, const Vec3 &, const Vec3 &, const Vec3 &, const Vec3 &, const Vec3 &, int, bool)
 
 CParticle (const esys::lsm::SimpleParticleData &particleData)
 
virtual ~CParticle ()
 
const Vec3getInitPos () const
 
void setInitPos (const Vec3 &initPos)
 
Vec3 getDisplacement () const
 
Vec3 getTotalDisplacement () const
 
const Vec3getOldPos () const
 
Vec3 getVel () const
 
double getAbsVel () const
 
void setVel (const Vec3 &V)
 
void setMass (double mass)
 
double getMass () const
 
double getInvMass () const
 
Vec3 getForce () const
 
void resetDisplacement ()
 
double getIDField () const
 
double getTagField () const
 
void applyForce (const Vec3 &, const Vec3 &)
 
void moveToRel (const Vec3 &v)
 
double getKineticEnergy () const
 move relative to initial position More...
 
void setFlag (bool b=true)
 
bool isFlagged () const
 
void writeAsDXLine (ostream &, int slid=0)
 
void print ()
 
void rescale ()
 
exchangeType getExchangeValues ()
 
void setExchangeValues (const exchangeType &)
 
void setCircular (const Vec3 &)
 
double sigma_xx_2D () const
 
double sigma_xy_2D () const
 
double sigma_yy_2D () const
 
double sigma_d () const
 
template<typename TmplVisitor >
void visit (TmplVisitor &visitor)
 
- Public Member Functions inherited from CBasicParticle
 CBasicParticle ()
 
 CBasicParticle (const Vec3 &pos, double radius, int id=-1, int tag=-1)
 
 CBasicParticle (const esys::lsm::SimpleParticleData &data)
 
virtual ~CBasicParticle ()
 
Vec3getPPos ()
 
Vec3 getPos () const
 
void setPos (const Vec3 &pos)
 
double getRad () const
 
int getID () const
 
void setID (int id)
 
void moveBy (Vec3 v)
 move relative to current position More...
 
void moveTo (Vec3 v)
 move absolute More...
 
void setRad (double r)
 
void setTag (int t)
 particle tag handling More...
 
int getTag () const
 
bool isValid () const
 
 CBasicParticle ()
 
 CBasicParticle (int, const Vec3 &, double)
 
Vec3getPPos ()
 
Vec3 getPos () const
 
double getRad () const
 
int getID () const
 
void moveBy (Vec3 v)
 
void moveTo (Vec3 v)
 move relative to current position More...
 
void setRad (double r)
 move absolute More...
 
- Public Member Functions inherited from esys::lsm::CheckPointable
 CheckPointable ()
 
virtual ~CheckPointable ()
 

Static Public Member Functions

static int getPackSize ()
 
static ScalarFieldFunction getScalarFieldFunction (const string &)
 
static VectorFieldFunction getVectorFieldFunction (const string &)
 
static void get_type ()
 
- Static Public Member Functions inherited from CParticle
static ScalarFieldFunction getScalarFieldFunction (const string &)
 
static VectorFieldFunction getVectorFieldFunction (const string &)
 
static void get_type ()
 
static void setDo2dCalculations (bool do2dCalculations)
 
static bool getDo2dCalculations ()
 

Protected Member Functions

void setMoment (const Vec3 &moment)
 false if rotational dynamics are switched off More...
 
- Protected Member Functions inherited from CParticle
void setForce (const Vec3 &force)
 

Protected Attributes

Quaternion m_quat
 
Quaternion m_initquat
 
Vec3 m_angVel
 
Vec3 m_moment
 Angular velocity at time t. More...
 
double m_inertRot
 
double m_div_inertRot
 
bool m_is_rot
 
- Protected Attributes inherited from CParticle
Matrix3 m_sigma
 stress tensor. More...
 
Vec3 m_vel
 
Vec3 m_force
 
Vec3 m_oldpos
 position at the time of last neighbor search More...
 
Vec3 m_initpos
 position at time of construction More...
 
Vec3 m_circular_shift
 shift vector if particle is circular image More...
 
double m_mass
 
double m_div_mass
 
bool flag
 
bool m_is_dynamic
 
- Protected Attributes inherited from CBasicParticle
Vec3 m_pos
 position More...
 
double m_rad
 radius More...
 
int m_global_id
 
int m_tag
 
int m_id
 

Friends

class TML_PackedMessageInterface
 
ostream & operator<< (ostream &, const CRotParticle &)
 

Additional Inherited Members

- Static Public Attributes inherited from CBasicParticle
static const CBasicParticle INVALID = CBasicParticle(Vec3::ZERO, 0.0, -1, -1)
 

Detailed Description

Class for a rotational particle.

Member Typedef Documentation

◆ ScalarFieldFunction

typedef double(CRotParticle::* CRotParticle::ScalarFieldFunction) () const

◆ VectorFieldFunction

typedef Vec3(CRotParticle::* CRotParticle::VectorFieldFunction) () const

Constructor & Destructor Documentation

◆ CRotParticle() [1/6]

CRotParticle::CRotParticle ( )

◆ CRotParticle() [2/6]

◆ CRotParticle() [3/6]

CRotParticle::CRotParticle ( const CParticle particle)

◆ CRotParticle() [4/6]

CRotParticle::CRotParticle ( double  rad,
double  mass,
const Vec3 pos,
const Vec3 vel,
const Vec3 force,
int  id,
bool  is_dyn,
bool  is_rot 
)

Construct particle with default rotational orientation. Inertia is calculated from mass & radius. Used from Python interface.

References CParticle::getDo2dCalculations(), m_angVel, m_div_inertRot, m_inertRot, m_initquat, m_is_rot, m_moment, and m_quat.

Here is the call graph for this function:

◆ CRotParticle() [5/6]

CRotParticle::CRotParticle ( double  rad,
double  mass,
const Vec3 pos,
const Vec3 vel,
const Vec3 force,
int  id,
Quaternion quat,
double  inertRot,
const Vec3 moment,
const Vec3 angvel,
bool  is_dyn,
bool  is_rot 
)

Construct particle. Old and initial position are assumed to be identical to current position.

Parameters
radradius
massmass
poscurrent position
velcurrent velocity
forcecurrently applied force
idparticle id
quatparticel quaternion
inertRotinert of rotation
momentcurrently applied tarque
angvelcurrent angular velocity
is_rotrotational dynamics on/off

References CParticle::flag, m_angVel, CParticle::m_circular_shift, m_div_inertRot, m_inertRot, m_initquat, m_is_rot, m_moment, and m_quat.

◆ CRotParticle() [6/6]

CRotParticle::CRotParticle ( double  rad,
double  mass,
const Vec3 pos,
const Vec3 oldpos,
const Vec3 initpos,
const Vec3 vel,
const Vec3 force,
int  id,
const Quaternion quat,
const Quaternion initquat,
double  inertRot,
const Vec3 moment,
const Vec3 angvel,
bool  is_dyn,
bool  is_rot 
)

◆ ~CRotParticle()

virtual CRotParticle::~CRotParticle ( )
inlinevirtual

Member Function Documentation

◆ applyMoment()

void CRotParticle::applyMoment ( const Vec3 moment)
virtual

Apply a moment to a particle at a given position.

Parameters
momenttarque

Reimplemented from CParticle.

References m_moment.

Referenced by CRotBondedInteraction::calcForces(), CRotFrictionInteraction::calcRigidBodyForces(), and CRotFrictionInteraction::calcSimpleForces().

Here is the caller graph for this function:

◆ get_type()

static void CRotParticle::get_type ( )
inlinestatic

◆ getAngularKineticEnergy()

double CRotParticle::getAngularKineticEnergy ( ) const
inline

References m_angVel, and m_inertRot.

Referenced by getKineticEnergy(), and getScalarFieldFunction().

Here is the caller graph for this function:

◆ getAngVel()

◆ getAngVelNR()

Vec3 CRotParticle::getAngVelNR ( ) const
inline

References m_angVel.

Referenced by getVectorFieldFunction().

Here is the caller graph for this function:

◆ getDisplacement()

Vec3 CRotParticle::getDisplacement ( ) const
inline

References CParticle::getDisplacement().

Here is the call graph for this function:

◆ getExchangeValues()

◆ getInertRot()

double CRotParticle::getInertRot ( ) const
inline

References m_inertRot.

Referenced by esys::lsm::RotParticlePy::setAngularAcceleration().

Here is the caller graph for this function:

◆ getInitQuat()

Quaternion CRotParticle::getInitQuat ( ) const
inline

References m_initquat.

◆ getInvInertRot()

double CRotParticle::getInvInertRot ( ) const
inline

References m_div_inertRot.

Referenced by esys::lsm::RotParticlePy::getAngularAcceleration().

Here is the caller graph for this function:

◆ getKineticEnergy()

double CRotParticle::getKineticEnergy ( ) const
inline

References getAngularKineticEnergy(), and getLinearKineticEnergy().

Referenced by getScalarFieldFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLinearKineticEnergy()

double CRotParticle::getLinearKineticEnergy ( ) const
inline

References CParticle::m_mass, and CParticle::m_vel.

Referenced by getKineticEnergy(), and getScalarFieldFunction().

Here is the caller graph for this function:

◆ getMoment()

Vec3 CRotParticle::getMoment ( ) const
inline

References m_moment.

Referenced by esys::lsm::RotParticlePy::getAngularAcceleration().

Here is the caller graph for this function:

◆ getPackSize()

static int CRotParticle::getPackSize ( )
static

◆ getQuat()

◆ getQuatFromRotVec()

Quaternion CRotParticle::getQuatFromRotVec ( const Vec3 vec) const
inline

References Vec3::norm().

Referenced by rotateBy(), and rotateTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getScalarFieldFunction()

◆ getVectorFieldFunction()

CRotParticle::VectorFieldFunction CRotParticle::getVectorFieldFunction ( const string &  name)
static

◆ integrate()

void CRotParticle::integrate ( double  dt)
virtual

Do the time integration for the particle.

Parameters
dtthe time step

Reimplemented from CParticle.

References CParticle::getDo2dCalculations(), CParticle::integrate(), m_angVel, m_div_inertRot, CParticle::m_force, m_is_rot, m_moment, m_quat, Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

◆ integrateTherm()

void CRotParticle::integrateTherm ( double  dt)
inlinevirtual

Reimplemented from CParticle.

◆ loadCheckPointData()

void CRotParticle::loadCheckPointData ( std::istream &  iStream)
virtual

load data saved with CRotParticle::saveCheckPointData

Parameters
iStreamthe input stream

Reimplemented from CParticle.

References CParticle::loadCheckPointData(), m_angVel, m_div_inertRot, m_inertRot, m_is_rot, and m_quat.

Here is the call graph for this function:

◆ print()

void CRotParticle::print ( )
inline

◆ rescale()

void CRotParticle::rescale ( )

References m_quat, Quaternion::return_sca(), Quaternion::return_vec(), Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

◆ resetDisplacement()

void CRotParticle::resetDisplacement ( )
inline

References CParticle::resetDisplacement().

Here is the call graph for this function:

◆ rotateBy()

void CRotParticle::rotateBy ( const Vec3 vec)
inline

References getQuatFromRotVec(), and m_quat.

Here is the call graph for this function:

◆ rotateTo()

void CRotParticle::rotateTo ( const Vec3 vec)
inline

References getQuatFromRotVec(), and m_quat.

Here is the call graph for this function:

◆ saveCheckPointData()

void CRotParticle::saveCheckPointData ( std::ostream &  oStream)
virtual

Save check-point data sufficient for restart

Reimplemented from CParticle.

References getAngVel(), getQuat(), m_inertRot, m_is_rot, and CParticle::saveCheckPointData().

Here is the call graph for this function:

◆ saveSnapShotData()

void CRotParticle::saveSnapShotData ( std::ostream &  oStream)
virtual

Save snapshot data - not neccesarily sufficient for restart

Reimplemented from CParticle.

References getAngVel(), getQuat(), and CParticle::saveSnapShotData().

Here is the call graph for this function:

◆ setAngVel()

void CRotParticle::setAngVel ( const Vec3 V)
inline

References m_angVel.

Referenced by esys::lsm::RotParticlePy::setAngularVelocity().

Here is the caller graph for this function:

◆ setCircular()

void CRotParticle::setCircular ( const Vec3 cv)

set circular shift vector

Parameters
cvthe circular shift vector

References CParticle::setCircular().

Here is the call graph for this function:

◆ setDensity()

void CRotParticle::setDensity ( double  rho)
virtual

set the density of the particle

Reimplemented from CParticle.

References CParticle::getDo2dCalculations(), m_div_inertRot, CParticle::m_div_mass, m_inertRot, CParticle::m_mass, and CBasicParticle::m_rad.

Here is the call graph for this function:

◆ setExchangeValues()

◆ setInertRot()

void CRotParticle::setInertRot ( double  inertRot)
inline

References m_div_inertRot, and m_inertRot.

◆ setMoment()

void CRotParticle::setMoment ( const Vec3 moment)
inlineprotected

false if rotational dynamics are switched off

References m_moment.

Referenced by esys::lsm::RotParticlePy::setAngularAcceleration(), and esys::lsm::RotParticlePy::setAngularForce().

Here is the caller graph for this function:

◆ setNonDynamic()

virtual void CRotParticle::setNonDynamic ( )
inlinevirtual

Reimplemented from CParticle.

References CParticle::m_is_dynamic, and m_is_rot.

◆ setNonDynamicLinear()

virtual void CRotParticle::setNonDynamicLinear ( )
inlinevirtual

Reimplemented from CParticle.

References CParticle::m_is_dynamic.

◆ setNonDynamicRot()

virtual void CRotParticle::setNonDynamicRot ( )
inlinevirtual

Reimplemented from CParticle.

References m_is_rot.

◆ setQuat()

void CRotParticle::setQuat ( const Quaternion quat)
inline

References m_quat.

Referenced by esys::lsm::RotParticlePy::setOrientation().

Here is the caller graph for this function:

◆ sigma_xx_2D()

double CRotParticle::sigma_xx_2D ( ) const
inline

References CBasicParticle::m_rad, and CParticle::m_sigma.

Referenced by getScalarFieldFunction().

Here is the caller graph for this function:

◆ sigma_xy_2D()

double CRotParticle::sigma_xy_2D ( ) const
inline

References CBasicParticle::m_rad, and CParticle::m_sigma.

Referenced by getScalarFieldFunction().

Here is the caller graph for this function:

◆ sigma_yy_2D()

double CRotParticle::sigma_yy_2D ( ) const
inline

References CBasicParticle::m_rad, and CParticle::m_sigma.

Referenced by getScalarFieldFunction().

Here is the caller graph for this function:

◆ thermExpansion()

virtual void CRotParticle::thermExpansion ( )
inlinevirtual

Reimplemented from CParticle.

◆ visit()

template<typename TmplVisitor >
void CRotParticle::visit ( TmplVisitor &  visitor)
inline

◆ writeAsDXLine()

void CRotParticle::writeAsDXLine ( ostream &  ,
int  slid = 0 
)

◆ zeroForce()

void CRotParticle::zeroForce ( )
virtual

zero forces on particle

Reimplemented from CParticle.

References CParticle::m_force, m_moment, and CParticle::m_sigma.

◆ zeroHeat()

virtual void CRotParticle::zeroHeat ( )
inlinevirtual

Reimplemented from CParticle.

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  ost,
const CRotParticle CP 
)
friend

get deviatoric stress

◆ TML_PackedMessageInterface

friend class TML_PackedMessageInterface
friend

Member Data Documentation

◆ m_angVel

◆ m_div_inertRot

◆ m_inertRot

◆ m_initquat

◆ m_is_rot

◆ m_moment

◆ m_quat


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