#include <AbstractTwoBodyInteractionForce.hpp>
Inherits AbstractForce< DIM >.
Inherited by BuskeAdhesiveForce< DIM >, BuskeElasticForce< DIM >, GeneralisedLinearSpringForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Public Member Functions | |
AbstractTwoBodyInteractionForce () | |
bool | GetUseCutOffLength () |
void | SetCutOffLength (double cutOffLength) |
double | GetCutOffLength () |
virtual c_vector< double, DIM > | CalculateForceBetweenNodes (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< DIM > &rCellPopulation)=0 |
void | AddForceContribution (std::vector< c_vector< double, DIM > > &rForces, AbstractCellPopulation< DIM > &rCellPopulation) |
virtual void | OutputForceParameters (out_stream &rParamsFile) |
Protected Attributes | |
bool | mUseCutOffLength |
double | mMechanicsCutOffLength |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | boost::serialization::access |
An abstract class for two-body force laws.
Definition at line 39 of file AbstractTwoBodyInteractionForce.hpp.
AbstractTwoBodyInteractionForce< DIM >::AbstractTwoBodyInteractionForce | ( | ) | [inline] |
Constructor.
Definition at line 32 of file AbstractTwoBodyInteractionForce.cpp.
void AbstractTwoBodyInteractionForce< DIM >::AddForceContribution | ( | std::vector< c_vector< double, DIM > > & | rForces, | |
AbstractCellPopulation< DIM > & | rCellPopulation | |||
) | [inline, virtual] |
Overridden AddForceContribution() method.
rForces | reference to vector of forces on nodes | |
rCellPopulation | reference to the cell population |
Implements AbstractForce< DIM >.
Reimplemented in RepulsionForce< DIM >, and LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 60 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::CalculateForceBetweenNodes(), EXCEPTION, MeshBasedCellPopulation< DIM >::SpringsBegin(), and MeshBasedCellPopulation< DIM >::SpringsEnd().
virtual c_vector<double, DIM> AbstractTwoBodyInteractionForce< DIM >::CalculateForceBetweenNodes | ( | unsigned | nodeAGlobalIndex, | |
unsigned | nodeBGlobalIndex, | |||
AbstractCellPopulation< DIM > & | rCellPopulation | |||
) | [pure virtual] |
Calculates the force between two nodes.
Note that this assumes they are connected and is called by rCalculateVelocitiesOfEachNode()
nodeAGlobalIndex | index of one neighbouring node | |
nodeBGlobalIndex | index of the other neighbouring node | |
rCellPopulation | the cell population |
Implemented in BuskeAdhesiveForce< DIM >, BuskeElasticForce< DIM >, GeneralisedLinearSpringForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Referenced by AbstractTwoBodyInteractionForce< DIM >::AddForceContribution().
double AbstractTwoBodyInteractionForce< DIM >::GetCutOffLength | ( | ) | [inline] |
Get the cutoff length.
Definition at line 54 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength.
Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), BuskeElasticForce< DIM >::CalculateForceBetweenNodes(), and BuskeAdhesiveForce< DIM >::CalculateForceBetweenNodes().
bool AbstractTwoBodyInteractionForce< DIM >::GetUseCutOffLength | ( | ) | [inline] |
Whether the force is using a cut of length.
Definition at line 40 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength.
void AbstractTwoBodyInteractionForce< DIM >::OutputForceParameters | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Overridden OutputForceParameters() method.
rParamsFile | the file stream to which the parameters are output |
Implements AbstractForce< DIM >.
Reimplemented in BuskeAdhesiveForce< DIM >, BuskeElasticForce< DIM >, GeneralisedLinearSpringForce< DIM >, RepulsionForce< DIM >, CryptProjectionForce, LinearSpringWithVariableSpringConstantsForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Definition at line 138 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength, and AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength.
void AbstractTwoBodyInteractionForce< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the object and its member variables.
archive | the archive | |
version | the current version of this class |
Reimplemented from AbstractForce< DIM >.
Reimplemented in BuskeAdhesiveForce< DIM >, BuskeElasticForce< DIM >, GeneralisedLinearSpringForce< DIM >, RepulsionForce< DIM >, CryptProjectionForce, LinearSpringWithVariableSpringConstantsForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Definition at line 52 of file AbstractTwoBodyInteractionForce.hpp.
References AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength, and AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength.
void AbstractTwoBodyInteractionForce< DIM >::SetCutOffLength | ( | double | cutOffLength | ) | [inline] |
Use a cutoff point, ie specify zero force if two cells are greater than the cutoff distance apart.
cutOffLength | the cutoff to use |
Definition at line 46 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength, and AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractForce< DIM >.
Reimplemented in BuskeAdhesiveForce< DIM >, BuskeElasticForce< DIM >, GeneralisedLinearSpringForce< DIM >, RepulsionForce< DIM >, CryptProjectionForce, LinearSpringWithVariableSpringConstantsForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Definition at line 44 of file AbstractTwoBodyInteractionForce.hpp.
double AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength [protected] |
Mechanics cut off length.
Definition at line 65 of file AbstractTwoBodyInteractionForce.hpp.
Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), AbstractTwoBodyInteractionForce< DIM >::GetCutOffLength(), AbstractTwoBodyInteractionForce< DIM >::OutputForceParameters(), AbstractTwoBodyInteractionForce< DIM >::serialize(), and AbstractTwoBodyInteractionForce< DIM >::SetCutOffLength().
bool AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength [protected] |
Whether to have zero force if the cells are far enough apart.
Definition at line 62 of file AbstractTwoBodyInteractionForce.hpp.
Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), BuskeElasticForce< DIM >::CalculateForceBetweenNodes(), BuskeAdhesiveForce< DIM >::CalculateForceBetweenNodes(), AbstractTwoBodyInteractionForce< DIM >::GetUseCutOffLength(), AbstractTwoBodyInteractionForce< DIM >::OutputForceParameters(), AbstractTwoBodyInteractionForce< DIM >::serialize(), and AbstractTwoBodyInteractionForce< DIM >::SetCutOffLength().