Chaste Commit::30a3e656d4b131f8c595cc6eb2becd297337570f
AbstractBoxDomainPdeModifier< DIM > Class Template Reference

#include <AbstractBoxDomainPdeModifier.hpp>

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

Public Member Functions

 AbstractBoxDomainPdeModifier (boost::shared_ptr< AbstractLinearPde< DIM, DIM > > pPde=boost::shared_ptr< AbstractLinearPde< DIM, DIM > >(), boost::shared_ptr< AbstractBoundaryCondition< DIM > > pBoundaryCondition=boost::shared_ptr< AbstractBoundaryCondition< DIM > >(), bool isNeumannBoundaryCondition=true, boost::shared_ptr< ChasteCuboid< DIM > > pMeshCuboid=boost::shared_ptr< ChasteCuboid< DIM > >(), double stepSize=1.0, Vec solution=nullptr)
 
 ~AbstractBoxDomainPdeModifier () override=default
 
double GetStepSize () const
 
void SetBcsOnBoxBoundary (bool setBcsOnBoxBoundary)
 
bool AreBcsSetOnBoxBoundary () const
 
void SetBcsOnBoundingSphere (bool setBcsOnBoundingSphere)
 
bool AreBcsSetOnBoundingSphere () const
 
void SetUseVoronoiCellsForInterpolation (bool useVoronoiCellsForInterpolation)
 
bool GetUseVoronoiCellsForInterpolation () const
 
void SetTypicalCellRadius (double typicalCellRadius)
 
double GetTypicalCellRadius () const
 
void ConstructBoundaryConditionsContainerHelper (AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::shared_ptr< BoundaryConditionsContainer< DIM, DIM, 1 > > pBcc)
 
void SetupSolve (AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory) override
 
void GenerateFeMesh (boost::shared_ptr< ChasteCuboid< DIM > > pMeshCuboid, double stepSize)
 
void GenerateAndReturnFeMesh (boost::shared_ptr< ChasteCuboid< DIM > > pMeshCuboid, double stepSize, TetrahedralMesh< DIM, DIM > *pMesh)
 
void UpdateCellData (AbstractCellPopulation< DIM, DIM > &rCellPopulation)
 
void InitialiseCellPdeElementMap (AbstractCellPopulation< DIM, DIM > &rCellPopulation)
 
void UpdateCellPdeElementMap (AbstractCellPopulation< DIM, DIM > &rCellPopulation)
 
void OutputSimulationModifierParameters (out_stream &rParamsFile) override
 
- Public Member Functions inherited from AbstractPdeModifier< DIM >
 AbstractPdeModifier (boost::shared_ptr< AbstractLinearPde< DIM, DIM > > pPde=NULL, boost::shared_ptr< AbstractBoundaryCondition< DIM > > pBoundaryCondition=boost::shared_ptr< AbstractBoundaryCondition< DIM > >(), bool isNeumannBoundaryCondition=true, Vec solution=nullptr)
 
 ~AbstractPdeModifier () override
 
boost::shared_ptr< AbstractLinearPde< DIM, DIM > > GetPde ()
 
boost::shared_ptr< AbstractBoundaryCondition< DIM > > GetBoundaryCondition ()
 
bool IsNeumannBoundaryCondition () const
 
void SetDependentVariableName (const std::string &rName)
 
std::string & rGetDependentVariableName ()
 
bool HasAveragedSourcePde ()
 
void SetUpSourceTermsForAveragedSourcePde (TetrahedralMesh< DIM, DIM > *pMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=nullptr)
 
Vec GetSolution ()
 
Vec GetSolution () const
 
TetrahedralMesh< DIM, DIM > * GetFeMesh () const
 
void SetupSolve (AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory) override
 
void UpdateAtEndOfTimeStep (AbstractCellPopulation< DIM, DIM > &rCellPopulation) override=0
 
void UpdateAtEndOfOutputTimeStep (AbstractCellPopulation< DIM, DIM > &rCellPopulation) override
 
void UpdateAtEndOfSolve (AbstractCellPopulation< DIM, DIM > &rCellPopulation) override
 
bool GetOutputGradient () const
 
void SetOutputGradient (bool outputGradient)
 
void SetOutputSolutionAtPdeNodes (bool outputSolutionAtPdeNodes)
 
void OutputSimulationModifierParameters (out_stream &rParamsFile) override
 
- Public Member Functions inherited from AbstractCellBasedSimulationModifier< DIM, DIM >
 AbstractCellBasedSimulationModifier ()
 
virtual ~AbstractCellBasedSimulationModifier ()
 
virtual void UpdateAtEndOfTimeStep (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)=0
 
virtual void UpdateAtEndOfOutputTimeStep (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)
 
