Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
ImmersedBoundaryCellPopulation< DIM > Class Template Reference

#include <ImmersedBoundaryCellPopulation.hpp>

+ Inheritance diagram for ImmersedBoundaryCellPopulation< DIM >:
+ Collaboration diagram for ImmersedBoundaryCellPopulation< DIM >:

Public Member Functions

 ImmersedBoundaryCellPopulation (ImmersedBoundaryMesh< DIM, DIM > &rMesh, std::vector< CellPtr > &rCells, bool deleteMesh=false, bool validate=true, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
 ImmersedBoundaryCellPopulation (ImmersedBoundaryMesh< DIM, DIM > &rMesh)
 
virtual ~ImmersedBoundaryCellPopulation ()
 
double GetDampingConstant (unsigned nodeIndex)
 
ImmersedBoundaryMesh< DIM, DIM > & rGetMesh ()
 
const ImmersedBoundaryMesh< DIM, DIM > & rGetMesh () const
 
ImmersedBoundaryElement< DIM, DIM > * GetElement (unsigned elementIndex)
 
ImmersedBoundaryElement< DIM - 1, DIM > * GetLamina (unsigned laminaIndex)
 
unsigned GetNumElements ()
 
unsigned GetNumLaminas ()
 
unsigned GetNumNodes ()
 
void SetInteractionDistance (double newDistance)
 
double GetInteractionDistance () const
 
void SetReMeshFrequency (unsigned newFrequency)
 
unsigned GetReMeshFrequency () const
 
void SetThrowsStepSizeException (bool throws)
 
bool ThrowsStepSizeException () const
 
double GetIntrinsicSpacing () const
 
void SetCellRearrangementThreshold (double newThreshold)
 
double GetCellRearrangementThreshold () const
 
c_vector< double, DIM > GetLocationOfCellCentre (CellPtr pCell)
 
Node< DIM > * GetNode (unsigned index)
 
std::set< unsignedGetNeighbouringLocationIndices (CellPtr pCell)
 
unsigned AddNode (Node< DIM > *pNewNode)
 
void UpdateNodeLocations (double dt)
 
void SetNode (unsigned index, ChastePoint< DIM > &rNewLocation)
 
ImmersedBoundaryElement< DIM, DIM > * GetElementCorrespondingToCell (CellPtr pCell)
 
CellPtr AddCell (CellPtr pNewCell, CellPtr pParentCell=CellPtr())
 
unsigned RemoveDeadCells ()
 
bool IsCellAssociatedWithADeletedLocation (CellPtr pCell)
 
void Update (bool hasHadBirthsOrDeaths=true)
 
virtual void OpenWritersFiles (OutputFileHandler &rOutputFileHandler)
 
virtual void AcceptPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
 
virtual void AcceptPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< DIM, DIM > > pPopulationEventWriter)
 
virtual void AcceptPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
 
