MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ChargedBondedInteraction Class Reference

#include <ChargedBondedInteraction.h>

+ Inheritance diagram for ChargedBondedInteraction:

Public Types

typedef ChargedBondedSpecies SpeciesType
 Setting an alias name for ChargedBondedSpecies. More...
 

Public Member Functions

 ChargedBondedInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
 Constructor. More...
 
 ChargedBondedInteraction (const ChargedBondedInteraction &p)
 Copy constructor. More...
 
virtual ~ChargedBondedInteraction ()
 Destructor. More...
 
void computeAdhesionForce ()
 Computes the adhesive forces. More...
 
void read (std::istream &is)
 Interaction read function, which accepts an std::istream as input. More...
 
void write (std::ostream &os) const
 Interaction print function, which accepts an std::ostream as input. More...
 
Mdouble getElasticEnergy () const
 Returns the amount of Elastic energy involved in an interaction. Basically used in case you want to write the elastic energy into an output file. More...
 
const ChargedBondedSpeciesgetSpecies () const
 A dynamic_cast of BaseSpecies pointer type to a pointer to an object of type ChargedBondedSpecies. More...
 
std::string getBaseName () const
 Returns the name of the interaction, see Interaction.h. More...
 
void bond ()
 A pair of functions which can be used to fix or unfix a pair of overlapping particles. More...
 
void unbond ()
 
- Public Member Functions inherited from BaseInteraction
 BaseInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
 A constructor takes the BaseInteractable objects which are interacting (come into contact) and time the interaction starts. More...
 
 BaseInteraction (const BaseInteraction &p)
 Copy constructor. More...
 
 BaseInteraction ()
 Empty constructor. More...
 
virtual ~BaseInteraction ()
 The default destructor. More...
 
virtual void actionsOnErase ()
 If an interaction needs to do something before it gets erased, add it here. E.g. Liquid bridges rupture at the end of their lifetime, and the liquid bridge volume has to be redistributed. The reason this action is not done in the destructor is that this action should not be taken when erasing ghost interactions. More...
 
virtual void computeForce ()
 Virtual function that contains the force law between the two objects interacting. More...
 
void writeToFStat (std::ostream &os) const
 Writes forces data to the FStat file. More...
 
virtual std::string getName () const
 Virtual function which allows interactions to be named. More...
 
void setDistance (Mdouble distance)
 Sets the interaction distance between the two interacting objects. More...
 
void setNormal (Vec3D normal)
 Sets the normal vector between the two interacting objects. More...
 
void setOverlap (Mdouble overlap)
 Set the overlap between the two interacting object. More...
 
void setContactPoint (Vec3D contactPoint)
 Set the location of the contact point between the two interacting objects. More...
 
void setTimeStamp (Mdouble timeStamp)
 Updates the time step of the interacting. Note, timesteps used to find completed interactions. More...
 
void setSpecies (BaseSpecies *species)
 Set the Species of the interaction; note this can either be a Species or MixedSpecies. More...
 
void setP (BaseInteractable *P)
 Sets the first object involved in the interaction (normally a particle). More...
 
void setI (BaseInteractable *I)
 Sets the second object involved in the interaction (often particle or wall). More...
 
void setHandler (InteractionHandler *handler)
 Sets the pointer to the interaction hander which is storing this interaction. More...
 
InteractionHandlergetHandler () const
 Gets a point to the interaction handlers to which this interaction belongs. More...
 
const Vec3DgetForce () const
 Gets the current force (vector) between the two interacting objects. More...
 
const Vec3DgetTorque () const
 Gets the current torque (vector) between the two interacting objects. More...
 
const Vec3DgetNormal () const
 Gets the normal vector between the two interacting objects. More...
 
const Vec3DgetContactPoint () const
 Gets constant reference to contact point (vector). More...
 
Mdouble getOverlap () const
 Returns a Mdouble with the current overlap between the two interacting objects. More...
 
Mdouble getContactRadius () const
 Returns a Mdouble with the current contact between the two interacting objects. More...
 
void removeFromHandler ()
 Removes this interaction from its interaction hander. More...
 