virtual void SetupSolve (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation, std::string outputDirectory)=0
 
virtual void UpdateAtEndOfSolve (AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)
 
void OutputSimulationModifierInfo (out_stream &rParamsFile)
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Protected Attributes

std::map< CellPtr, unsignedmCellPdeElementMap
 
boost::shared_ptr< ChasteCuboid< DIM > > mpMeshCuboid
 
double mStepSize
 
bool mSetBcsOnBoxBoundary
 
bool mSetBcsOnBoundingSphere
 
bool mUseVoronoiCellsForInterpolation
 
double mTypicalCellRadius
 
- Protected Attributes inherited from AbstractPdeModifier< DIM >
boost::shared_ptr< AbstractLinearPde< DIM, DIM > > mpPde
 
boost::shared_ptr< AbstractBoundaryCondition< DIM > > mpBoundaryCondition
 
bool mIsNeumannBoundaryCondition
 
std::string mDependentVariableName
 
Vec mSolution = nullptr
 
TetrahedralMesh< DIM, DIM > * mpFeMesh = nullptr
 
std::string mOutputDirectory {}
 
bool mOutputGradient = false
 
bool mOutputSolutionAtPdeNodes = false
 
out_stream mpVizPdeSolutionResultsFile
 
bool mDeleteFeMesh = false
 
std::vector< doublemIsDirichletBoundaryNode
 

Private Member Functions

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

Friends

class TestEllipticBoxDomainPdeModifier
 
class TestParabolicBoxDomainPdeModifier
 
class TestOffLatticeSimulationWithPdes
 
class boost::serialization::access
 

Detailed Description

template<unsigned DIM>
class AbstractBoxDomainPdeModifier< DIM >

An abstract modifier class containing functionality common to EllipticBoxDomainPdeModifier and ParabolicBoxDomainPdeModifier, which both solve a linear elliptic or parabolic PDE coupled to a cell-based simulation on a coarse domain.

Definition at line 51 of file AbstractBoxDomainPdeModifier.hpp.

Constructor & Destructor Documentation

◆ AbstractBoxDomainPdeModifier()

template<unsigned DIM>
AbstractBoxDomainPdeModifier< DIM >::AbstractBoxDomainPdeModifier ( boost::shared_ptr< AbstractLinearPde< DIM, DIM > >  pPde = boost::shared_ptr<AbstractLinearPde<DIM,DIM> >(),
boost::shared_ptr< AbstractBoundaryCondition< DIM > >  pBoundaryCondition = boost::shared_ptr<AbstractBoundaryCondition<DIM> >(),
bool  isNeumannBoundaryCondition = true,
boost::shared_ptr< ChasteCuboid< DIM > >  pMeshCuboid = boost::shared_ptr<ChasteCuboid<DIM> >(),
double  stepSize = 1.0,
Vec  solution = nullptr 
)

Constructor.

Parameters
pPdeA shared pointer to a linear PDE object (defaults to NULL)
pBoundaryConditionA shared pointer to an abstract boundary condition (defaults to NULL, corresponding to a constant boundary condition with value zero)
isNeumannBoundaryConditionWhether the boundary condition is Neumann (defaults to true)
pMeshCuboidA shared pointer to a ChasteCuboid specifying the outer boundary for the FE mesh (defaults to NULL)
stepSizestep size to be used in the FE mesh (defaults to 1.0, i.e. the default cell size)
solutionsolution vector (defaults to NULL)

Definition at line 41 of file AbstractBoxDomainPdeModifier.cpp.

References AbstractBoxDomainPdeModifier< DIM >::GenerateFeMesh(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractPdeModifier< DIM >::mDeleteFeMesh, AbstractPdeModifier< DIM >::mIsDirichletBoundaryNode, AbstractPdeModifier< DIM >::mpFeMesh, AbstractBoxDomainPdeModifier< DIM >::mpMeshCuboid, and AbstractBoxDomainPdeModifier< DIM >::mStepSize.

◆ ~AbstractBoxDomainPdeModifier()

template<unsigned DIM>
AbstractBoxDomainPdeModifier< DIM >::~AbstractBoxDomainPdeModifier ( )
overridedefault

Destructor.

Member Function Documentation

◆ AreBcsSetOnBoundingSphere()

template<unsigned DIM>
bool AbstractBoxDomainPdeModifier< DIM >::AreBcsSetOnBoundingSphere ( ) const
Returns
mSetBcsOnBoundingSphere.

Definition at line 93 of file AbstractBoxDomainPdeModifier.cpp.

◆ AreBcsSetOnBoxBoundary()

template<unsigned DIM>
bool AbstractBoxDomainPdeModifier< DIM >::AreBcsSetOnBoxBoundary ( ) const
Returns
mSetBcsOnCoarseBoundary.

Definition at line 81 of file AbstractBoxDomainPdeModifier.cpp.

◆ ConstructBoundaryConditionsContainerHelper()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::ConstructBoundaryConditionsContainerHelper ( AbstractCellPopulation< DIM, DIM > &  rCellPopulation,
std::shared_ptr< BoundaryConditionsContainer< DIM, DIM, 1 > >  pBcc 
)

Helper method to construct the boundary conditions container for the PDE.

Parameters
rCellPopulationreference to the cell population
pBccthe boundary conditions container to fill

Definition at line 124 of file AbstractBoxDomainPdeModifier.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), NEVER_REACHED, and ChastePoint< DIM >::rGetLocation().