virtual void AcceptCellWriter (boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
 
double GetVolumeOfCell (CellPtr pCell)
 
void OutputCellPopulationParameters (out_stream &rParamsFile)
 
double GetWidth (const unsigned &rDimension)
 
std::set< unsignedGetNeighbouringNodeIndices (unsigned index)
 
virtual TetrahedralMesh< DIM, DIM > * GetTetrahedralMeshForPdeModifier ()
 
virtual bool IsPdeNodeAssociatedWithNonApoptoticCell (unsigned pdeNodeIndex)
 
virtual double GetCellDataItemAtPdeNode (unsigned pdeNodeIndex, std::string &rVariableName, bool dirichletBoundaryConditionApplies=false, double dirichletBoundaryValue=0.0)
 
boost::shared_ptr< AbstractImmersedBoundaryDivisionRule< DIM > > GetImmersedBoundaryDivisionRule ()
 
void SetImmersedBoundaryDivisionRule (boost::shared_ptr< AbstractImmersedBoundaryDivisionRule< DIM > > pImmersedBoundaryDivisionRule)
 
bool DoesPopulationHaveActiveSources () const
 
bool IsCellOnBoundary (CellPtr pCell)
 
void SetIfPopulationHasActiveSources (bool hasActiveSources)
 
void SetOutputNodeRegionToVtk (bool outputNodeRegionsToVtk)
 
virtual void CheckForStepSizeException (unsigned nodeIndex, c_vector< double, DIM > &rDisplacement, double dt)
 
virtual double GetDefaultTimeStep ()
 
- Public Member Functions inherited from AbstractOffLatticeCellPopulation< DIM >
 AbstractOffLatticeCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
virtual unsigned AddNode (Node< SPACE_DIM > *pNewNode)=0
 
virtual void SetNode (unsigned nodeIndex, ChastePoint< SPACE_DIM > &rNewLocation)=0
 
virtual void CheckForStepSizeException (unsigned nodeIndex, c_vector< double, SPACE_DIM > &rDisplacement, double dt)=0
 
void SetDampingConstantNormal (double dampingConstantNormal)
 
void SetDampingConstantMutant (double dampingConstantMutant)
 
void SetAbsoluteMovementThreshold (double absoluteMovementThreshold)
 
double GetAbsoluteMovementThreshold ()
 
double GetDampingConstantNormal ()
 
double GetDampingConstantMutant ()
 
- Public Member Functions inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >
 AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 
virtual ~AbstractCellPopulation ()
 
void InitialiseCells ()
 
void SetDataOnAllCells (const std::string &rDataName, double dataValue)
 
AbstractMesh< ELEMENT_DIM, SPACE_DIM > & rGetMesh ()
 
std::list< CellPtr > & rGetCells ()
 
virtual void WriteDataToVisualizerSetupFile (out_stream &pVizSetupFile)
 
std::vector< unsignedGetCellMutationStateCount ()
 
std::vector< unsignedGetCellProliferativeTypeCount ()
 
std::vector< unsignedGetCellCyclePhaseCount ()
 
unsigned GetNumRealCells ()
 
unsigned GetNumAllCells ()
 
void SetCellAncestorsToLocationIndices ()
 
std::set< unsignedGetCellAncestors ()
 
virtual CellPtr GetCellUsingLocationIndex (unsigned index)
 
std::set< CellPtr > GetCellsUsingLocationIndex (unsigned index)
 
virtual bool IsCellAttachedToLocationIndex (unsigned index)
 
void SetCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
virtual void AddCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
virtual void RemoveCellUsingLocationIndex (unsigned index, CellPtr pCell)
 
void MoveCellInLocationMap (CellPtr pCell, unsigned old_index, unsigned new_index)
 
unsigned GetLocationIndexUsingCell (CellPtr pCell)
 
boost::shared_ptr< CellPropertyRegistryGetCellPropertyRegistry ()
 
void SetDefaultCellMutationStateAndProliferativeTypeOrdering ()
 
virtual std::set< std::pair< unsigned, unsigned > > GetNeighbouringEdgeIndices (CellPtr pCell, unsigned pEdgeIndex)
 
c_vector< double, SPACE_DIM > GetCentroidOfCellPopulation ()
 
virtual void UpdateCellProcessLocation ()
 
virtual void CloseWritersFiles ()
 
virtual void WriteResultsToFiles (const std::string &rDirectory)
 
virtual void AcceptPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)=0
 
virtual void AcceptPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationCountWriter)=0
 
virtual void AcceptPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationEventWriter)=0
 
virtual void AcceptCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter, CellPtr pCell)=0
 
std::vector< std::string > GetDivisionsInformation ()
 
void AddDivisionInformation (std::string divisionInformation)
 
void ClearDivisionsInformation ()
 
std::vector< std::string > GetRemovalsInformation ()
 
void AddRemovalInformation (std::string removalInformation)
 
void ClearRemovalsInformation ()
 
void GenerateRemovalInformation (CellPtr pCell, std::string killerInfo)
 
void KillCell (CellPtr pCell, std::string killerInfo)
 
void StartApoptosisOnCell (CellPtr pCell, std::string killerInfo)
 
void OutputCellPopulationInfo (out_stream &rParamsFile)
 
virtual void SimulationSetupHook (AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM > *pSimulation)
 
bool GetOutputResultsForChasteVisualizer ()
 
template<template< unsigned, unsigned > class T>
void AddPopulationWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellPopulationCountWriter ()
 
template<template< unsigned, unsigned > class T>
void AddCellPopulationEventWriter ()
 
void AddPopulationWriter (boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > pPopulationWriter)
 
void AddCellWriter (boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > pCellWriter)
 
void AddCellPopulationCountWriter (boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > pCellPopulationCountWriter)
 
void AddCellPopulationEventWriter (boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > pCellPopulationEventWriter)
 
template<template< unsigned, unsigned > class T>
bool HasWriter () const
 
void SetOutputResultsForChasteVisualizer (bool outputResultsForChasteVisualizer)
 
c_vector< double, SPACE_DIM > GetSizeOfCellPopulation ()
 
virtual bool IsRoomToDivide (CellPtr pCell)
 
std::pair< unsigned, unsignedCreateOrderedPair (unsigned index1, unsigned index2)
 
Iterator Begin ()
 
Iterator End ()
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Private Member Functions

