|
ESyS-Particle
2.3.4
|
Elastic interaction between bonded particles. More...
#include <BondedInteraction.h>


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 ¶ms) | |
| 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 CParticle * | first () const |
| const CParticle * | second () const |
| CParticle * | first () |
| CParticle * | second () |
| 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 | |
| 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 | |
| CParticle * | m_p1 |
| CParticle * | m_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 &) |
Elastic interaction between bonded particles.
$Revision$ $Date$
| typedef pair<bool,double>(CBondedInteraction::* CBondedInteraction::CheckedScalarFieldFunction) () const |
Used by PIS to save/load check-point data for objects of this type.
| typedef double(CBondedInteraction::* CBondedInteraction::ScalarFieldFunction) () const |
| typedef Vec3(CBondedInteraction::* CBondedInteraction::VectorFieldFunction) () const |
just do the APairInteraction part of the constructor - not to be used directly, only by derived class -> therefore protected
| CBondedInteraction::CBondedInteraction | ( | ) |
| CBondedInteraction::CBondedInteraction | ( | CParticle * | particle1, |
| CParticle * | particle2, | ||
| const CBondedIGP & | params | ||
| ) |
References CParticle::getDo2dCalculations(), CBasicParticle::getPos(), CBasicParticle::getRad(), CBondedIGP::k, m_break, m_dist, m_force, m_k, m_r0, CBondedIGP::m_scaling, m_scaling, m_tag, CBondedIGP::rbreak, and CBondedIGP::tag.

|
virtual |
| bool CBondedInteraction::broken | ( | ) |
References m_break, m_dist, APairInteraction::m_p1, APairInteraction::m_p2, m_r0, NULL, and CParticle::setFlag().

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

|
static |
Get the particle member function which returns a checked scalar field of a given name.
| name | the name of the field |
References NULL.
| double CBondedInteraction::getCriterion | ( | ) | const |
References m_break, and m_dist.
Referenced by getScalarFieldFunction().

| 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().

|
inlinevirtual |
Implements APairInteraction.
References m_cpos.
| double CBondedInteraction::getPotentialEnergy | ( | ) | const |
get the potential energy stored in the interaction
Referenced by getScalarFieldFunction(), CCappedBondedInteraction::getScalarFieldFunction(), and CShortBondedInteraction::getScalarFieldFunction().

|
static |
Get the particle member function which returns a scalar field of a given name.
| name | the name of the field |
References AInteraction::Count(), getCriterion(), getPotentialEnergy(), getStrain(), and NULL.

| double CBondedInteraction::getStrain | ( | ) | const |
get strain - compression positive
Referenced by getScalarFieldFunction(), CCappedBondedInteraction::getScalarFieldFunction(), and CShortBondedInteraction::getScalarFieldFunction().

|
inline |
References m_tag.
Referenced by TML_PackedMessageInterface::pack(), saveRestartData(), BondedInteractionCpData::set(), and ShortBondedInteractionCpData::ShortBondedInteractionCpData().

|
inlinestatic |
|
static |
Get the particle member function which returns a vector field of a given name.
| name | the name of the field |
References getForce(), and NULL.

|
virtual |
load restart data from stream
| iStream | the input stream |
Reimplemented from APairInteraction.
References m_break, m_dist, AInteraction::m_id, m_k, m_r0, m_scaling, and setTag().

|
virtual |
Save snapshot data (non-restartable, viz/postprocessing only) to an output stream.
| oStream | the output stream |
Reimplemented in CShortBondedInteraction.
References BondedInteractionCpData::saveCheckPointData().

|
virtual |
save restart data to ostream
| oStream | the output stream |
Reimplemented from APairInteraction.
References getTag(), 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"
| rel_break | the relative breaking distance |
References CBasicParticle::getRad(), m_break, APairInteraction::m_p1, and APairInteraction::m_p2.

|
inline |
References m_tag.
Referenced by loadRestartData(), and TML_PackedMessageInterface::unpack().

|
friend |
|
friend |
|
protected |
breaking distance
Referenced by broken(), CBondedInteraction(), CCappedBondedInteraction::CCappedBondedInteraction(), CShortBondedInteraction::CShortBondedInteraction(), getCriterion(), loadRestartData(), TML_PackedMessageInterface::pack(), saveRestartData(), setBreak(), and TML_PackedMessageInterface::unpack().
|
protected |
Referenced by calcForces(), CCappedBondedInteraction::calcForces(), and getPos().
|
protected |
current distance, cached from last calcForces()
Referenced by broken(), calcForces(), CCappedBondedInteraction::calcForces(), CBondedInteraction(), CCappedBondedInteraction::CCappedBondedInteraction(), CShortBondedInteraction::CShortBondedInteraction(), getCriterion(), getStrain(), loadRestartData(), TML_PackedMessageInterface::pack(), saveRestartData(), and TML_PackedMessageInterface::unpack().
|
protected |
current force, cached for E_pot calculation
Referenced by calcForces(), CCappedBondedInteraction::calcForces(), CBondedInteraction(), CCappedBondedInteraction::CCappedBondedInteraction(), CShortBondedInteraction::CShortBondedInteraction(), getForce(), and getPotentialEnergy().
|
protected |
spring constant
Referenced by calcForces(), CCappedBondedInteraction::calcForces(), CBondedInteraction(), CCappedBondedInteraction::CCappedBondedInteraction(), CShortBondedInteraction::CShortBondedInteraction(), getPotentialEnergy(), loadRestartData(), TML_PackedMessageInterface::pack(), saveRestartData(), and TML_PackedMessageInterface::unpack().
|
protected |
equilibrium distance
Referenced by broken(), calcForces(), CCappedBondedInteraction::calcForces(), CBondedInteraction(), CCappedBondedInteraction::CCappedBondedInteraction(), CShortBondedInteraction::CShortBondedInteraction(), CShortBondedInteraction::getEquiDist(), getStrain(), loadRestartData(), TML_PackedMessageInterface::pack(), saveRestartData(), and TML_PackedMessageInterface::unpack().
|
protected |
scaling k with particle radius
Referenced by CBondedInteraction(), loadRestartData(), and saveRestartData().
|
protected |
Interaction tag;.
Referenced by CBondedInteraction(), CCappedBondedInteraction::CCappedBondedInteraction(), CShortBondedInteraction::CShortBondedInteraction(), getTag(), and setTag().