◆ GenerateAndReturnFeMesh()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::GenerateAndReturnFeMesh ( boost::shared_ptr< ChasteCuboid< DIM > >  pMeshCuboid,
double  stepSize,
TetrahedralMesh< DIM, DIM > *  pMesh 
)

Helper method to generate a pde mesh.

Parameters
pMeshCuboidthe outer boundary for the FE mesh.
stepSizethe step size to be used in the FE mesh.
pMesha pointer to the mesh to be created

Definition at line 324 of file AbstractBoxDomainPdeModifier.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRegularSlabMesh(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), NEVER_REACHED, ChastePoint< DIM >::rGetLocation(), and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::Translate().

◆ GenerateFeMesh()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::GenerateFeMesh ( boost::shared_ptr< ChasteCuboid< DIM > >  pMeshCuboid,
double  stepSize 
)

Helper method to generate the pde mesh for the first time.

Parameters
pMeshCuboidthe outer boundary for the FE mesh.
stepSizethe step size to be used in the FE mesh.

Definition at line 315 of file AbstractBoxDomainPdeModifier.cpp.

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

◆ GetStepSize()

template<unsigned DIM>
double AbstractBoxDomainPdeModifier< DIM >::GetStepSize ( ) const
Returns
mStepSize.

Definition at line 69 of file AbstractBoxDomainPdeModifier.cpp.

◆ GetTypicalCellRadius()

template<unsigned DIM>
double AbstractBoxDomainPdeModifier< DIM >::GetTypicalCellRadius ( ) const
Returns
mTypicalCellRadius.

Definition at line 118 of file AbstractBoxDomainPdeModifier.cpp.

◆ GetUseVoronoiCellsForInterpolation()

template<unsigned DIM>
bool AbstractBoxDomainPdeModifier< DIM >::GetUseVoronoiCellsForInterpolation ( ) const
Returns
mUseVoronoiCellsForInterpolation.

Definition at line 105 of file AbstractBoxDomainPdeModifier.cpp.

◆ InitialiseCellPdeElementMap()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::InitialiseCellPdeElementMap ( AbstractCellPopulation< DIM, DIM > &  rCellPopulation)

◆ OutputSimulationModifierParameters()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::OutputSimulationModifierParameters ( out_stream &  rParamsFile)
overridevirtual

◆ serialize()

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

◆ SetBcsOnBoundingSphere()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::SetBcsOnBoundingSphere ( bool  setBcsOnBoundingSphere)

Set mSetBcsOnBoundingSphere.

Parameters
setBcsOnBoundingSpherewhether to set the boundary condition on the edge of the box domain rather than the cell population

Definition at line 87 of file AbstractBoxDomainPdeModifier.cpp.

◆ SetBcsOnBoxBoundary()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::SetBcsOnBoxBoundary ( bool  setBcsOnBoxBoundary)

Set mSetBcsOnCoarseBoundary.

Parameters
setBcsOnBoxBoundarywhether to set the boundary condition on the edge of the box domain rather than the cell population

Definition at line 75 of file AbstractBoxDomainPdeModifier.cpp.

◆ SetTypicalCellRadius()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::SetTypicalCellRadius ( double  typicalCellRadius)

Set mTypicalCellRadius.

Parameters
typicalCellRadiusthe radius to use for defining if FE nodes are near cells or not.

Definition at line 111 of file AbstractBoxDomainPdeModifier.cpp.

◆ SetupSolve()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::SetupSolve ( AbstractCellPopulation< DIM, DIM > &  rCellPopulation,
std::string  outputDirectory 
)
override

Overridden SetupSolve() method.

Specifies what to do in the simulation before the start of the time loop.

Here we just initialize the Cell PDE element map

Parameters
rCellPopulationreference to the cell population
outputDirectorythe output directory, relative to where Chaste output is stored

Definition at line 307 of file AbstractBoxDomainPdeModifier.cpp.

