MercuryDPM  Beta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ReversibleAdhesiveSpecies Class Reference

ReversibleAdhesiveSpecies contains the parameters used to describe a linear reversible short-range force. More...

#include <ReversibleAdhesiveSpecies.h>

+ Inheritance diagram for ReversibleAdhesiveSpecies:

Public Types

typedef
ReversibleAdhesiveInteraction 
InteractionType
 The correct Interaction type for this AdhesiveForceSpecies. More...
 

Public Member Functions

 ReversibleAdhesiveSpecies ()
 The default constructor. More...
 
 ReversibleAdhesiveSpecies (const ReversibleAdhesiveSpecies &s)
 The default constructor. More...
 
virtual ~ReversibleAdhesiveSpecies ()
 The default constructor. More...
 
void read (std::istream &is)
 Reads the species properties from an input stream. More...
 
void write (std::ostream &os) const
 Writes the species properties to an output stream. More...
 
std::string getBaseName () const
 Used in Species::getName to obtain a unique name for each Species. More...
 
void mix (ReversibleAdhesiveSpecies *const S, ReversibleAdhesiveSpecies *const T)
 creates default values for mixed species More...
 
Mdouble getInteractionDistance () const
 returns the largest separation distance at which adhesive short-range forces can occur. More...
 
void setAdhesionStiffness (Mdouble new_k0)
 Allows the spring constant to be changed. More...
 
Mdouble getAdhesionStiffness () const
 Allows the spring constant to be accessed. More...
 
void setAdhesionForceMax (Mdouble new_f0)
 Allows the spring constant to be changed. More...
 
Mdouble getAdhesionForceMax () const
 Allows the spring constant to be accessed. More...
 
- Public Member Functions inherited from BaseSpecies
 BaseSpecies ()
 The default constructor. More...
 
 BaseSpecies (const BaseSpecies &p)
 The copy constructor. More...
 
virtual ~BaseSpecies ()
 The default destructor. More...
 
virtual BaseSpeciescopy () const =0
 Creates a deep copy of the object from which it is called. More...
 
void setHandler (SpeciesHandler *handler)
 Sets the pointer to the handler to which this species belongs. More...
 
SpeciesHandlergetHandler () const
 Returns the pointer to the handler to which this species belongs. More...
 
Mdouble average (Mdouble a, Mdouble b)
 defines the average of two variables by the harmonic mean. More...
 
virtual void mixAll (BaseSpecies *const S, BaseSpecies *const T)=0
 creates default values for mixed species More...
 
virtual bool getUseAngularDOFs () const =0
 Returns true if torques (i.e. angular degrees of freedom) have to be calculated. More...
 
virtual BaseInteractiongetNewInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)=0
 returns new Interaction object. 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 std::string getName () const =0
 A purely virtual function. 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

Mdouble adhesionStiffness_
 stiffness of linear adhesion force More...
 
Mdouble adhesionForceMax_
 adhesion force at zero overlap More...
 

Detailed Description

ReversibleAdhesiveSpecies contains the parameters used to describe a linear reversible short-range force.

See ReversibleAdhesiveInteraction::computeForce for a description of the force law.

Definition at line 36 of file ReversibleAdhesiveSpecies.h.

Member Typedef Documentation

Constructor & Destructor Documentation

ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies ( )

The default constructor.

Definition at line 29 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

