Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
|
#include <OffLatticeSimulation.hpp>
Public Member Functions | |
OffLatticeSimulation (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true) | |
void | AddForce (boost::shared_ptr< AbstractForce< ELEMENT_DIM, SPACE_DIM > > pForce) |
void | RemoveAllForces () |
void | AddCellPopulationBoundaryCondition (boost::shared_ptr< AbstractCellPopulationBoundaryCondition< ELEMENT_DIM, SPACE_DIM > > pBoundaryCondition) |
void | RemoveAllCellPopulationBoundaryConditions () |
void | SetNumericalMethod (boost::shared_ptr< AbstractNumericalMethod< ELEMENT_DIM, SPACE_DIM > > pNumericalMethod) |
const boost::shared_ptr< AbstractNumericalMethod< ELEMENT_DIM, SPACE_DIM > > | GetNumericalMethod () const |
void | OutputAdditionalSimulationSetup (out_stream &rParamsFile) |
virtual void | OutputSimulationParameters (out_stream &rParamsFile) |
const std::vector< boost::shared_ptr< AbstractForce< ELEMENT_DIM, SPACE_DIM > > > & | rGetForceCollection () const |
Public Member Functions inherited from AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM > | |
AbstractCellBasedSimulation (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, bool deleteCellPopulationInDestructor=false, bool initialiseCells=true) | |
virtual | ~AbstractCellBasedSimulation () |
std::vector< double > | GetNodeLocation (const unsigned &rNodeIndex) |
double | GetDt () |
unsigned | GetNumBirths () |
unsigned | GetNumDeaths () |
std::string | GetOutputDirectory () |
void | SetDt (double dt) |
void | SetEndTime (double endTime) |
void | SetOutputDirectory (std::string outputDirectory) |
void | SetSamplingTimestepMultiple (unsigned samplingTimestepMultiple) |
void | SetUpdatingTimestepMultiple (unsigned updatingTimestepMultiple) |
void | SetNoBirth (bool noBirth) |
void | SetUpdateCellPopulationRule (bool updateCellPopulation) |
bool | GetUpdateCellPopulationRule () |
void | AddCellKiller (boost::shared_ptr< AbstractCellKiller< SPACE_DIM > > pCellKiller) |
void | RemoveAllCellKillers () |
void | AddSimulationModifier (boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > pSimulationModifier) |
std::vector< boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > > * | GetSimulationModifiers () |
void | AddTopologyUpdateSimulationModifier (boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > pSimulationModifier) |
std::vector< boost::shared_ptr< AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM > > > * | GetTopologyUpdateSimulationModifiers () |
void | Solve () |
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & | rGetCellPopulation () |
const AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & | rGetCellPopulation () const |
bool | GetOutputDivisionLocations () |
void | SetOutputDivisionLocations (bool outputDivisionLocations) |
bool | GetOutputCellVelocities () |
void | SetOutputCellVelocities (bool outputCellVelocities) |
Public Member Functions inherited from Identifiable | |
virtual | ~Identifiable () |
std::string | GetIdentifier () const |
Protected Member Functions | |
virtual void | UpdateCellLocationsAndTopology () |
void | RevertToOldLocations (std::map< Node< SPACE_DIM > *, c_vector< double, SPACE_DIM > > oldNodeLoctions) |
void | ApplyBoundaries (std::map< Node< SPACE_DIM > *, c_vector< double, SPACE_DIM > > oldNodeLoctions) |
virtual void | SetupSolve () |
virtual void | WriteVisualizerSetupFile () |
Protected Member Functions inherited from AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM > | |
virtual unsigned | DoCellBirth () |
unsigned | DoCellRemoval () |
virtual bool | StoppingEventHasOccurred () |
virtual void | UpdateCellPopulation () |
void | OutputSimulationSetup () |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | boost::serialization::access |
class | TestOffLatticeSimulation |
class | TestOffLatticeSimulationWithNodeBasedCellPopulation |
Run an off-lattice 2D or 3D cell-based simulation using an off-lattice cell population.
In cell-centre-based cell populations, each cell is represented by a single node (corresponding to its centre), and connectivity is defined either by a Delaunay triangulation or a radius of influence. In vertex- based cell populations, each cell is represented by a polytope (corresponding to its membrane) with a variable number of vertices. Alternative cell populations may be defined by the user.
The OffLatticeSimulation is constructed with a CellPopulation, which updates the correspondence between each Cell and its spatial representation and handles cell division (governed by the CellCycleModel associated with each cell). Once constructed, one or more Force laws may be passed to the OffLatticeSimulation object, to define the mechanical properties of the CellPopulation. Similarly, one or more CellKillers may be passed to the OffLatticeSimulation object to specify conditions in which Cells may die, and one or more CellPopulationBoundaryConditions to specify regions in space beyond which Cells may not move.
Definition at line 71 of file OffLatticeSimulation.hpp.
OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::OffLatticeSimulation | ( | AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > & | rCellPopulation, |
bool | deleteCellPopulationInDestructor = false , |
||
bool | initialiseCells = true |
||
) |
Constructor.
rCellPopulation | Reference to a cell population object |
deleteCellPopulationInDestructor | Whether to delete the cell population on destruction to free up memory (defaults to false) |
initialiseCells | Whether to initialise cells (defaults to true, set to false when loading from an archive) |
Definition at line 45 of file OffLatticeSimulation.cpp.
References EXCEPTION.
void OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::AddCellPopulationBoundaryCondition | ( | boost::shared_ptr< AbstractCellPopulationBoundaryCondition< ELEMENT_DIM, SPACE_DIM > > | pBoundaryCondition | ) |
Add a cell population boundary condition to be used in this simulation.
pBoundaryCondition | pointer to a boundary condition |
Definition at line 69 of file OffLatticeSimulation.cpp.
void OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::AddForce | ( | boost::shared_ptr< AbstractForce< ELEMENT_DIM, SPACE_DIM > > | pForce | ) |
Add a force to be used in this simulation (use this to set the mechanics system).
pForce | pointer to a force law |
Definition at line 57 of file OffLatticeSimulation.cpp.
|
protected |
Applies any boundary conditions.
oldNodeLoctions | Mapping between node indices and old node locations |
Definition at line 169 of file OffLatticeSimulation.cpp.
const boost::shared_ptr< AbstractNumericalMethod< ELEMENT_DIM, SPACE_DIM > > OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::GetNumericalMethod | ( | ) | const |
Definition at line 87 of file OffLatticeSimulation.cpp.
|
virtual |
Overridden OutputAdditionalSimulationSetup() method.
Output any force, boundary condition or numerical method information.
rParamsFile | the file stream to which the parameters are output |
Implements AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >.
Definition at line 227 of file OffLatticeSimulation.cpp.
|
virtual |
Overridden OutputSimulationParameters() method.
rParamsFile | the file stream to which the parameters are output |
Implements AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >.
Reimplemented in CryptSimulation1d, and CryptSimulation2d.
Definition at line 258 of file OffLatticeSimulation.cpp.
References AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >::OutputSimulationParameters().
Referenced by CryptSimulation1d::OutputSimulationParameters(), and CryptSimulation2d::OutputSimulationParameters().
void OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::RemoveAllCellPopulationBoundaryConditions | ( | ) |
Method to remove all the cell population boundary conditions
Definition at line 75 of file OffLatticeSimulation.cpp.
void OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::RemoveAllForces | ( | ) |
Remove all the forces.
Definition at line 63 of file OffLatticeSimulation.cpp.
|
protected |
Sends nodes back to the positions given in the input map. Used after a failed step when adaptivity is turned on.
oldNodeLoctions | A map linking nodes to their old positions. |
Definition at line 158 of file OffLatticeSimulation.cpp.
const std::vector< boost::shared_ptr< AbstractForce< ELEMENT_DIM, SPACE_DIM > > > & OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::rGetForceCollection | ( | ) | const |
Directly access the forces attached to this simulation, to allow their manipulation after archiving.
Definition at line 93 of file OffLatticeSimulation.cpp.
|
inlineprivate |
Save or restore the simulation.
archive | the archive |
version | the current version of this class |
Definition at line 87 of file OffLatticeSimulation.hpp.
References OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::mBoundaryConditions, OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::mForceCollection, and OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::mpNumericalMethod.
void OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::SetNumericalMethod | ( | boost::shared_ptr< AbstractNumericalMethod< ELEMENT_DIM, SPACE_DIM > > | pNumericalMethod | ) |
Set the numerical method to be used in this simulation (use this to solve the mechanics system).
pNumericalMethod | pointer to a numerical method object |
Definition at line 81 of file OffLatticeSimulation.cpp.
|
protectedvirtual |
Overridden SetupSolve() method to clear the forces applied to the nodes.
Reimplemented from AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >.
Reimplemented in CryptSimulation2d.
Definition at line 206 of file OffLatticeSimulation.cpp.
Referenced by CryptSimulation2d::SetupSolve().
|
protectedvirtual |
Overridden UpdateCellLocationsAndTopology() method.
Calculate forces and update node positions.
Implements AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >.
Definition at line 99 of file OffLatticeSimulation.cpp.
References GenericEventHandler< 11, CellBasedEventHandler >::BeginEvent().
|
protectedvirtual |
Overridden WriteVisualizerSetupFile() method.
Reimplemented from AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >.
Definition at line 192 of file OffLatticeSimulation.cpp.
References PetscTools::AmMaster().
|
friend |
Needed for serialization.
Definition at line 76 of file OffLatticeSimulation.hpp.
|
friend |
Definition at line 77 of file OffLatticeSimulation.hpp.
|
friend |
Definition at line 78 of file OffLatticeSimulation.hpp.
|
protected |
List of boundary conditions.
Definition at line 101 of file OffLatticeSimulation.hpp.
Referenced by OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
The mechanics used to determine the new location of the cells, a list of the forces.
Definition at line 98 of file OffLatticeSimulation.hpp.
Referenced by OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::serialize().
|
protected |
The numerical method to use in this simulation. Defaults to the explicit forward Euler method.
Definition at line 104 of file OffLatticeSimulation.hpp.
Referenced by OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::serialize().