References AbstractPdeModifier< DIM >::SetupSolve().

Referenced by EllipticBoxDomainPdeModifier< DIM >::SetupSolve(), and ParabolicBoxDomainPdeModifier< DIM >::SetupSolve().

◆ SetUseVoronoiCellsForInterpolation()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::SetUseVoronoiCellsForInterpolation ( bool  useVoronoiCellsForInterpolation)

Set mUseVoronoiCellsForInterpolation.

Parameters
useVoronoiCellsForInterpolationwhether to use the Voronoi region of cells for interpolation of the solution from the FE mesh to the cells.

Definition at line 99 of file AbstractBoxDomainPdeModifier.cpp.

◆ UpdateCellData()

◆ UpdateCellPdeElementMap()

template<unsigned DIM>
void AbstractBoxDomainPdeModifier< DIM >::UpdateCellPdeElementMap ( AbstractCellPopulation< DIM, DIM > &  rCellPopulation)

Update the mCellPdeElementMap

This method should be called before sending the element map to a PDE class to ensure map is up to date.

Parameters
rCellPopulationreference to the cell population

Definition at line 524 of file AbstractBoxDomainPdeModifier.cpp.

References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre().

Friends And Related Symbol Documentation

◆ boost::serialization::access

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

Needed for serialization.

Definition at line 60 of file AbstractBoxDomainPdeModifier.hpp.

◆ TestEllipticBoxDomainPdeModifier

template<unsigned DIM>
friend class TestEllipticBoxDomainPdeModifier
friend

Definition at line 53 of file AbstractBoxDomainPdeModifier.hpp.

◆ TestOffLatticeSimulationWithPdes

template<unsigned DIM>
friend class TestOffLatticeSimulationWithPdes
friend

Definition at line 55 of file AbstractBoxDomainPdeModifier.hpp.

◆ TestParabolicBoxDomainPdeModifier

template<unsigned DIM>
friend class TestParabolicBoxDomainPdeModifier
friend

Definition at line 54 of file AbstractBoxDomainPdeModifier.hpp.

Member Data Documentation

◆ mCellPdeElementMap

template<unsigned DIM>
std::map<CellPtr, unsigned> AbstractBoxDomainPdeModifier< DIM >::mCellPdeElementMap
protected

Map between cells and the elements of the FE mesh containing them.

Definition at line 83 of file AbstractBoxDomainPdeModifier.hpp.

◆ mpMeshCuboid

template<unsigned DIM>
boost::shared_ptr<ChasteCuboid<DIM> > AbstractBoxDomainPdeModifier< DIM >::mpMeshCuboid
protected

Pointer to a ChasteCuboid storing the outer boundary for the FE mesh. Stored as a member to facilitate archiving.

Definition at line 89 of file AbstractBoxDomainPdeModifier.hpp.

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

◆ mSetBcsOnBoundingSphere

template<unsigned DIM>
bool AbstractBoxDomainPdeModifier< DIM >::mSetBcsOnBoundingSphere
protected

Whether to set the boundary condition on a sphere which bounds the cell centres of the tissue. Only used if mSetBcsOnBoxBoundary is false. Default to false.

Definition at line 108 of file AbstractBoxDomainPdeModifier.hpp.

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

◆ mSetBcsOnBoxBoundary

template<unsigned DIM>
bool AbstractBoxDomainPdeModifier< DIM >::mSetBcsOnBoxBoundary
protected

Whether to set the boundary condition on the edge of the box domain rather than the cell population. Default to true.

Definition at line 101 of file AbstractBoxDomainPdeModifier.hpp.

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

◆ mStepSize

template<unsigned DIM>
double AbstractBoxDomainPdeModifier< DIM >::mStepSize
protected

The step size to be used in the FE mesh. Stored as a member to facilitate archiving.

Definition at line 95 of file AbstractBoxDomainPdeModifier.hpp.

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

◆ mTypicalCellRadius

template<unsigned DIM>
double AbstractBoxDomainPdeModifier< DIM >::mTypicalCellRadius
protected

Used to define if a FE node is within a certain radius of a cell centre to help define boundary conditions when mSetBcsOnBoxBoundary and mSetBcsOnBoundingSphere are false

defaults to 0.5 CD

Definition at line 121 of file AbstractBoxDomainPdeModifier.hpp.

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

◆ mUseVoronoiCellsForInterpolation

template<unsigned DIM>
bool AbstractBoxDomainPdeModifier< DIM >::mUseVoronoiCellsForInterpolation
protected

Whether to use a cell centres Voronoi region to interpolate the pde solution onto cells.

Definition at line 113 of file AbstractBoxDomainPdeModifier.hpp.

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


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