ESyS-Particle
4.0.1
|
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 (CParticle *particle1, CParticle *particle2, const CBondedIGP ¶ms) | |
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) |
![]() | |
APairInteraction (CParticle *, CParticle *) | |
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) |
![]() | |
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 | |
![]() | |
CParticle * | m_p1 |
CParticle * | m_p2 |
![]() | |
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 &) |
Elastic interaction between bonded particles.
$Revision$ $Date$
Used by PIS to save/load check-point data for objects of this type.
just do the APairInteraction part of the constructor - not to be used directly, only by derived class -> therefore protected
References CBondedInteraction().
Referenced by CBondedInteraction().
|
virtual |
Calculate bonded elastic forces. 21 Flops
Implements APairInteraction.
Reimplemented in CCappedBondedInteraction.
References CParticle::applyForce(), m_dist, m_force, m_k, 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 |
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().
double CBondedInteraction::getPotentialEnergy | ( | ) | const |
get the potential energy stored in the interaction
Referenced by CShortBondedInteraction::getScalarFieldFunction(), CCappedBondedInteraction::getScalarFieldFunction(), and getScalarFieldFunction().
|
static |
Get the particle member function which returns a scalar field of a given name.
name | the name of the field |
Reimplemented in CCappedBondedInteraction, and CShortBondedInteraction.
References getPotentialEnergy(), and getStrain().
double CBondedInteraction::getStrain | ( | ) | const |
get strain - compression positive
Referenced by CShortBondedInteraction::getScalarFieldFunction(), CCappedBondedInteraction::getScalarFieldFunction(), and getScalarFieldFunction().
|
static |
Get the particle member function which returns a vector field of a given name.
name | the name of the field |
Reimplemented in CCappedBondedInteraction, and CShortBondedInteraction.
References getForce().
|
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, and m_scaling.
|
virtual |
Save snapshot data (non-restartable, viz/postprocessing only) to an output stream.
oStream | the output stream |
Reimplemented in CShortBondedInteraction.
|
virtual |
save restart data to ostream
oStream | the 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"
rel_break | the relative breaking distance |
References m_break.