ESyS-Particle  4.0.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CRotParticle Class Reference

Class for a rotational particle. More...

#include <RotParticle.h>

Inheritance diagram for CRotParticle:
Inheritance graph
[legend]
Collaboration diagram for CRotParticle:
Collaboration graph
[legend]

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 (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)
Vec3 getDisplacement () const
void resetDisplacement ()
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
 move relative to initial position
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 (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)
const Vec3getInitPos () const
void setInitPos (const Vec3 &initPos)
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
virtual void setDensity (double)
double getIDField () const
double getTagField () const
void applyForce (const Vec3 &, const Vec3 &)
void moveToRel (const Vec3 &v)
void setFlag (bool b=true)
bool isFlagged () const
void setExchangeValues (const exchangeType &)
double sigma_d () const
- Public Member Functions inherited from CBasicParticle
 CBasicParticle (const Vec3 &pos, double radius, int id=-1, int tag=-1)
 CBasicParticle (const esys::lsm::SimpleParticleData &data)
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
void moveTo (Vec3 v)
 move absolute
void setRad (double r)
void setTag (int t)
 particle tag handling
int getTag () const
bool isValid () const

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 void setDo2dCalculations (bool do2dCalculations)
static bool getDo2dCalculations ()

Protected Member Functions

void setMoment (const Vec3 &moment)
 false if rotational dynamics are switched off
- 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.
double m_inertRot
double m_div_inertRot
bool m_is_rot
- Protected Attributes inherited from CParticle
Matrix3 m_sigma
 stress tensor.
Vec3 m_vel
Vec3 m_force
Vec3 m_oldpos
 position at the time of last neighbor search
Vec3 m_initpos
 position at time of construction
Vec3 m_circular_shift
 shift vector if particle is circular image
double m_mass
double m_div_mass
bool flag
bool m_is_dynamic
- Protected Attributes inherited from CBasicParticle
Vec3 m_pos
 position
double m_rad
 radius
int m_global_id
int m_tag

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.

Constructor & Destructor Documentation

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 m_moment.

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::m_circular_shift, and m_moment.

Member Function Documentation

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 CRotFrictionInteraction::calcRigidBodyForces(), and CRotFrictionInteraction::calcSimpleForces().

Here is the caller graph for this function:

CRotParticle::exchangeType CRotParticle::getExchangeValues ( )

get values to be exchanged, i.e. pos and vel

Reimplemented from CParticle.

References CParticle::m_circular_shift, CParticle::m_initpos, and CBasicParticle::m_pos.

CRotParticle::ScalarFieldFunction CRotParticle::getScalarFieldFunction ( const string &  name)
static

Get the particle member function which returns a scalar field of a given name.

Parameters
namethe name of the field

Reimplemented from CParticle.

References getKineticEnergy(), and CParticle::sigma_d().

Here is the call graph for this function:

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

Get the particle member function which returns a vector field of a given name.

Parameters
namethe name of the field

Reimplemented from CParticle.

void CRotParticle::integrate ( double  dt)
virtual

Do the time integration for the particle.

Parameters
dtthe time step

Reimplemented from CParticle.

References m_moment.

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

load data saved with CRotParticle::saveCheckPointData

Parameters
iStreamthe input stream

Reimplemented from CParticle.

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

Save check-point data sufficient for restart

Reimplemented from CParticle.

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

Save snapshot data - not neccesarily sufficient for restart

Reimplemented from CParticle.

void CRotParticle::setCircular ( const Vec3 cv)

set circular shift vector

Parameters
cvthe circular shift vector

Reimplemented from CParticle.

void CRotParticle::setExchangeValues ( const CRotParticle::exchangeType e)

Set pos, vel and angular vel from exchangeType

Parameters
Ethe exchanged values

References CParticle::m_circular_shift, CParticle::m_initpos, and CBasicParticle::m_pos.

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

write particle data as a line in openDX format into a stream(file)

Parameters
ostthe output stream
slidfrom which sublattice the particle is coming

Reimplemented from CParticle.

void CRotParticle::zeroForce ( )
virtual

zero forces on particle

Reimplemented from CParticle.

References m_moment, and CParticle::m_sigma.

Friends And Related Function Documentation

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

get deviatoric stress


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