ESyS-Particle  2.3.4
CBondedInteraction Class Reference

Elastic interaction between bonded particles. More...

#include <BondedInteraction.h>

Inheritance diagram for CBondedInteraction:
Collaboration diagram for CBondedInteraction:

Public Types

typedef CBondedIGP ParameterType
 
typedef BondedInteractionCpData CheckPointable
 
typedef double(CBondedInteraction::* ScalarFieldFunction) () const
 
typedef pair< bool, double >(CBondedInteraction::* CheckedScalarFieldFunction) () const
 
typedef Vec3(CBondedInteraction::* VectorFieldFunction) () const
 

Public Member Functions

 CBondedInteraction ()
 
 CBondedInteraction (CParticle *particle1, CParticle *particle2, const CBondedIGP &params)
 
virtual ~CBondedInteraction ()
 
virtual void calcForces ()
 
void setBreak (double)
 
bool broken ()
 
int getTag () const
 
void setTag (int tag)
 
double getCriterion () const
 
double getPotentialEnergy () const
 
double getStrain () const
 
Vec3 getForce () const
 
virtual Vec3 getPos () const
 
virtual void saveCheckPointData (std::ostream &oStream)
 
virtual void saveRestartData (std::ostream &oStream)
 
virtual void loadRestartData (std::istream &iStream)
 
- Public Member Functions inherited from APairInteraction
 APairInteraction ()
 
 APairInteraction (CParticle *, CParticle *)
 
virtual ~APairInteraction ()
 
const CParticlefirst () const
 
const CParticlesecond () const
 
CParticlefirst ()
 
CParticlesecond ()
 
pair< int, int > getPairID () const
 
void setPP (CParticle *, CParticle *)
 
void checkIDs ()
 
virtual bool hasTag (int, int) const
 
virtual Vec3 getPosFirst () const
 
virtual Vec3 getPosSecond () const
 
esys::lsm::quintuple< Vec3, double, Vec3, double, Vec3getRaw2Data () const
 
template<class TmplParticle >
void setPP (const vector< TmplParticle * > &pp)
 
- Public Member Functions inherited from AInteraction
 AInteraction ()
 
virtual ~AInteraction ()
 
bool initialized () const
 
virtual void calcHeatTrans ()
 
virtual void calcHeatFrict ()
 
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 ()
 

Protected Member Functions

 CBondedInteraction (CParticle *, CParticle *)
 

Protected Attributes

double m_k
 spring constant More...
 
double m_r0
 equilibrium distance More...
 
double m_dist
 current distance, cached from last calcForces() More...
 
double m_break
 breaking distance More...
 
Vec3 m_force
 current force, cached for E_pot calculation More...
 
Vec3 m_cpos
 
int m_tag
 Interaction tag;. More...
 
bool m_scaling
 scaling k with particle radius More...
 
- Protected Attributes inherited from APairInteraction
CParticlem_p1
 
CParticlem_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
 

Friends

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

Detailed Description

Elastic interaction between bonded particles.

Author
Steffen Abe

$Revision$ $Date$

Member Typedef Documentation

◆ CheckedScalarFieldFunction

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

◆ CheckPointable

Used by PIS to save/load check-point data for objects of this type.

◆ ParameterType

◆ ScalarFieldFunction

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

◆ VectorFieldFunction

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

Constructor & Destructor Documentation

◆ CBondedInteraction() [1/3]

CBondedInteraction::CBondedInteraction ( CParticle p1,
CParticle p2 
)
protected

just do the APairInteraction part of the constructor - not to be used directly, only by derived class -> therefore protected

◆ CBondedInteraction() [2/3]

CBondedInteraction::CBondedInteraction ( )

References m_break, m_dist, m_force, m_k, m_r0, m_scaling, and m_tag.

◆ CBondedInteraction() [3/3]

CBondedInteraction::CBondedInteraction ( CParticle particle1,
CParticle particle2,
const CBondedIGP params 
)

◆ ~CBondedInteraction()

CBondedInteraction::~CBondedInteraction ( )
virtual

Member Function Documentation

◆ broken()

bool CBondedInteraction::broken ( )

References m_break, m_dist, APairInteraction::m_p1, APairInteraction::m_p2, m_r0, NULL, and CParticle::setFlag().