virtual void WriteVtkResultsToFile (const std::string &rDirectory)
 
template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 
double Delta1D (double dist, double spacing)
 
double CalculateIntrinsicCellSize ()
 
void Validate ()
 

Private Attributes

bool mDeleteMesh
 
ImmersedBoundaryMesh< DIM, DIM > * mpImmersedBoundaryMesh
 
boost::shared_ptr< AbstractImmersedBoundaryDivisionRule< DIM > > mpImmersedBoundaryDivisionRule
 
double mIntrinsicSpacing
 
bool mPopulationHasActiveSources
 
bool mOutputNodeRegionToVtk
 
double mInteractionDistance
 
unsigned mReMeshFrequency
 
bool mThrowStepSizeException
 
double mCellRearrangementThreshold
 

Friends

class TestImmersedBoundaryDivisionRules
 
class TestImmersedBoundaryCellPopulation
 
class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractOffLatticeCellPopulation< DIM >
 AbstractOffLatticeCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
 
- Protected Member Functions inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >
 AbstractCellPopulation (AbstractMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
 
virtual void AcceptCellWritersAcrossPopulation ()
 
- Protected Attributes inherited from AbstractOffLatticeCellPopulation< DIM >
double mDampingConstantNormal
 
double mDampingConstantMutant
 
double mAbsoluteMovementThreshold
 
- Protected Attributes inherited from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >
std::map< unsigned, std::set< CellPtr > > mLocationCellMap
 
std::map< Cell *, unsignedmCellLocationMap
 
AbstractMesh< ELEMENT_DIM, SPACE_DIM > & mrMesh
 
std::list< CellPtr > mCells
 
c_vector< double, SPACE_DIM > mCentroid
 
out_stream mpVtkMetaFile
 
boost::shared_ptr< CellPropertyRegistrympCellPropertyRegistry
 
bool mOutputResultsForChasteVisualizer
 
std::vector< boost::shared_ptr< AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > > > mCellWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationCountWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationCountWriters
 
std::vector< boost::shared_ptr< AbstractCellPopulationEventWriter< ELEMENT_DIM, SPACE_DIM > > > mCellPopulationEventWriters
 
std::vector< std::string > mDivisionsInformation
 
std::vector< std::string > mRemovalsInformation
 

Detailed Description

template<unsigned DIM>
class ImmersedBoundaryCellPopulation< DIM >

A facade class encapsulating an immersed boundary cell population.

Contains a group of cells and maintains the associations between CellPtrs and elements in the ImmersedBoundaryMesh.

Definition at line 57 of file ImmersedBoundaryCellPopulation.hpp.

Constructor & Destructor Documentation

◆ ImmersedBoundaryCellPopulation() [1/2]

template<unsigned DIM>
ImmersedBoundaryCellPopulation< DIM >::ImmersedBoundaryCellPopulation ( ImmersedBoundaryMesh< DIM, DIM > &  rMesh,
std::vector< CellPtr > &  rCells,
bool  deleteMesh = false,
bool  validate = true,
const std::vector< unsigned locationIndices = std::vector<unsigned>() 
)

Create a new cell population facade from a mesh and collection of cells.

There must be precisely one CellPtr for each ImmersedBoundaryElement in the mesh.

Parameters
rMeshreference to an immersed boundary mesh. Each element in the mesh will correspond to a cell.
rCellsreference to a vector of CellPtrs
deleteMeshset to true if you want the cell population to free the mesh memory on destruction (defaults to false)
validatewhether to validate the cell population when it is created (defaults to true)
locationIndicesan optional vector of location indices that correspond to real cells

Definition at line 49 of file ImmersedBoundaryCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::AddCellUsingLocationIndex(), ImmersedBoundaryCellPopulation< DIM >::CalculateIntrinsicCellSize(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mCells, ImmersedBoundaryCellPopulation< DIM >::mInteractionDistance, ImmersedBoundaryCellPopulation< DIM >::mpImmersedBoundaryDivisionRule, ImmersedBoundaryCellPopulation< DIM >::mpImmersedBoundaryMesh, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh, ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetElementDivisionSpacing(), ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM >::SetNeighbourDist(), and ImmersedBoundaryCellPopulation< DIM >::Validate().

◆ ImmersedBoundaryCellPopulation() [2/2]

Constructor for use by boost serialization ONLY!

Parameters
rMeshan immersed boundary mesh.

Definition at line 93 of file ImmersedBoundaryCellPopulation.cpp.

References ImmersedBoundaryCellPopulation< DIM >::mpImmersedBoundaryMesh, and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::mrMesh.

◆ ~ImmersedBoundaryCellPopulation()

Destructor, which frees any memory allocated by the constructor.

Definition at line 108 of file ImmersedBoundaryCellPopulation.cpp.

Member Function Documentation

◆ AcceptCellWriter()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::AcceptCellWriter ( boost::shared_ptr< AbstractCellWriter< DIM, DIM > >  pCellWriter,
CellPtr  pCell 
)
virtual

Overridden AcceptCellWriter() method.

Parameters
pCellWriterthe population writer.
pCellthe cell whose data are being written.

Definition at line 626 of file ImmersedBoundaryCellPopulation.cpp.

◆ AcceptPopulationCountWriter()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::AcceptPopulationCountWriter ( boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > >  pPopulationCountWriter)
virtual

Overridden AcceptPopulationCountWriter() method.

Parameters
pPopulationCountWriterthe population count writer.

Definition at line 619 of file ImmersedBoundaryCellPopulation.cpp.

◆ AcceptPopulationEventWriter()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::AcceptPopulationEventWriter ( boost::shared_ptr< AbstractCellPopulationEventWriter< DIM, DIM > >  pPopulationEventWriter)
virtual

Overridden AcceptPopulationWriter() method.

Parameters
pPopulationEventWriterthe population event writer.

Definition at line 612 of file ImmersedBoundaryCellPopulation.cpp.

◆ AcceptPopulationWriter()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::AcceptPopulationWriter ( boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > >  pPopulationWriter)
virtual

Overridden AcceptPopulationWriter() method.

Parameters
pPopulationWriterthe population writer.

Definition at line 605 of file ImmersedBoundaryCellPopulation.cpp.

◆ AddCell()

template<unsigned DIM>
CellPtr ImmersedBoundaryCellPopulation< DIM >::AddCell ( CellPtr  pNewCell,
CellPtr  pParentCell = CellPtr() 
)
virtual

Overridden AddCell() method.

Add a new cell to the cell population.

Parameters
pNewCellthe cell to add
pParentCellpointer to a parent cell (if required)
Returns
address of cell as it appears in the cell list (internal of this method uses a copy constructor along the way)

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 277 of file ImmersedBoundaryCellPopulation.cpp.

◆ AddNode()

template<unsigned DIM>
unsigned ImmersedBoundaryCellPopulation< DIM >::AddNode ( Node< DIM > *  pNewNode)

Overridden AddNode() method. Add a new node to the cell population.

Parameters
pNewNodepointer to the new node
Returns
global index of new node in cell population

Definition at line 242 of file ImmersedBoundaryCellPopulation.cpp.

◆ CalculateIntrinsicCellSize()

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::CalculateIntrinsicCellSize ( )
private

Helper method for the constructor. Calculate an intrinsic length scale based on the size of elements in the mesh.

Returns
computed intrinsic length scale

Definition at line 117 of file ImmersedBoundaryCellPopulation.cpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::ImmersedBoundaryCellPopulation().

◆ CheckForStepSizeException()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::CheckForStepSizeException ( unsigned  nodeIndex,
c_vector< double, DIM > &  rDisplacement,
double  dt 
)
virtual

Checks whether a given node displacement violates the movement threshold for this population. If so, a stepSizeException is generated that contains a warning/error message and a suggested smaller dt that should avoid the problem.

Parameters
nodeIndexIndex of the node in question (allows us to check whether this is a ghost or particle)
rDisplacementMovement vector of the node at this time step
dtCurrent time step size

Definition at line 578 of file ImmersedBoundaryCellPopulation.cpp.

◆ Delta1D()

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::Delta1D ( double  dist,
double  spacing 
)
private

Helper method. Calculate the discrete delta approximation based on distance and grid spacing.

Parameters
distdistance between the two points
spacingthe grid spacing
Returns
computed Delta1D value

Definition at line 517 of file ImmersedBoundaryCellPopulation.cpp.

◆ DoesPopulationHaveActiveSources()

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::DoesPopulationHaveActiveSources ( ) const
Returns
mPopulationHasActiveSources whether the population has active fluid sources

Definition at line 1083 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetCellDataItemAtPdeNode()

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::GetCellDataItemAtPdeNode ( unsigned  pdeNodeIndex,
std::string &  rVariableName,
bool  dirichletBoundaryConditionApplies = false,
double  dirichletBoundaryValue = 0.0 
)
virtual

Overridden GetCellDataItemAtPdeNode() method.

Parameters
pdeNodeIndexindex of a node in a tetrahedral mesh for use with a PDE modifier
rVariableNamethe name of the cell data item to get
dirichletBoundaryConditionApplieswhere a Dirichlet boundary condition is used (optional; defaults to false)
dirichletBoundaryValuethe value of the Dirichlet boundary condition, if used (optional; defaults to 0.0)
Returns
the value of a CellData item (interpolated if necessary) at a node, specified by its index in a tetrahedral mesh for use with a PDE modifier.

This method can be called by PDE modifier classes.

Todo:
Work out a better way to do the nodes not associated with cells

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1018 of file ImmersedBoundaryCellPopulation.cpp.

References Node< SPACE_DIM >::rGetContainingElementIndices().

◆ GetCellRearrangementThreshold()

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::GetCellRearrangementThreshold ( ) const
Returns
mCellRearrangementThreshold.

Definition at line 211 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetDampingConstant()

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::GetDampingConstant ( unsigned  nodeIndex)
virtual

Overridden GetDampingConstant() method.

Parameters
nodeIndexthe global index of this node
Returns
the average damping constant of the cells surrounding the node.

Implements AbstractOffLatticeCellPopulation< DIM >.

Definition at line 132 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetDefaultTimeStep()

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::GetDefaultTimeStep ( )
virtual

Overridden GetDefaultTimeStep() method.

Returns
a default value for the time step to use when simulating the cell population.

A hard-coded value of 0.002 is returned. However, note that the time step can be reset by calling SetDt() on the simulation object used to simulate the cell population.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 1109 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetElement()

template<unsigned DIM>
ImmersedBoundaryElement< DIM, DIM > * ImmersedBoundaryCellPopulation< DIM >::GetElement ( unsigned  elementIndex)

◆ GetElementCorrespondingToCell()

template<unsigned DIM>
ImmersedBoundaryElement< DIM, DIM > * ImmersedBoundaryCellPopulation< DIM >::GetElementCorrespondingToCell ( CellPtr  pCell)

Get a pointer to the element corresponding to a given CellPtr.

Parameters
pCellthe cell
Returns
pointer to the element.

Definition at line 258 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetImmersedBoundaryDivisionRule()

template<unsigned DIM>
boost::shared_ptr< AbstractImmersedBoundaryDivisionRule< DIM > > ImmersedBoundaryCellPopulation< DIM >::GetImmersedBoundaryDivisionRule ( )
Returns
The division rule that is currently being used.

Definition at line 1070 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetInteractionDistance()

◆ GetIntrinsicSpacing()

◆ GetLamina()

template<unsigned DIM>
ImmersedBoundaryElement< DIM - 1, DIM > * ImmersedBoundaryCellPopulation< DIM >::GetLamina ( unsigned  laminaIndex)

Get a particular ImmersedBoundaryElement representing a lamina. A lamina is a reduced-dimension element. For a 2d simulation, a lamina element is a line. For a 3d simulation, a lamina element is a surface.

Parameters
laminaIndexthe global index of the lamina
Returns
a pointer to the lamina.

Definition at line 156 of file ImmersedBoundaryCellPopulation.cpp.

Referenced by AbstractImmersedBoundaryForce< DIM >::AddNormalNoiseToNodes().

◆ GetLocationOfCellCentre()

template<unsigned DIM>
c_vector< double, DIM > ImmersedBoundaryCellPopulation< DIM >::GetLocationOfCellCentre ( CellPtr  pCell)
virtual

Overridden GetLocationOfCellCentre() method. Find the centre of mass of a given cell (assuming uniform density). Note that, as there is no guarantee of convexity, this may lie outside the ImmersedBoundaryElement corresponding to the cell.

Parameters
pCella cell in the population
Returns
the location of the centre of mass of the element corresponding to this cell.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 168 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetNeighbouringLocationIndices()

template<unsigned DIM>
std::set< unsigned > ImmersedBoundaryCellPopulation< DIM >::GetNeighbouringLocationIndices ( CellPtr  pCell)
virtual

Overridden GetNeighbouringLocationIndices() method. Given a cell, returns the set of location indices corresponding to neighbouring cells. At least once per timestep, UpdateCellCentroids() should be called before this function.

Parameters
pCella cell
Returns
the set of neighbouring location indices.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 235 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetNeighbouringNodeIndices()

template<unsigned DIM>
std::set< unsigned > ImmersedBoundaryCellPopulation< DIM >::GetNeighbouringNodeIndices ( unsigned  index)
virtual

Overridden GetNeighbouringNodeIndices() method.

Parameters
indexthe node index
Returns
the set of neighbouring node indices.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 831 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetNode()

template<unsigned DIM>
Node< DIM > * ImmersedBoundaryCellPopulation< DIM >::GetNode ( unsigned  index)
virtual

Overridden GetNode() method.

Parameters
indexglobal index of the specified node
Returns
a pointer to the node.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 174 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetNumElements()

template<unsigned DIM>
unsigned ImmersedBoundaryCellPopulation< DIM >::GetNumElements ( )
Returns
the number of ImmersedBoundaryElements in the cell population.

Definition at line 265 of file ImmersedBoundaryCellPopulation.cpp.

Referenced by AbstractImmersedBoundaryForce< DIM >::AddNormalNoiseToNodes().

◆ GetNumLaminas()

template<unsigned DIM>
unsigned ImmersedBoundaryCellPopulation< DIM >::GetNumLaminas ( )
Returns
the number of ImmersedBoundaryLaminas in the cell population.

Definition at line 271 of file ImmersedBoundaryCellPopulation.cpp.

Referenced by AbstractImmersedBoundaryForce< DIM >::AddNormalNoiseToNodes().

◆ GetNumNodes()

template<unsigned DIM>
unsigned ImmersedBoundaryCellPopulation< DIM >::GetNumNodes ( )
virtual

Overridden GetNumNodes() method.

Returns
the number of nodes in the cell population.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 162 of file ImmersedBoundaryCellPopulation.cpp.

Referenced by ImmersedBoundaryKinematicFeedbackForce< DIM >::AddImmersedBoundaryForceContribution().

◆ GetReMeshFrequency()

template<unsigned DIM>
unsigned ImmersedBoundaryCellPopulation< DIM >::GetReMeshFrequency ( ) const
Returns
mReMeshFrequency.

Definition at line 199 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetTetrahedralMeshForPdeModifier()

◆ GetVolumeOfCell()

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::GetVolumeOfCell ( CellPtr  pCell)
virtual

Overridden GetVolumeOfCell() method.

Parameters
pCellboost shared pointer to a cell
Returns
volume via associated mesh element

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 633 of file ImmersedBoundaryCellPopulation.cpp.

◆ GetWidth()

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::GetWidth ( const unsigned rDimension)
virtual

Overridden GetWidth() method.

Calculate the 'width' of any dimension of the cell population by calling GetWidth() on the mesh.

Parameters
rDimensiona dimension (0,1 or 2)
Returns
The maximum distance between any nodes in this dimension.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 824 of file ImmersedBoundaryCellPopulation.cpp.

◆ IsCellAssociatedWithADeletedLocation()

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::IsCellAssociatedWithADeletedLocation ( CellPtr  pCell)
virtual

Overridden IsCellAssociatedWithADeletedLocation() method.

Parameters
pCellthe cell
Returns
whether a given cell is associated with a deleted element.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 523 of file ImmersedBoundaryCellPopulation.cpp.

◆ IsCellOnBoundary()

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::IsCellOnBoundary ( CellPtr  pCell)
Parameters
pCellpointer to a cell
Returns
whether the cell is on the boundary of this population

Definition at line 1089 of file ImmersedBoundaryCellPopulation.cpp.

◆ IsPdeNodeAssociatedWithNonApoptoticCell()

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::IsPdeNodeAssociatedWithNonApoptoticCell ( unsigned  pdeNodeIndex)
virtual

Overridden IsPdeNodeAssociatedWithNonApoptoticCell() method.

Parameters
pdeNodeIndexindex of a node in a tetrahedral mesh for use with a PDE modifier
Returns
if a node, specified by its index in a tetrahedral mesh for use with a PDE modifier, is associated with a non-apoptotic cell. This method can be called by PDE classes.

Reimplemented from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 985 of file ImmersedBoundaryCellPopulation.cpp.

◆ OpenWritersFiles()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::OpenWritersFiles ( OutputFileHandler rOutputFileHandler)
virtual

Overridden OpenWritersFiles() method. Open all files in mCellPopulationWriters and mCellWriters for writing (not appending).

Parameters
rOutputFileHandlerhandler for the directory in which to open this file.

Reimplemented from AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 796 of file ImmersedBoundaryCellPopulation.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::OpenWritersFiles().

◆ OutputCellPopulationParameters()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::OutputCellPopulationParameters ( out_stream &  rParamsFile)
virtual

Overridden OutputCellPopulationParameters() method.

Parameters
rParamsFilethe file stream to which the parameters are output

Reimplemented from AbstractOffLatticeCellPopulation< DIM >.

Definition at line 811 of file ImmersedBoundaryCellPopulation.cpp.

References AbstractOffLatticeCellPopulation< ELEMENT_DIM, SPACE_DIM >::OutputCellPopulationParameters().

◆ RemoveDeadCells()

template<unsigned DIM>
unsigned ImmersedBoundaryCellPopulation< DIM >::RemoveDeadCells ( )
virtual

Remove all cells labelled as dead. Note that after calling this method the cell population will be in an inconsistent state until the equivalent of a 'remesh' is performed! So don't try iterating over cells or anything like that.

Returns
number of cells removed

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 302 of file ImmersedBoundaryCellPopulation.cpp.

◆ rGetMesh() [1/2]

◆ rGetMesh() [2/2]

template<unsigned DIM>
const ImmersedBoundaryMesh< DIM, DIM > & ImmersedBoundaryCellPopulation< DIM >::rGetMesh ( ) const
Returns
const reference to mrMesh (used in archiving).

Definition at line 144 of file ImmersedBoundaryCellPopulation.cpp.

◆ serialize()

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

Serialize the object and its member variables.

Note that serialization of the mesh and cells is handled by load/save_construct_data.

Note also that member data related to writers is not saved - output must be set up again by the caller after a restart.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 134 of file ImmersedBoundaryCellPopulation.hpp.

References ImmersedBoundaryCellPopulation< DIM >::mCellRearrangementThreshold, ImmersedBoundaryCellPopulation< DIM >::mInteractionDistance, ImmersedBoundaryCellPopulation< DIM >::mpImmersedBoundaryDivisionRule, ImmersedBoundaryCellPopulation< DIM >::mPopulationHasActiveSources, ImmersedBoundaryCellPopulation< DIM >::mReMeshFrequency, and ImmersedBoundaryCellPopulation< DIM >::mThrowStepSizeException.

◆ SetCellRearrangementThreshold()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::SetCellRearrangementThreshold ( double  newThreshold)

Set the maximum distance two nodes should be allowed to move apart from each other in a single step.

Parameters
newThresholdthe new cell rearrangement threshold

Definition at line 205 of file ImmersedBoundaryCellPopulation.cpp.

◆ SetIfPopulationHasActiveSources()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::SetIfPopulationHasActiveSources ( bool  hasActiveSources)

Set whether the population has active sources

Parameters
hasActiveSourceswhether the population has active sources

Definition at line 1095 of file ImmersedBoundaryCellPopulation.cpp.

◆ SetImmersedBoundaryDivisionRule()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::SetImmersedBoundaryDivisionRule ( boost::shared_ptr< AbstractImmersedBoundaryDivisionRule< DIM > >  pImmersedBoundaryDivisionRule)

Set the division rule for this population.

Parameters
pImmersedBoundaryDivisionRulepointer to the new division rule

Definition at line 1076 of file ImmersedBoundaryCellPopulation.cpp.

◆ SetInteractionDistance()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::SetInteractionDistance ( double  newDistance)

Sets the maximum distance over which cell boundary nodes will interact via forces.

Parameters
newDistancethe new cell-cell interaction distance.

Definition at line 180 of file ImmersedBoundaryCellPopulation.cpp.

◆ SetNode()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::SetNode ( unsigned  index,
ChastePoint< DIM > &  rNewLocation 
)

Overridden SetNode() method. Move the node with a given index to a new point in space.

Parameters
indexthe index of the node to be moved
rNewLocationthe new target location of the node

Definition at line 252 of file ImmersedBoundaryCellPopulation.cpp.

◆ SetOutputNodeRegionToVtk()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::SetOutputNodeRegionToVtk ( bool  outputNodeRegionsToVtk)

Set whether to output node regions to vtk.

Parameters
outputNodeRegionsToVtkwhether to output node regions to vtk

Definition at line 1102 of file ImmersedBoundaryCellPopulation.cpp.

◆ SetReMeshFrequency()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::SetReMeshFrequency ( unsigned  newFrequency)

Sets the number of timesteps between each remesh. Remeshing can improve solution quality and prevent divergence, but is an expensive operation.

Parameters
newFrequencythe new ReMesh frequency.

Definition at line 193 of file ImmersedBoundaryCellPopulation.cpp.

◆ SetThrowsStepSizeException()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::SetThrowsStepSizeException ( bool  throws)

Sets whether an exception will be thrown if nodes move too far within a single timestep.

Parameters
throwswhether an exception should be thrown

Definition at line 217 of file ImmersedBoundaryCellPopulation.cpp.

◆ ThrowsStepSizeException()

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::ThrowsStepSizeException ( ) const
Returns
mThrowsStepSizeException.

Definition at line 223 of file ImmersedBoundaryCellPopulation.cpp.

◆ Update()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::Update ( bool  hasHadBirthsOrDeaths = true)
virtual

Remove the ImmersedBoundaryElements which have been marked as deleted, perform any cell rearrangements if required, and update the correspondence with CellPtrs.

Parameters
hasHadBirthsOrDeaths- a bool saying whether cell population has had Births Or Deaths

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 529 of file ImmersedBoundaryCellPopulation.cpp.

◆ UpdateNodeLocations()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::UpdateNodeLocations ( double  dt)
virtual

Overridden UpdateNodeLocations() method.

Parameters
dtthe time step

Reimplemented from AbstractOffLatticeCellPopulation< DIM >.

Definition at line 332 of file ImmersedBoundaryCellPopulation.cpp.

References EXCEPTION, SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), and NEVER_REACHED.

◆ Validate()

template<unsigned DIM>
void ImmersedBoundaryCellPopulation< DIM >::Validate ( )
privatevirtual

Check the consistency of internal data structures. Each ImmersedBoundaryElement must have a CellPtr associated with it.

Implements AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >.

Definition at line 549 of file ImmersedBoundaryCellPopulation.cpp.

References EXCEPTION, SimulationTime::Instance(), and NEVER_REACHED.

Referenced by ImmersedBoundaryCellPopulation< DIM >::ImmersedBoundaryCellPopulation().

◆ WriteVtkResultsToFile()

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned DIM>
friend class boost::serialization::access
friend

Definition at line 120 of file ImmersedBoundaryCellPopulation.hpp.

◆ TestImmersedBoundaryCellPopulation

template<unsigned DIM>
friend class TestImmersedBoundaryCellPopulation
friend

To allow tests to directly access UpdateNodeLocation().

Definition at line 64 of file ImmersedBoundaryCellPopulation.hpp.

◆ TestImmersedBoundaryDivisionRules

template<unsigned DIM>
friend class TestImmersedBoundaryDivisionRules
friend

The test below uses the private constructor to simplify testing.

Definition at line 61 of file ImmersedBoundaryCellPopulation.hpp.

Member Data Documentation

◆ mCellRearrangementThreshold

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::mCellRearrangementThreshold
private

Distance above which a vertex movement will trigger a step size exception.

Definition at line 110 of file ImmersedBoundaryCellPopulation.hpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::serialize().

◆ mDeleteMesh

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::mDeleteMesh
private

Whether to delete the mesh when we are destroyed. Needed if this cell population has been de-serialized.

Definition at line 70 of file ImmersedBoundaryCellPopulation.hpp.

◆ mInteractionDistance

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::mInteractionDistance
private

The distance over which cell-cell interactions occur.

Definition at line 98 of file ImmersedBoundaryCellPopulation.hpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::ImmersedBoundaryCellPopulation(), and ImmersedBoundaryCellPopulation< DIM >::serialize().

◆ mIntrinsicSpacing

template<unsigned DIM>
double ImmersedBoundaryCellPopulation< DIM >::mIntrinsicSpacing
private

The intrinsic node spacing, relative to which various parameters must be calculated.

Definition at line 89 of file ImmersedBoundaryCellPopulation.hpp.

◆ mOutputNodeRegionToVtk

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::mOutputNodeRegionToVtk
private

Whether to output node regions to VTK.

Definition at line 95 of file ImmersedBoundaryCellPopulation.hpp.

◆ mpImmersedBoundaryDivisionRule

template<unsigned DIM>
boost::shared_ptr<AbstractImmersedBoundaryDivisionRule<DIM> > ImmersedBoundaryCellPopulation< DIM >::mpImmersedBoundaryDivisionRule
private

A pointer to a division rule that is used to generate the axis when dividing cells. This is a specialisation for immersed boundary simulations.

Definition at line 83 of file ImmersedBoundaryCellPopulation.hpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::ImmersedBoundaryCellPopulation(), and ImmersedBoundaryCellPopulation< DIM >::serialize().

◆ mpImmersedBoundaryMesh

◆ mPopulationHasActiveSources

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::mPopulationHasActiveSources
private

Whether the simulation has active fluid sources.

Definition at line 92 of file ImmersedBoundaryCellPopulation.hpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::serialize().

◆ mReMeshFrequency

template<unsigned DIM>
unsigned ImmersedBoundaryCellPopulation< DIM >::mReMeshFrequency
private

Call ReMesh every ReMeshFrequency number of time steps.

Definition at line 101 of file ImmersedBoundaryCellPopulation.hpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::serialize().

◆ mThrowStepSizeException

template<unsigned DIM>
bool ImmersedBoundaryCellPopulation< DIM >::mThrowStepSizeException
private

Used to ensure step size exception is only thrown once.

Definition at line 104 of file ImmersedBoundaryCellPopulation.hpp.

Referenced by ImmersedBoundaryCellPopulation< DIM >::serialize().


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