![]() |
Chaste Commit::30a3e656d4b131f8c595cc6eb2becd297337570f
|
#include <AbstractBoxDomainPdeModifier.hpp>
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 |
![]() | |
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 |
![]() | |
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) |
![]() | |
virtual | ~Identifiable () |
std::string | GetIdentifier () const |
Protected Attributes | |
std::map< CellPtr, unsigned > | mCellPdeElementMap |
boost::shared_ptr< ChasteCuboid< DIM > > | mpMeshCuboid |
double | mStepSize |
bool | mSetBcsOnBoxBoundary |
bool | mSetBcsOnBoundingSphere |
bool | mUseVoronoiCellsForInterpolation |
double | mTypicalCellRadius |
![]() | |
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< double > | mIsDirichletBoundaryNode |
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 |
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.
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.
pPde | A shared pointer to a linear PDE object (defaults to NULL) |
pBoundaryCondition | A shared pointer to an abstract boundary condition (defaults to NULL, corresponding to a constant boundary condition with value zero) |
isNeumannBoundaryCondition | Whether the boundary condition is Neumann (defaults to true) |
pMeshCuboid | A shared pointer to a ChasteCuboid specifying the outer boundary for the FE mesh (defaults to NULL) |
stepSize | step size to be used in the FE mesh (defaults to 1.0, i.e. the default cell size) |
solution | solution 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.
|
overridedefault |
Destructor.
bool AbstractBoxDomainPdeModifier< DIM >::AreBcsSetOnBoundingSphere | ( | ) | const |
Definition at line 93 of file AbstractBoxDomainPdeModifier.cpp.
bool AbstractBoxDomainPdeModifier< DIM >::AreBcsSetOnBoxBoundary | ( | ) | const |
Definition at line 81 of file AbstractBoxDomainPdeModifier.cpp.
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.
rCellPopulation | reference to the cell population |
pBcc | the 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().
void AbstractBoxDomainPdeModifier< DIM >::GenerateAndReturnFeMesh | ( | boost::shared_ptr< ChasteCuboid< DIM > > | pMeshCuboid, |
double | stepSize, | ||
TetrahedralMesh< DIM, DIM > * | pMesh | ||
) |
Helper method to generate a pde mesh.
pMeshCuboid | the outer boundary for the FE mesh. |
stepSize | the step size to be used in the FE mesh. |
pMesh | a 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().
void AbstractBoxDomainPdeModifier< DIM >::GenerateFeMesh | ( | boost::shared_ptr< ChasteCuboid< DIM > > | pMeshCuboid, |
double | stepSize | ||
) |
Helper method to generate the pde mesh for the first time.
pMeshCuboid | the outer boundary for the FE mesh. |
stepSize | the step size to be used in the FE mesh. |
Definition at line 315 of file AbstractBoxDomainPdeModifier.cpp.
Referenced by AbstractBoxDomainPdeModifier< DIM >::AbstractBoxDomainPdeModifier().
double AbstractBoxDomainPdeModifier< DIM >::GetStepSize | ( | ) | const |
Definition at line 69 of file AbstractBoxDomainPdeModifier.cpp.
double AbstractBoxDomainPdeModifier< DIM >::GetTypicalCellRadius | ( | ) | const |
Definition at line 118 of file AbstractBoxDomainPdeModifier.cpp.
bool AbstractBoxDomainPdeModifier< DIM >::GetUseVoronoiCellsForInterpolation | ( | ) | const |
Definition at line 105 of file AbstractBoxDomainPdeModifier.cpp.
void AbstractBoxDomainPdeModifier< DIM >::InitialiseCellPdeElementMap | ( | AbstractCellPopulation< DIM, DIM > & | rCellPopulation | ) |
Initialise mCellPdeElementMap.
rCellPopulation | reference to the cell population |
Definition at line 508 of file AbstractBoxDomainPdeModifier.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre().
|
overridevirtual |
Overridden OutputSimulationModifierParameters() method. Output any simulation modifier parameters to file.
rParamsFile | the file stream to which the parameters are output |
Implements AbstractCellBasedSimulationModifier< DIM, DIM >.
Reimplemented in EllipticBoxDomainPdeModifier< DIM >, and ParabolicBoxDomainPdeModifier< DIM >.
Definition at line 538 of file AbstractBoxDomainPdeModifier.cpp.
References AbstractPdeModifier< DIM >::OutputSimulationModifierParameters().
Referenced by EllipticBoxDomainPdeModifier< DIM >::OutputSimulationModifierParameters(), and ParabolicBoxDomainPdeModifier< DIM >::OutputSimulationModifierParameters().
|
inlineprivate |
Boost Serialization method for archiving/checkpointing. Archives the object and its member variables.
archive | The boost archive. |
version | The current version of this class. |
Definition at line 69 of file AbstractBoxDomainPdeModifier.hpp.
References AbstractBoxDomainPdeModifier< DIM >::mpMeshCuboid, AbstractBoxDomainPdeModifier< DIM >::mSetBcsOnBoundingSphere, AbstractBoxDomainPdeModifier< DIM >::mSetBcsOnBoxBoundary, AbstractBoxDomainPdeModifier< DIM >::mStepSize, AbstractBoxDomainPdeModifier< DIM >::mTypicalCellRadius, and AbstractBoxDomainPdeModifier< DIM >::mUseVoronoiCellsForInterpolation.
void AbstractBoxDomainPdeModifier< DIM >::SetBcsOnBoundingSphere | ( | bool | setBcsOnBoundingSphere | ) |
Set mSetBcsOnBoundingSphere.
setBcsOnBoundingSphere | whether 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.
void AbstractBoxDomainPdeModifier< DIM >::SetBcsOnBoxBoundary | ( | bool | setBcsOnBoxBoundary | ) |
Set mSetBcsOnCoarseBoundary.
setBcsOnBoxBoundary | whether 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.
void AbstractBoxDomainPdeModifier< DIM >::SetTypicalCellRadius | ( | double | typicalCellRadius | ) |
Set mTypicalCellRadius.
typicalCellRadius | the radius to use for defining if FE nodes are near cells or not. |
Definition at line 111 of file AbstractBoxDomainPdeModifier.cpp.
|
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
rCellPopulation | reference to the cell population |
outputDirectory | the 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().
void AbstractBoxDomainPdeModifier< DIM >::SetUseVoronoiCellsForInterpolation | ( | bool | useVoronoiCellsForInterpolation | ) |
Set mUseVoronoiCellsForInterpolation.
useVoronoiCellsForInterpolation | whether 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.
void AbstractBoxDomainPdeModifier< DIM >::UpdateCellData | ( | AbstractCellPopulation< DIM, DIM > & | rCellPopulation | ) |
Helper method to copy the PDE solution to CellData
Here we need to interpolate from the FE mesh onto the cells.
rCellPopulation | reference to the cell population |
Definition at line 360 of file AbstractBoxDomainPdeModifier.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), Element< ELEMENT_DIM, SPACE_DIM >::CalculateInterpolationWeights(), LinearBasisFunction< ELEMENT_DIM >::ComputeTransformedBasisFunctionDerivatives(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), EXCEPTION, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationIndexUsingCell(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), NEVER_REACHED, and UNSIGNED_UNSET.
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.
rCellPopulation | reference 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().
|
friend |
Needed for serialization.
Definition at line 60 of file AbstractBoxDomainPdeModifier.hpp.
|
friend |
Definition at line 53 of file AbstractBoxDomainPdeModifier.hpp.
|
friend |
Definition at line 55 of file AbstractBoxDomainPdeModifier.hpp.
|
friend |
Definition at line 54 of file AbstractBoxDomainPdeModifier.hpp.
|
protected |
Map between cells and the elements of the FE mesh containing them.
Definition at line 83 of file AbstractBoxDomainPdeModifier.hpp.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().