void copySwitchPointer (const BaseInteractable *original, BaseInteractable *ghost) const
 This copies the interactions of the original particle and replaces the original with the ghost copy. More...
 
void gatherContactStatistics ()
 
BaseInteractablegetP ()
 Returns a pointer to first object involved in the interaction (normally a particle). More...
 
BaseInteractablegetI ()
 
const BaseInteractablegetP () const
 
const BaseInteractablegetI () const
 Returns a constant pointer to the second object involved in the interaction. More...
 
Mdouble getTimeStamp () const
 Returns an Mdouble which is the time stamp of the interaction. More...
 
virtual void integrate (Mdouble timeStep)
 integrates variables of the interaction which need to be integrate e.g. the tangential overlap. More...
 
virtual Mdouble getTangentialOverlap () const
 get the length of the current tangential overlap More...
 
Mdouble getDistance () const
 Returns an Mdouble which is the norm (length) of distance vector. More...
 
const Vec3DgetRelativeVelocity () const
 Returns a constant reference to a vector of relative velocity. More...
 
Mdouble getNormalRelativeVelocity () const
 Returns a double which is the norm (length) of the relative velocity vector. More...
 
Mdouble getAbsoluteNormalForce () const
 Returns the absolute value of the norm (length) of the Normal force vector. More...
 
virtual BaseInteractioncopy () const =0
 Makes a copy of the interaction and returns a pointer to the copy. More...
 
unsigned int getMultiContactIdentifier () const
 
void setMultiContactIdentifier (unsigned int multiContactIdentifier_)
 
virtual void rotateHistory (Matrix3D &rotationMatrix)
 When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that. More...
 
virtual void actionsAfterTimeStep ()
 
virtual unsigned getNumberOfFieldsVTK () const
 
virtual std::string getTypeVTK (unsigned i) const
 
virtual std::string getNameVTK (unsigned i) const
 
virtual std::vector< MdoublegetFieldVTK (unsigned i) const
 
void setForce (Vec3D force)
 set total force (this is used by the normal force, tangential forces are added use addForce) More...
 
- Public Member Functions inherited from BaseObject
 BaseObject ()
 Default constructor. More...
 
 BaseObject (const BaseObject &p)
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()
 virtual destructor More...
 
