Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
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)
 
virtual ~AbstractBoxDomainPdeModifier ()
 
double GetStepSize ()
 
void SetBcsOnBoxBoundary (bool setBcsOnBoxBoundary)
 
bool AreBcsSetOnBoxBoundary ()
 
virtual void SetupSolve (AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory)
 
void GenerateFeMesh (boost::shared_ptr< ChasteCuboid< DIM > > pMeshCuboid, double stepSize)
 
void UpdateCellData (AbstractCellPopulation< DIM, DIM > &rCellPopulation)
 
void InitialiseCellPdeElementMap (AbstractCellPopulation< DIM, DIM > &rCellPopulation)
 
void UpdateCellPdeElementMap (AbstractCellPopulation< DIM, DIM > &rCellPopulation)
 
void OutputSimulationModifierParameters (out_stream &rParamsFile)
 
- 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)
 
virtual ~AbstractPdeModifier ()
 
boost::shared_ptr< AbstractLinearPde< DIM, DIM > > GetPde ()
 
boost::shared_ptr< AbstractBoundaryCondition< DIM > > GetBoundaryCondition ()
 
bool IsNeumannBoundaryCondition ()
 
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
 
virtual void UpdateAtEndOfTimeStep (AbstractCellPopulation< DIM, DIM > &rCellPopulation)=0
 
virtual void UpdateAtEndOfOutputTimeStep (AbstractCellPopulation< DIM, DIM > &rCellPopulation)
 
virtual void UpdateAtEndOfSolve (AbstractCellPopulation< DIM, DIM > &rCellPopulation)
 
bool GetOutputGradient ()
 
void SetOutputGradient (bool outputGradient)
 
void SetOutputSolutionAtPdeNodes (bool outputSolutionAtPdeNodes)
 
void OutputSimulationModifierParameters (out_stream &rParamsFile)
 
- 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
 
- 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
 
TetrahedralMesh< DIM, DIM > * mpFeMesh
 
std::string mOutputDirectory
 
bool mOutputGradient
 
bool mOutputSolutionAtPdeNodes
 
out_stream mpVizPdeSolutionResultsFile
 
bool mDeleteFeMesh
 

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 50 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(), AbstractPdeModifier< DIM >::mDeleteFeMesh, AbstractBoxDomainPdeModifier< DIM >::mpMeshCuboid, and AbstractBoxDomainPdeModifier< DIM >::mStepSize.

◆ ~AbstractBoxDomainPdeModifier()

Destructor.

Definition at line 64 of file AbstractBoxDomainPdeModifier.cpp.

Member Function Documentation

◆ AreBcsSetOnBoxBoundary()

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

Definition at line 81 of file AbstractBoxDomainPdeModifier.cpp.

◆ GenerateFeMesh()

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

Helper method to generate the mesh.

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

Definition at line 95 of file AbstractBoxDomainPdeModifier.cpp.

References NEVER_REACHED, and ChastePoint< DIM >::rGetLocation().

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

◆ GetStepSize()

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

Definition at line 69 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)
virtual

◆ serialize()

template<unsigned DIM>
template<class Archive >
void AbstractBoxDomainPdeModifier< 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 68 of file AbstractBoxDomainPdeModifier.hpp.

References AbstractBoxDomainPdeModifier< DIM >::mpMeshCuboid, AbstractBoxDomainPdeModifier< DIM >::mSetBcsOnBoxBoundary, and AbstractBoxDomainPdeModifier< DIM >::mStepSize.

◆ 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.

◆ SetupSolve()

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

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

Reimplemented from AbstractPdeModifier< DIM >.

Reimplemented in EllipticBoxDomainPdeModifier< DIM >, and ParabolicBoxDomainPdeModifier< DIM >.

Definition at line 87 of file AbstractBoxDomainPdeModifier.cpp.

References AbstractPdeModifier< DIM >::SetupSolve().

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

◆ 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 221 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 59 of file AbstractBoxDomainPdeModifier.hpp.

◆ TestEllipticBoxDomainPdeModifier

template<unsigned DIM>
friend class TestEllipticBoxDomainPdeModifier
friend

Definition at line 52 of file AbstractBoxDomainPdeModifier.hpp.

◆ TestOffLatticeSimulationWithPdes

template<unsigned DIM>
friend class TestOffLatticeSimulationWithPdes
friend

Definition at line 54 of file AbstractBoxDomainPdeModifier.hpp.

◆ TestParabolicBoxDomainPdeModifier

template<unsigned DIM>
friend class TestParabolicBoxDomainPdeModifier
friend

Definition at line 53 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 79 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 85 of file AbstractBoxDomainPdeModifier.hpp.

Referenced by AbstractBoxDomainPdeModifier< DIM >::AbstractBoxDomainPdeModifier(), and 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 97 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 91 of file AbstractBoxDomainPdeModifier.hpp.

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


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