Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM > Class Template Referenceabstract

#include <AbstractTwoBodyInteractionForce.hpp>

+ Inheritance diagram for AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 AbstractTwoBodyInteractionForce ()
 
bool GetUseCutOffLength ()
 
void SetCutOffLength (double cutOffLength)
 
double GetCutOffLength ()
 
virtual c_vector< double, SPACE_DIM > CalculateForceBetweenNodes (unsigned nodeAGlobalIndex, unsigned nodeBGlobalIndex, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)=0
 
void AddForceContribution (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)
 
virtual void OutputForceParameters (out_stream &rParamsFile)
 
virtual void WriteDataToVisualizerSetupFile (out_stream &pVizSetupFile)
 
- Public Member Functions inherited from AbstractForce< ELEMENT_DIM, SPACE_DIM >
 AbstractForce ()
 
virtual ~AbstractForce ()
 
void OutputForceInfo (out_stream &rParamsFile)
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

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
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >

An abstract class for two-body force laws.

Template Parameters
ELEMENT_DIMDimension of the elements.
SPACE_DIMDimension of the space. If not specified, it defaults to ELEMENT_DIM.

Definition at line 53 of file AbstractTwoBodyInteractionForce.hpp.

Constructor & Destructor Documentation

◆ AbstractTwoBodyInteractionForce()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::AbstractTwoBodyInteractionForce ( )

Constructor.

Definition at line 39 of file AbstractTwoBodyInteractionForce.cpp.

Member Function Documentation

◆ AddForceContribution()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::AddForceContribution ( AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &  rCellPopulation)
virtual

Overridden AddForceContribution() method.

Parameters
rCellPopulationreference to the cell population
Todo:
this could be tidied by using the rGetNodePairs for all populations and moving the below calculation into the MutableMesh.

Implements AbstractForce< ELEMENT_DIM, SPACE_DIM >.

Definition at line 67 of file AbstractTwoBodyInteractionForce.cpp.

References EXCEPTION, MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SpringsBegin(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::SpringsEnd().

◆ CalculateForceBetweenNodes()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual c_vector< double, SPACE_DIM > AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::CalculateForceBetweenNodes ( unsigned  nodeAGlobalIndex,
unsigned  nodeBGlobalIndex,
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &  rCellPopulation 
)
pure virtual

Calculates the force between two nodes.

Note that this assumes they are connected and is called by rCalculateVelocitiesOfEachNode().

As this method is pure virtual, it must be overridden in subclasses.

Parameters
nodeAGlobalIndexindex of one neighbouring node
nodeBGlobalIndexindex of the other neighbouring node
rCellPopulationthe cell population
Returns
The force exerted on Node A by Node B.

Implemented in GeneralisedLinearSpringForce< 2 >, GeneralisedLinearSpringForce< DIM >, GeneralisedLinearSpringForce< ELEMENT_DIM, SPACE_DIM >, and GeneralisedLinearSpringForce< ELEMENT_DIM, ELEMENT_DIM >.

◆ GetCutOffLength()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::GetCutOffLength ( )

Get the cutoff length.

Returns
mCutOffLength

Definition at line 61 of file AbstractTwoBodyInteractionForce.cpp.

◆ GetUseCutOffLength()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::GetUseCutOffLength ( )

Whether the force is using a cut of length.

Returns
mUseCutOffLength

Definition at line 47 of file AbstractTwoBodyInteractionForce.cpp.

◆ OutputForceParameters()

◆ serialize()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the object and its member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 66 of file AbstractTwoBodyInteractionForce.hpp.

References AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::mMechanicsCutOffLength, and AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::mUseCutOffLength.

◆ SetCutOffLength()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::SetCutOffLength ( double  cutOffLength)

Use a cutoff point, ie specify zero force if two cells are greater than the cutoff distance apart.

Parameters
cutOffLengththe cutoff to use

Definition at line 53 of file AbstractTwoBodyInteractionForce.cpp.

◆ WriteDataToVisualizerSetupFile()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::WriteDataToVisualizerSetupFile ( out_stream &  pVizSetupFile)
virtual

Overridden WriteDataToVisualizerSetupFile() method. Write any data necessary to a visualization setup file. Used by AbstractCellBasedSimulation::WriteVisualizerSetupFile().

Parameters
pVizSetupFilea visualization setup file

Reimplemented from AbstractForce< ELEMENT_DIM, SPACE_DIM >.

Definition at line 138 of file AbstractTwoBodyInteractionForce.cpp.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 58 of file AbstractTwoBodyInteractionForce.hpp.

Member Data Documentation

◆ mMechanicsCutOffLength

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::mMechanicsCutOffLength
protected

◆ mUseCutOffLength

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::mUseCutOffLength
protected

Whether to have zero force if the cells are far enough apart.

Definition at line 76 of file AbstractTwoBodyInteractionForce.hpp.

Referenced by CryptProjectionForce::CalculateForceBetweenNodes(), and AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::serialize().


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