ESyS-Particle  2.3.4
CRotElasticInteraction Class Reference

Elastic Interaction between free rotational particles. More...

#include <RotElasticInteraction.h>

Inheritance diagram for CRotElasticInteraction:
Collaboration diagram for CRotElasticInteraction:

Public Types

typedef double(CRotElasticInteraction::* ScalarFieldFunction) () const
 
typedef pair< bool, double >(CRotElasticInteraction::* CheckedScalarFieldFunction) () const
 
typedef Vec3(CRotElasticInteraction::* VectorFieldFunction) () const
 
typedef CRotElasticIGP ParameterType
 

Public Member Functions

 CRotElasticInteraction ()
 
 CRotElasticInteraction (CRotParticle *, CRotParticle *, const CRotElasticIGP &)
 
virtual ~CRotElasticInteraction ()
 
virtual Vec3 getPos () const
 
virtual void calcForces ()
 
Vec3 getForce () const
 
double getPotentialEnergy () const
 
virtual void saveRestartData (std::ostream &oStream)
 
virtual void loadRestartData (std::istream &iStream)
 
- Public Member Functions inherited from ARotPairInteraction
 ARotPairInteraction ()
 
 ARotPairInteraction (CRotParticle *, CRotParticle *)
 
virtual ~ARotPairInteraction ()
 
const CParticlefirst () const
 
const CParticlesecond () const
 
CRotParticlefirst ()
 
CRotParticlesecond ()
 
pair< int, int > getPairID () const
 
void checkIDs ()
 
virtual bool hasTag (int, int) const
 
virtual Vec3 getPosFirst () const
 
virtual Vec3 getPosSecond () const
 
void setPP (CRotParticle *, CRotParticle *)
 
void setPP (const vector< CRotParticle * >)
 
esys::lsm::quintuple< Vec3, double, Vec3, double, Vec3getRaw2Data () const
 
virtual void calcHeatTrans ()
 
virtual void calcHeatFrict ()
 
- Public Member Functions inherited from AInteraction
 AInteraction ()
 
virtual ~AInteraction ()
 
bool initialized () const
 
vector< int > getAllID () const
 
int getID ()
 
double Count () const
 

Static Public Member Functions

static ScalarFieldFunction getScalarFieldFunction (const string &)
 
static CheckedScalarFieldFunction getCheckedScalarFieldFunction (const string &)
 
static VectorFieldFunction getVectorFieldFunction (const string &)
 
static string getType ()
 

Private Attributes

double m_kr
 spring constant More...
 
Vec3 m_force
 caching force for E_pot More...
 
double m_nForce
 normal force, always >= 0 More...
 
Vec3 m_cpos
 current position More...
 
Vec3 m_D
 initial positions of the particles More...
 
bool m_scaling
 scaling of normal stiffness with particle size More...
 

Friends

ostream & operator<< (ostream &, const CRotElasticInteraction &)
 

Additional Inherited Members

- Protected Attributes inherited from ARotPairInteraction
CRotParticlem_p1
 
CRotParticlem_p2
 
- Protected Attributes inherited from AInteraction
vector< int > m_id
 id's of the particles involved More...
 
int m_iid
 interaction id More...
 
bool m_init
 

Detailed Description

Elastic Interaction between free rotational particles.

Member Typedef Documentation

◆ CheckedScalarFieldFunction

typedef pair<bool,double>(CRotElasticInteraction::* CRotElasticInteraction::CheckedScalarFieldFunction) () const

◆ ParameterType

◆ ScalarFieldFunction

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

◆ VectorFieldFunction

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

Constructor & Destructor Documentation

◆ CRotElasticInteraction() [1/2]

CRotElasticInteraction::CRotElasticInteraction ( )

References m_force, m_kr, m_nForce, and m_scaling.

◆ CRotElasticInteraction() [2/2]

CRotElasticInteraction::CRotElasticInteraction ( CRotParticle p1,
CRotParticle p2,
const CRotElasticIGP param 
)

◆ ~CRotElasticInteraction()

virtual CRotElasticInteraction::~CRotElasticInteraction ( )
inlinevirtual

Member Function Documentation

◆ calcForces()

void CRotElasticInteraction::calcForces ( )
virtual

Calculate free elastic forces.

Implements ARotPairInteraction.

References CParticle::applyForce(), CBasicParticle::getPos(), CBasicParticle::getRad(), m_cpos, m_force, m_kr, m_nForce, ARotPairInteraction::m_p1, ARotPairInteraction::m_p2, and Vec3::norm().

Here is the call graph for this function:

◆ getCheckedScalarFieldFunction()

CRotElasticInteraction::CheckedScalarFieldFunction CRotElasticInteraction::getCheckedScalarFieldFunction ( const string &  name)
static

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

Parameters
namethe name of the field

References NULL.

◆ getForce()

Vec3 CRotElasticInteraction::getForce ( ) const

References m_force.

Referenced by getVectorFieldFunction().

Here is the caller graph for this function:

◆ getPos()

virtual Vec3 CRotElasticInteraction::getPos ( ) const
inlinevirtual

Implements ARotPairInteraction.

References m_cpos.

◆ getPotentialEnergy()

double CRotElasticInteraction::getPotentialEnergy ( ) const

Get the potential energy stored in the interaction.

References m_kr, and m_nForce.

Referenced by getScalarFieldFunction().

Here is the caller graph for this function:

◆ getScalarFieldFunction()

CRotElasticInteraction::ScalarFieldFunction CRotElasticInteraction::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

References AInteraction::Count(), getPotentialEnergy(), and NULL.

Here is the call graph for this function:

◆ getType()

static string CRotElasticInteraction::getType ( )
inlinestatic

◆ getVectorFieldFunction()

CRotElasticInteraction::VectorFieldFunction CRotElasticInteraction::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

References getForce(), and NULL.

Here is the call graph for this function:

◆ loadRestartData()

void CRotElasticInteraction::loadRestartData ( std::istream &  iStream)
virtual

load restart data from stream

Parameters
iStreamthe input stream

Reimplemented from ARotPairInteraction.

References m_D, AInteraction::m_id, AInteraction::m_init, m_kr, and m_scaling.

◆ saveRestartData()

void CRotElasticInteraction::saveRestartData ( std::ostream &  oStream)
virtual

save restart data to ostream

Parameters
oStreamthe output stream

Reimplemented from ARotPairInteraction.

References m_D, AInteraction::m_id, AInteraction::m_init, m_kr, and m_scaling.

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  ost,
const CRotElasticInteraction BI 
)
friend

Member Data Documentation

◆ m_cpos

Vec3 CRotElasticInteraction::m_cpos
private

current position

Referenced by calcForces(), and getPos().

◆ m_D

Vec3 CRotElasticInteraction::m_D
private

initial positions of the particles

Referenced by CRotElasticInteraction(), loadRestartData(), and saveRestartData().

◆ m_force

Vec3 CRotElasticInteraction::m_force
private

caching force for E_pot

Referenced by calcForces(), CRotElasticInteraction(), and getForce().

◆ m_kr

double CRotElasticInteraction::m_kr
private

◆ m_nForce

double CRotElasticInteraction::m_nForce
private

normal force, always >= 0

Referenced by calcForces(), CRotElasticInteraction(), and getPotentialEnergy().

◆ m_scaling

bool CRotElasticInteraction::m_scaling
private

scaling of normal stiffness with particle size

Referenced by CRotElasticInteraction(), loadRestartData(), and saveRestartData().


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