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

Elastic interaction between bonded particles. More...

#include <BondedInteraction.h>

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

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 (CParticle *particle1, CParticle *particle2, const CBondedIGP &params)
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 (CParticle *, CParticle *)
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, Vec3
getRaw2Data () const
template<class TmplParticle >
void setPP (const vector< TmplParticle * > &pp)
- Public Member Functions inherited from 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
double m_r0
 equilibrium distance
double m_dist
 current distance, cached from last calcForces()
double m_break
 breaking distance
Vec3 m_force
 current force, cached for E_pot calculation
Vec3 m_cpos
int m_tag
 Interaction tag;.
bool m_scaling
 scaling k with particle radius
- Protected Attributes inherited from APairInteraction
CParticlem_p1
CParticlem_p2
- Protected Attributes inherited from AInteraction
vector< int > m_id
 id's of the particles involved
int m_iid
 interaction id
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

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

Constructor & Destructor Documentation

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

References CBondedInteraction().

Referenced by CBondedInteraction().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

void CBondedInteraction::calcForces ( )
virtual

Calculate bonded elastic forces. 21 Flops

Implements APairInteraction.

Reimplemented in CCappedBondedInteraction.

References CParticle::applyForce(), m_dist, m_force, m_k, and m_r0.

Here is the call graph for this function:

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

Reimplemented in CCappedBondedInteraction, and CShortBondedInteraction.

Vec3 CBondedInteraction::getForce ( ) const

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

References m_force.

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

Here is the caller graph for this function:

double CBondedInteraction::getPotentialEnergy ( ) const

get the potential energy stored in the interaction

References m_force, and m_k.

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

Here is the caller graph for this function:

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

Reimplemented in CCappedBondedInteraction, and CShortBondedInteraction.

References getPotentialEnergy(), and getStrain().

Here is the call graph for this function:

double CBondedInteraction::getStrain ( ) const

get strain - compression positive

References m_dist, and m_r0.

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

Here is the caller graph for this function:

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

Reimplemented in CCappedBondedInteraction, and CShortBondedInteraction.

References getForce().

Here is the call graph for this function:

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, and m_scaling.

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.

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

save restart data to ostream

Parameters
oStreamthe output stream

Reimplemented from APairInteraction.

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

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


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