virtual void moveInHandler (const unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (const unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (const unsigned int id)
 Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More...
 
unsigned int getIndex () const
 Returns the index of the object in the handler. More...
 
unsigned int getId () const
 Returns the unique identifier of any particular object. More...
 

Private Attributes

bool bonded_
 A history parameter to store if the particles were in contact or not. Useful to compute adhesive forces. Setting bonded_ to 'true' for a given pair of (overlapping) particles will cause these particles to become fixed together, resulting in larger, composite particles that can be used to model aspherical geometries. More...
 

Additional Inherited Members

- Protected Member Functions inherited from BaseInteraction
virtual const Vec3D getTangentialForce () const
 
Mdouble getEffectiveRadius () const
 Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More...
 
Mdouble getEffectiveMass () const
 Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More...
 
Mdouble getEffectiveCorrectedRadius ()
 Returns a Mdouble to the effective radius corrected for the overlaps of the particles. More...
 
void addForce (Vec3D force)
 add an force increment to the total force. More...
 
void addTorque (Vec3D torque)
 
void setTorque (Vec3D torque)
 set the total force (this is used by the normal force, tangential torques are added use addTorque) More...
 
void setRelativeVelocity (Vec3D relativeVelocity)
 set the relative velocity of the current of the interactions. More...
 
void setNormalRelativeVelocity (Mdouble normalRelativeVelocit)
 set the normal component of the relative velocity. More...
 
void setAbsoluteNormalForce (Mdouble absoluteNormalForce)
 the absolute values of the norm (length) of the normal force More...
 
const BaseSpeciesgetBaseSpecies () const
 Return a constant point to BaseSpecies of the interaction. More...
 
virtual Mdouble getElasticEnergyAtEquilibrium (Mdouble adhesiveForce) const
 
virtual void reverseHistory ()
 When periodic particles some interaction need certain history properties reversing. This is the function for that. More...
 

Detailed Description

Definition at line 39 of file ChargedBondedInteraction.h.

Member Typedef Documentation

Constructor & Destructor Documentation

ChargedBondedInteraction::ChargedBondedInteraction ( BaseInteractable P,
BaseInteractable I,
Mdouble  timeStamp 
)

Constructor.

Todo:

Clean up this file by using the logger instead of cout, //cout, cerr and assert, and by motivating why the commented out code needs to be here.

Complete the documentation of these methods

Parameters
[in]P
[in]I
[in]timeStamp

Definition at line 42 of file ChargedBondedInteraction.cc.

References bonded_.

43  : BaseInteraction(P, I, timeStamp)
44 {
45  //ensuring that, by default, particles are not 'bonded'
46  //i.e. they will not unintentionally 'stick' to any overlapping particles!
47  bonded_ = false;
48 #ifdef DEBUG_CONSTRUCTOR
49  std::cout<<"ChargedBondedInteraction::ChargedBondedInteraction() finished"<<std::endl;
50 #endif
51 }
BaseInteraction()
Empty constructor.
bool bonded_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...
ChargedBondedInteraction::ChargedBondedInteraction ( const ChargedBondedInteraction p)

Copy constructor.

Parameters
[in]p

Definition at line 56 of file ChargedBondedInteraction.cc.

References bonded_.

57  : BaseInteraction(p)
58 {
59  //carrying the history parameter over for copied particles to ensure that any bonded particles
60  //remain bonded!
61  bonded_ = p.bonded_;
62 #ifdef DEBUG_CONSTRUCTOR
63  std::cout<<"ChargedBondedInteraction::ChargedBondedInteraction(const ChargedBondedInteraction &p finished"<<std::endl;
64 #endif
65 }
BaseInteraction()
Empty constructor.
bool bonded_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...
ChargedBondedInteraction::~ChargedBondedInteraction ( )
virtual

Destructor.

Definition at line 70 of file ChargedBondedInteraction.cc.

71 {
72 #ifdef DEBUG_DESTRUCTOR
73  std::cout<<"ChargedBondedInteraction::ChargedBondedInteractionaction() finished"<<std::endl;
74 #endif
75 }

Member Function Documentation

void ChargedBondedInteraction::bond ( )

A pair of functions which can be used to fix or unfix a pair of overlapping particles.

Used to set the private variable 'bonded' to true, thus allowing the user to choose to fix a given pair of interacting, overlapping particles together

Definition at line 291 of file ChargedBondedInteraction.cc.

References bonded_.

292 {
293  bonded_=true;
294 }
bool bonded_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...
void ChargedBondedInteraction::computeAdhesionForce ( )

Computes the adhesive forces.

TW: I added the vdW force; KW, why was that force not active? Note, this change also shows up in energy

Definition at line 97 of file ChargedBondedInteraction.cc.

References BaseInteraction::addForce(), assert, bonded_, ChargedBondedSpecies::getAdhesionForceMax(), ChargedBondedSpecies::getAdhesionStiffness(), ChargedBondedSpecies::getBondDissipation(), ChargedBondedSpecies::getBondForceMax(), BaseInteraction::getI(), BaseInteraction::getNormal(), BaseInteraction::getNormalRelativeVelocity(), BaseInteraction::getOverlap(), BaseInteraction::getP(), getSpecies(), BaseInteractable::getSpecies(), ChargedBondedSpecies::getVanDerWaalsForceMax(), and ChargedBondedSpecies::getVanDerWaalsStiffness().

98 {
99 
100  const ChargedBondedSpecies* species = getSpecies();
101  //std::cout << getSpecies()->getCharge() << std::endl;
102 
103  //creating local parameters to store the charges of both particles
104  //involved in the interaction to allow for quick calculation
105  const auto pSpecies = dynamic_cast<const ChargedBondedSpecies*>(getP()->getSpecies());
106  const auto iSpecies = dynamic_cast<const ChargedBondedSpecies*>(getI()->getSpecies());
107  assert(pSpecies);
108  assert(iSpecies);
109  const int pCharge = pSpecies->getCharge();
110  const int iCharge = iSpecies->getCharge();
111 
112  //similarly, creating local parameters to store the relevant stiffness
113  //and max force values
114  const Mdouble k = species->getAdhesionStiffness();
115  const Mdouble fMax = species->getAdhesionForceMax();
116 
117  const Mdouble kWaals = species->getVanDerWaalsStiffness();
118  const Mdouble fMaxWaals = species->getVanDerWaalsForceMax();
119  const Mdouble rWaals = fMaxWaals / kWaals;
120 
121 
122  //First, adding bonded force if applicable
123  if (bonded_ && getOverlap()>=0)
124  {
125  addForce(getNormal() * (-species->getBondForceMax()
127  return;
128  }
129 
130 
131  //determining which of the three possible cases for force based on charge -
132  //repulsive (like charges), attractive (unlike charges) or none (1 or more uncharged) -
133  //is relevant for the current combination of particle charges...
134  //(Note that the charge set function contains a safety check that means charge can only be
135  // +/- 1, i.e. the expressions used below should not produce errors!
136 
137  //case 1 - 1 or more particles has no charge, i.e. no EM force between them
138  if ( (pCharge == 0) or (iCharge == 0) )
139  {
140  //No need to write anything here as nothing needs to be returned!
141  //std::cout << "no charge" << std::endl;
142  }
143  //case 2: unlike charges --> attractive force
144  else if (pCharge == -iCharge)
145  {
146  //std::cout << "dissimilar charge" << std::endl;
147  //in the case of particles with opposing charges, simply implements the
148  //standard attractive force used for adhesive particle interactions
149  if (getOverlap() >= 0)
150  {
151  addForce(getNormal() * -fMax);
152  addForce(getNormal() * -fMaxWaals);
153  }
154  else if (getOverlap() >= -rWaals)
155  {
156  addForce(getNormal() * (-kWaals * getOverlap() - fMaxWaals));
157  addForce( getNormal() * (-k * getOverlap() - fMax));
158  }
159  else
160  {
161  addForce( getNormal() * (-k * getOverlap() - fMax));
162  }
163  }
164  //case 3: like charges --> repulsive force
165  else if (pCharge == iCharge)
166  {
167  //std::cout << "similar charge" << std::endl;
168  //in the case of particles with like charges, reverse the direction of the force applied
169  //such that particles repel one another
170  if (getOverlap() >= 0)
171  {
172  addForce(getNormal() * +fMax);
173  addForce(getNormal() * -fMaxWaals);
175  }
176  else if (getOverlap() >= -rWaals)
177  {
178  addForce(getNormal() * (-kWaals * getOverlap() - fMaxWaals));
179  addForce(getNormal() * (+k * getOverlap() + fMax));
180  //std::cout << "Waals = " << getNormal() * (-kWaals * getOverlap() - fMaxWaals) << std::endl;
181  }
182  else
183  {
184  addForce(getNormal() * (+k * getOverlap() + fMax));
185  }
186  }
187  //if none of the above are satisfied, something must have gone very wrong!
188  else
189  {
190  std::cerr << "Error: Particle charge has erroneous value" << std::endl;
191  exit(-1);
192  }
193 }
Mdouble getVanDerWaalsForceMax() const
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
Mdouble getAdhesionForceMax() const
Allows the spring constant to be accessed.
double Mdouble
ChargedBondedSpecies contains the parameters used to describe a linear reversible short-range force...
Mdouble getBondDissipation() const
Allows the additional dissipation used to damp oscillations between bondd particles to be accessed...
Mdouble getVanDerWaalsStiffness() const
Mdouble getNormalRelativeVelocity() const
Returns a double which is the norm (length) of the relative velocity vector.
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Mdouble getAdhesionStiffness() const
Allows the spring constant to be accessed.
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
void addForce(Vec3D force)
add an force increment to the total force.
const ChargedBondedSpecies * getSpecies() const
A dynamic_cast of BaseSpecies pointer type to a pointer to an object of type ChargedBondedSpecies.
#define assert(e,...)
Definition: Logger.h:584
BaseInteractable * getI()
Mdouble getBondForceMax() const
Allows the maximal force for 'bonding' particles together to be accessed.
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
bool bonded_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...
std::string ChargedBondedInteraction::getBaseName ( ) const

Returns the name of the interaction, see Interaction.h.

Returns
std::string

Definition at line 282 of file ChargedBondedInteraction.cc.

283 {
284  return "ChargedBonded";
285 }
Mdouble ChargedBondedInteraction::getElasticEnergy ( ) const
virtual

Returns the amount of Elastic energy involved in an interaction. Basically used in case you want to write the elastic energy into an output file.

Returns the elastic energy stored in the adhesive spring.

Elastic (=potential) energy is defined as the energy gained by separating two interactables. As it costs energy to separate adhesive interactables, the elastic energy is negative.

Returns
the elastic energy stored in the adhesive spring.

Reimplemented from BaseInteraction.

Definition at line 200 of file ChargedBondedInteraction.cc.

References assert, bonded_, ERROR, ChargedBondedSpecies::getAdhesionForceMax(), ChargedBondedSpecies::getAdhesionStiffness(), ChargedBondedSpecies::getBondForceMax(), BaseInteraction::getElasticEnergyAtEquilibrium(), BaseInteraction::getI(), ChargedBondedSpecies::getInteractionDistance(), BaseInteraction::getOverlap(), BaseInteraction::getP(), getSpecies(), BaseInteractable::getSpecies(), ChargedBondedSpecies::getVanDerWaalsForceMax(), ChargedBondedSpecies::getVanDerWaalsStiffness(), logger, and mathsFunc::square().

201 {
202  const ChargedBondedSpecies* species = getSpecies();
203  const auto pSpecies = dynamic_cast<const ChargedBondedSpecies*>(getP()->getSpecies());
204  const auto iSpecies = dynamic_cast<const ChargedBondedSpecies*>(getI()->getSpecies());
205  assert(pSpecies);
206  assert(iSpecies);
207  const int pCharge = pSpecies->getCharge();
208  const int iCharge = iSpecies->getCharge();
209 
210  const Mdouble k = species->getAdhesionStiffness();
211  const Mdouble fMax = species->getAdhesionForceMax();
212  const Mdouble r = species->getInteractionDistance();
213 
214  const Mdouble kWaals = species->getVanDerWaalsStiffness();
215  const Mdouble fMaxWaals = species->getVanDerWaalsForceMax();
216  const Mdouble rWaals = (fMaxWaals==0)?0:(fMaxWaals/kWaals);
217 
218 
219  //First, adding bonded force if applicable
220  if (bonded_ && getOverlap()>=0)
221  {
222  //comment to ignore BondForce
223  Mdouble elasticEnergyAtEquilibrium = getElasticEnergyAtEquilibrium(species->getBondForceMax());
224  return -species->getBondForceMax()*getOverlap()+elasticEnergyAtEquilibrium;
225  }
226 
227  Mdouble elasticEnergy = 0.0;
228  if ( (pCharge != 0) && (iCharge != 0) )
229  {
230  if (pCharge == -iCharge)
231  {
232  if (getOverlap() >= 0)
233  {
234  elasticEnergy -= (0.5 * rWaals + getOverlap()) * fMaxWaals
235  + (0.5 * r + getOverlap()) * fMax;
236  }
237  else if (getOverlap() >= -rWaals)
238  {
239  elasticEnergy -= (0.5 * kWaals * mathsFunc::square(getOverlap() + rWaals)) +
240  (0.5 * k * mathsFunc::square(getOverlap() + r));
241  }
242  else
243  {
244  elasticEnergy -= (0.5 * k * mathsFunc::square(getOverlap() + r));
245  }
246  }
247  //case 3: like charges --> repulsive force
248  else if (pCharge == iCharge)
249  {
250  if (getOverlap() >= 0)
251  {
252  elasticEnergy -= (0.5 * rWaals + getOverlap()) * fMaxWaals
253  - (0.5 * r + getOverlap()) * fMax;
254  }
255  else if (getOverlap() >= -rWaals)
256  {
257  elasticEnergy -= (0.5 * kWaals * mathsFunc::square(getOverlap() + rWaals)) -
258  (0.5 * k * mathsFunc::square(getOverlap() + r));
259  }
260  else
261  {
262  elasticEnergy += (0.5 * k * mathsFunc::square(getOverlap() + r));
263  }
264  }
265  else
266  {
267  logger(ERROR,"Particle charge has erroneous value");
268  }
269  }
270  return elasticEnergy;
271 }
Mdouble getVanDerWaalsForceMax() const
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
Mdouble getAdhesionForceMax() const
Allows the spring constant to be accessed.
double Mdouble
T square(T val)
squares a number
Definition: ExtendedMath.h:91
ChargedBondedSpecies contains the parameters used to describe a linear reversible short-range force...
Mdouble getVanDerWaalsStiffness() const
Mdouble getInteractionDistance() const
returns the largest separation distance at which adhesive short-range forces can occur.
Mdouble getAdhesionStiffness() const
Allows the spring constant to be accessed.
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
const ChargedBondedSpecies * getSpecies() const
A dynamic_cast of BaseSpecies pointer type to a pointer to an object of type ChargedBondedSpecies.
#define assert(e,...)
Definition: Logger.h:584
BaseInteractable * getI()
Mdouble getBondForceMax() const
Allows the maximal force for 'bonding' particles together to be accessed.
virtual Mdouble getElasticEnergyAtEquilibrium(Mdouble adhesiveForce) const
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
bool bonded_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...
const ChargedBondedSpecies * ChargedBondedInteraction::getSpecies ( ) const

A dynamic_cast of BaseSpecies pointer type to a pointer to an object of type ChargedBondedSpecies.

Returns
a constant pointer to an instance of this class.

Definition at line 275 of file ChargedBondedInteraction.cc.

References BaseInteraction::getBaseSpecies().

Referenced by computeAdhesionForce(), and getElasticEnergy().

276 {
277  return dynamic_cast<const ChargedBondedSpecies *> (getBaseSpecies()); //downcast
278 }
ChargedBondedSpecies contains the parameters used to describe a linear reversible short-range force...
const BaseSpecies * getBaseSpecies() const
Return a constant point to BaseSpecies of the interaction.
void ChargedBondedInteraction::read ( std::istream &  is)
virtual

Interaction read function, which accepts an std::istream as input.

Parameters
[in]is

Reimplemented from BaseInteraction.

Definition at line 88 of file ChargedBondedInteraction.cc.

References bonded_.

89 {
90  std::string dummy;
91  //logger(INFO,"ChargedBondedSpecies %",dummy);
92  is >> dummy >> bonded_;
93 }
bool bonded_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...
void ChargedBondedInteraction::unbond ( )

Used to set the private variable 'bonded' to false, thus allowing the user to choose to separate (or 'unbond') a given pair of interacting, overlapping particles together which were previously fixed (bonded) together Useful, for example, in implementing breakage mechanisms.

Definition at line 301 of file ChargedBondedInteraction.cc.

References bonded_.

302 {
303  bonded_=false;
304 }
bool bonded_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...
void ChargedBondedInteraction::write ( std::ostream &  os) const
virtual

Interaction print function, which accepts an std::ostream as input.

Parameters
[in]os

Reimplemented from BaseInteraction.

Definition at line 80 of file ChargedBondedInteraction.cc.

References bonded_.

81 {
82  os << " bonded " << bonded_;
83 }
bool bonded_
A history parameter to store if the particles were in contact or not. Useful to compute adhesive forc...

Member Data Documentation

bool ChargedBondedInteraction::bonded_
private

A history parameter to store if the particles were in contact or not. Useful to compute adhesive forces. Setting bonded_ to 'true' for a given pair of (overlapping) particles will cause these particles to become fixed together, resulting in larger, composite particles that can be used to model aspherical geometries.

Definition at line 108 of file ChargedBondedInteraction.h.

Referenced by bond(), ChargedBondedInteraction(), computeAdhesionForce(), getElasticEnergy(), read(), unbond(), and write().


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