#include <AbstractTwoBodyInteractionForce.hpp>
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 |
Definition at line 38 of file AbstractTwoBodyInteractionForce.hpp.
AbstractTwoBodyInteractionForce< DIM >::AbstractTwoBodyInteractionForce | ( | ) | [inline] |
Constructor.
Definition at line 33 of file AbstractTwoBodyInteractionForce.cpp.
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 GeneralisedLinearSpringForce< DIM >, CryptProjectionForce, LinearSpringWithVariableSpringConstantsForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Definition at line 52 of file AbstractTwoBodyInteractionForce.hpp.
References AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength, and AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength.
bool AbstractTwoBodyInteractionForce< DIM >::GetUseCutOffLength | ( | ) | [inline] |
Whether the force is using a cut of length
Definition at line 41 of file AbstractTwoBodyInteractionForce.cpp.
References 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 47 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength, and AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength.
double AbstractTwoBodyInteractionForce< DIM >::GetCutOffLength | ( | ) | [inline] |
Get the cutoff length.
Definition at line 56 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength.
Referenced by GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes().
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 GeneralisedLinearSpringForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Referenced by AbstractTwoBodyInteractionForce< DIM >::AddForceContribution().
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 LinearSpringWithVariableSpringConstantsForce< DIM >.
Definition at line 63 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::CalculateForceBetweenNodes(), AbstractCellPopulation< DIM >::IsMeshBasedCellPopulation(), MeshBasedCellPopulation< DIM >::SpringsBegin(), and MeshBasedCellPopulation< DIM >::SpringsEnd().
void AbstractTwoBodyInteractionForce< DIM >::OutputForceParameters | ( | out_stream & | rParamsFile | ) | [inline, virtual] |
Outputs force parameters to file
As this method is pure virtual, it must be overridden in subclasses.
rParamsFile | the file stream to which the parameters are output |
Implements AbstractForce< DIM >.
Reimplemented in GeneralisedLinearSpringForce< DIM >, CryptProjectionForce, LinearSpringWithVariableSpringConstantsForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Definition at line 135 of file AbstractTwoBodyInteractionForce.cpp.
References AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength, AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength, and AbstractForce< DIM >::OutputForceParameters().
Referenced by GeneralisedLinearSpringForce< DIM >::OutputForceParameters().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractForce< DIM >.
Reimplemented in GeneralisedLinearSpringForce< DIM >, CryptProjectionForce, LinearSpringWithVariableSpringConstantsForce< DIM >, and GeneralisedLinearSpringForce< 2 >.
Definition at line 44 of file AbstractTwoBodyInteractionForce.hpp.
bool AbstractTwoBodyInteractionForce< DIM >::mUseCutOffLength [protected] |
Whether to have zero force if the cells are far enough apart
Definition at line 63 of file AbstractTwoBodyInteractionForce.hpp.
Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), GeneralisedLinearSpringForce< DIM >::CalculateForceBetweenNodes(), AbstractTwoBodyInteractionForce< DIM >::GetUseCutOffLength(), AbstractTwoBodyInteractionForce< DIM >::OutputForceParameters(), AbstractTwoBodyInteractionForce< DIM >::serialize(), and AbstractTwoBodyInteractionForce< DIM >::SetCutOffLength().
double AbstractTwoBodyInteractionForce< DIM >::mMechanicsCutOffLength [protected] |
Mechanics cut off length.
Definition at line 68 of file AbstractTwoBodyInteractionForce.hpp.
Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), AbstractTwoBodyInteractionForce< DIM >::GetCutOffLength(), AbstractTwoBodyInteractionForce< DIM >::OutputForceParameters(), AbstractTwoBodyInteractionForce< DIM >::serialize(), and AbstractTwoBodyInteractionForce< DIM >::SetCutOffLength().