Here is the call graph for this function:

◆ calcForces()

void CBondedInteraction::calcForces ( )
virtual

Calculate bonded elastic forces. 21 Flops

Implements APairInteraction.

Reimplemented in CCappedBondedInteraction.

References CParticle::applyForce(), CBasicParticle::getPos(), CBasicParticle::getRad(), m_cpos, m_dist, m_force, m_k, APairInteraction::m_p1, APairInteraction::m_p2, and m_r0.

Here is the call graph for this function:

◆ getCheckedScalarFieldFunction()

CBondedInteraction::CheckedScalarFieldFunction CBondedInteraction::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.

◆ getCriterion()

double CBondedInteraction::getCriterion ( ) const

References m_break, and m_dist.

Referenced by getScalarFieldFunction().

Here is the caller graph for this function:

◆ getForce()

Vec3 CBondedInteraction::getForce ( ) const

get force - points to p1 on extension, to p2 on compression

References m_force.

Referenced by getVectorFieldFunction(), CCappedBondedInteraction::getVectorFieldFunction(), and CShortBondedInteraction::getVectorFieldFunction().

Here is the caller graph for this function:

◆ getPos()

virtual Vec3 CBondedInteraction::getPos ( ) const
inlinevirtual

Implements APairInteraction.

References m_cpos.

◆ getPotentialEnergy()

double CBondedInteraction::getPotentialEnergy ( ) const

get the potential energy stored in the interaction

References m_force, and m_k.

Referenced by getScalarFieldFunction(), CCappedBondedInteraction::getScalarFieldFunction(), and CShortBondedInteraction::getScalarFieldFunction().

Here is the caller graph for this function:

◆ getScalarFieldFunction()

CBondedInteraction::ScalarFieldFunction CBondedInteraction::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(), getCriterion(), getPotentialEnergy(), getStrain(), and NULL.

Here is the call graph for this function:

◆ getStrain()

double CBondedInteraction::getStrain ( ) const

get strain - compression positive

References m_dist, and m_r0.

Referenced by getScalarFieldFunction(), CCappedBondedInteraction::getScalarFieldFunction(), and CShortBondedInteraction::getScalarFieldFunction().

Here is the caller graph for this function:

◆ getTag()

int CBondedInteraction::getTag ( ) const
inline

◆ getType()

static string CBondedInteraction::getType ( )
inlinestatic

◆ getVectorFieldFunction()

CBondedInteraction::VectorFieldFunction CBondedInteraction::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 CBondedInteraction::loadRestartData ( std::istream &  iStream)
virtual

load restart data from stream

Parameters
iStreamthe input stream

Reimplemented from APairInteraction.

References m_break, m_dist, AInteraction::m_id, m_k, m_r0, m_scaling, and setTag().

Here is the call graph for this function:

◆ saveCheckPointData()

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

Save snapshot data (non-restartable, viz/postprocessing only) to an output stream.

Parameters
oStreamthe output stream

Reimplemented in CShortBondedInteraction.

References BondedInteractionCpData::saveCheckPointData().

Here is the call graph for this function:

◆ saveRestartData()

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

save restart data to ostream

Parameters
oStreamthe output stream

Reimplemented from APairInteraction.

References getTag(), m_break, m_dist, AInteraction::m_id, m_k, m_r0, and m_scaling.

Here is the call graph for this function:

◆ setBreak()

void CBondedInteraction::setBreak ( double  rel_break)

Set breaking distance to sum of the radii multiplied with given "relative breaking distance"

Parameters
rel_breakthe relative breaking distance

References CBasicParticle::getRad(), m_break, APairInteraction::m_p1, and APairInteraction::m_p2.

Here is the call graph for this function:

◆ setTag()

void CBondedInteraction::setTag ( int  tag)
inline

References m_tag.

Referenced by loadRestartData(), and TML_PackedMessageInterface::unpack().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

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

◆ TML_PackedMessageInterface

friend class TML_PackedMessageInterface
friend

Member Data Documentation

◆ m_break

◆ m_cpos

Vec3 CBondedInteraction::m_cpos
protected

◆ m_dist

◆ m_force

◆ m_k

◆ m_r0

◆ m_scaling

bool CBondedInteraction::m_scaling
protected

scaling k with particle radius

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

◆ m_tag


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