Chaste  Release::2018.1
PopulationTestingForce< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <PopulationTestingForce.hpp>

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

Public Member Functions

 PopulationTestingForce (bool hasPositionDependence=true)
 
void AddForceContribution (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)
 
c_vector< double, SPACE_DIM > GetExpectedOneStepLocationFE (unsigned nodeIndex, double damping, c_vector< double, SPACE_DIM > &oldLocation, double dt)
 
c_vector< double, SPACE_DIM > GetExpectedOneStepLocationRK4 (unsigned nodeIndex, double damping, c_vector< double, SPACE_DIM > &oldLocation, double dt)
 
c_vector< double, SPACE_DIM > GetExpectedOneStepLocationAM2 (unsigned nodeIndex, double damping, c_vector< double, SPACE_DIM > &oldLocation, double dt)
 
c_vector< double, SPACE_DIM > GetExpectedOneStepLocationBE (unsigned nodeIndex, double damping, c_vector< double, SPACE_DIM > &oldLocation, double dt)
 
virtual void OutputForceParameters (out_stream &rParamsFile)
 
- Public Member Functions inherited from AbstractForce< ELEMENT_DIM, SPACE_DIM >
 AbstractForce ()
 
virtual ~AbstractForce ()
 
void OutputForceInfo (out_stream &rParamsFile)
 
virtual void WriteDataToVisualizerSetupFile (out_stream &pVizSetupFile)
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Private Attributes

bool mWithPositionDependence
 

Friends

class boost::serialization::access
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
class PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >

A simple force law used to test node location updates across the off lattice population test files.

Definition at line 48 of file PopulationTestingForce.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::PopulationTestingForce ( bool  hasPositionDependence = true)

Constructor.

Parameters
hasPositionDependencespecifys which testing force to use (defaults to true)

Definition at line 39 of file PopulationTestingForce.cpp.

Member Function Documentation

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

Overridden AddForceContribution() method.

Parameters
rCellPopulationreference to the cell population

THis has two forces depending on the member variable mWithPositionDependence

If true then

For node i F[j] = 0.01 (j+1) i r[j]

Where r is the position of node i.

if false then

F[j] = 0.01 (j+1) i

Implements AbstractForce< ELEMENT_DIM, SPACE_DIM >.

Definition at line 46 of file PopulationTestingForce.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNode(), and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNumNodes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::GetExpectedOneStepLocationAM2 ( unsigned  nodeIndex,
double  damping,
c_vector< double, SPACE_DIM > &  oldLocation,
double  dt 
)

Helper method to return the expected step location for AdamsMoultonNumericalMethod.

Returns
the expected location after one step
Parameters
nodeIndexthe index of the node
dampingthe damping constant
oldLocationthe old location of the node
dtthe step size

Definition at line 108 of file PopulationTestingForce.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::GetExpectedOneStepLocationBE ( unsigned  nodeIndex,
double  damping,
c_vector< double, SPACE_DIM > &  oldLocation,
double  dt 
)

Helper method to return the expected step location for BackwardEulerNumericalMethod.

Returns
the expected location after one step
Parameters
nodeIndexthe index of the node
dampingthe damping constant
oldLocationthe old location of the node
dtthe step size

Definition at line 122 of file PopulationTestingForce.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::GetExpectedOneStepLocationFE ( unsigned  nodeIndex,
double  damping,
c_vector< double, SPACE_DIM > &  oldLocation,
double  dt 
)

Helper method to return the expected step location for ForwardEulerNumericalMethod.

Returns
the expected location after one step
Parameters
nodeIndexthe index of the node
dampingthe damping constant
oldLocationthe old location of the node
dtthe step size

Definition at line 69 of file PopulationTestingForce.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::GetExpectedOneStepLocationRK4 ( unsigned  nodeIndex,
double  damping,
c_vector< double, SPACE_DIM > &  oldLocation,
double  dt 
)

Helper method to return the expected step location for RK4NumericalMethod.

Returns
the expected location after one step
Parameters
nodeIndexthe index of the node
dampingthe damping constant
oldLocationthe old location of the node
dtthe step size

Definition at line 90 of file PopulationTestingForce.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::OutputForceParameters ( out_stream &  rParamsFile)
virtual

Overridden OutputForceParameters() method.

Parameters
rParamsFilethe file stream to which the parameters are output

Implements AbstractForce< ELEMENT_DIM, SPACE_DIM >.

Definition at line 136 of file PopulationTestingForce.cpp.

References NEVER_REACHED.

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

Boost Serialization method for archiving/checkpointing. Archives the object and its member variables.

Parameters
archiveThe boost archive.
versionThe current version of this class.

Definition at line 65 of file PopulationTestingForce.hpp.

References PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::mWithPositionDependence.

Friends And Related Function Documentation

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

Archiving.

Definition at line 55 of file PopulationTestingForce.hpp.

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::mWithPositionDependence
private

Whether the applied force should depend on the position of the node, or only its index Defaults to true, since that's better for testing a variety of numerical methods. Crypt tests require a position independent test force though.

Definition at line 76 of file PopulationTestingForce.hpp.

Referenced by PopulationTestingForce< ELEMENT_DIM, SPACE_DIM >::serialize().


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