30 {
33 #ifdef DEBUG_CONSTRUCTOR
34  std::cout<<"ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies() finished"<<std::endl;
35 #endif
36 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies ( const ReversibleAdhesiveSpecies s)

The default constructor.

Parameters
[in]sthe species that is copied

Definition at line 41 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

42 {
45 #ifdef DEBUG_CONSTRUCTOR
46  std::cout<<"ReversibleAdhesiveSpecies::ReversibleAdhesiveSpecies(const ReversibleAdhesiveSpecies &p) finished"<<std::endl;
47 #endif
48 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
ReversibleAdhesiveSpecies::~ReversibleAdhesiveSpecies ( )
virtual

The default constructor.

Definition at line 50 of file ReversibleAdhesiveSpecies.cc.

51 {
52 #ifdef DEBUG_DESTRUCTOR
53  std::cout<<"ReversibleAdhesiveSpecies::~ReversibleAdhesiveSpecies() finished"<<std::endl;
54 #endif
55 }

Member Function Documentation

Mdouble ReversibleAdhesiveSpecies::getAdhesionForceMax ( ) const

Allows the spring constant to be accessed.

Definition at line 136 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_.

Referenced by ReversibleAdhesiveInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::getElasticEnergy(), and mix().

137 {
138  return adhesionForceMax_;
139 }
Mdouble adhesionForceMax_
adhesion force at zero overlap
Mdouble ReversibleAdhesiveSpecies::getAdhesionStiffness ( ) const

Allows the spring constant to be accessed.

Definition at line 119 of file ReversibleAdhesiveSpecies.cc.

References adhesionStiffness_.

Referenced by ReversibleAdhesiveInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::getElasticEnergy(), and mix().

120 {
121  return adhesionStiffness_;
122 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
std::string ReversibleAdhesiveSpecies::getBaseName ( ) const

Used in Species::getName to obtain a unique name for each Species.

Returns
a string containing the name of the species (minus the word "Species")

Definition at line 79 of file ReversibleAdhesiveSpecies.cc.

80 {
81  return "ReversibleAdhesive";
82 }
Mdouble ReversibleAdhesiveSpecies::getInteractionDistance ( ) const
virtual

returns the largest separation distance at which adhesive short-range forces can occur.

Returns
the maximum separation distance below which adhesive forces can occur (needed for contact detection)

Implements BaseSpecies.

Definition at line 96 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

97 {
98  if (adhesionStiffness_ != 0.0)
100  else
101  {
102  std::cerr << "ReversibleAdhesiveSpecies::getInteractionDistance(): adhesionStiffness cannot be zero" << std::endl;
103  exit(-1);
104  }
105 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
void ReversibleAdhesiveSpecies::mix ( ReversibleAdhesiveSpecies *const  S,
ReversibleAdhesiveSpecies *const  T 
)

creates default values for mixed species

For all parameters we assume that the harmonic mean of the parameters of the original two species is a sensible default.

Parameters
[in]S,Tthe two species whose properties are mixed to create the new species

Definition at line 89 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, adhesionStiffness_, BaseSpecies::average(), getAdhesionForceMax(), and getAdhesionStiffness().

90 {
93 }
Mdouble getAdhesionForceMax() const
Allows the spring constant to be accessed.
Mdouble average(Mdouble a, Mdouble b)
defines the average of two variables by the harmonic mean.
Definition: BaseSpecies.cc:85
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
Mdouble getAdhesionStiffness() const
Allows the spring constant to be accessed.
void ReversibleAdhesiveSpecies::read ( std::istream &  is)
virtual

Reads the species properties from an input stream.

Parameters
[in]isinput stream (typically the restart file)

Implements BaseObject.

Definition at line 69 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

70 {
71  std::string dummy;
72  is >> dummy >> adhesionForceMax_;
73  is >> dummy >> adhesionStiffness_;
74 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap
void ReversibleAdhesiveSpecies::setAdhesionForceMax ( Mdouble  new_f0)

Allows the spring constant to be changed.

Definition at line 125 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_.

126 {
127  if (new_f0 >= 0)
128  adhesionForceMax_ = new_f0;
129  else
130  {
131  std::cerr << "Error in setAdhesionForceMax" << std::endl;
132  exit(-1);
133  }
134 }
Mdouble adhesionForceMax_
adhesion force at zero overlap
void ReversibleAdhesiveSpecies::setAdhesionStiffness ( Mdouble  new_k0)

Allows the spring constant to be changed.

Definition at line 108 of file ReversibleAdhesiveSpecies.cc.

References adhesionStiffness_.

109 {
110  if (new_k0 >= 0)
111  adhesionStiffness_ = new_k0;
112  else
113  {
114  std::cerr << "Error in setAdhesionStiffness" << std::endl;
115  exit(-1);
116  }
117 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
void ReversibleAdhesiveSpecies::write ( std::ostream &  os) const
virtual

Writes the species properties to an output stream.

Parameters
[out]osoutput stream (typically the restart file)

Implements BaseObject.

Definition at line 60 of file ReversibleAdhesiveSpecies.cc.

References adhesionForceMax_, and adhesionStiffness_.

61  {
62  os << " adhesionForceMax " << adhesionForceMax_;
63  os << " adhesionStiffness " << adhesionStiffness_;
64 }
Mdouble adhesionStiffness_
stiffness of linear adhesion force
Mdouble adhesionForceMax_
adhesion force at zero overlap

Member Data Documentation

Mdouble ReversibleAdhesiveSpecies::adhesionForceMax_
private

adhesion force at zero overlap

Definition at line 86 of file ReversibleAdhesiveSpecies.h.

Referenced by getAdhesionForceMax(), getInteractionDistance(), mix(), read(), ReversibleAdhesiveSpecies(), setAdhesionForceMax(), and write().

Mdouble ReversibleAdhesiveSpecies::adhesionStiffness_
private

stiffness of linear adhesion force

Definition at line 83 of file ReversibleAdhesiveSpecies.h.

Referenced by getAdhesionStiffness(), getInteractionDistance(), mix(), read(), ReversibleAdhesiveSpecies(), setAdhesionStiffness(), and write().


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