![]() |
Chaste Commit::30a3e656d4b131f8c595cc6eb2becd297337570f
|
#include <ParabolicBoxDomainPdeModifier.hpp>
Public Member Functions | |
ParabolicBoxDomainPdeModifier (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) | |
~ParabolicBoxDomainPdeModifier () override=default | |
void | UpdateAtEndOfTimeStep (AbstractCellPopulation< DIM, DIM > &rCellPopulation) override |
void | SetupSolve (AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory) override |
virtual std::shared_ptr< BoundaryConditionsContainer< DIM, DIM, 1 > > | ConstructBoundaryConditionsContainer (AbstractCellPopulation< DIM, DIM > &rCellPopulation) |
void | SetupInitialSolutionVector (AbstractCellPopulation< DIM, DIM > &rCellPopulation) |
Vec | InterpolateSolutionFromCellMovement (AbstractCellPopulation< DIM, DIM > &rCellPopulation) |
void | SetMoveSolutionWithCells (bool moveSolutionWithCells) |
bool | GetMoveSolutionWithCells () const |
void | OutputSimulationModifierParameters (out_stream &rParamsFile) override |
![]() | |
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) |
![]() | |
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 | UpdateAtEndOfOutputTimeStep (AbstractCellPopulation< DIM, DIM > &rCellPopulation) override |
void | UpdateAtEndOfSolve (AbstractCellPopulation< DIM, DIM > &rCellPopulation) override |
bool | GetOutputGradient () const |
void | SetOutputGradient (bool outputGradient) |
void | SetOutputSolutionAtPdeNodes (bool outputSolutionAtPdeNodes) |
![]() | |
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 |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
bool | mMoveSolutionWithCells |
std::map< CellPtr, c_vector< double, DIM > > | mOldCellLocations |
Friends | |
class | TestParabolicBoxDomainPdeModifier |
class | boost::serialization::access |
Additional Inherited Members | |
![]() | |
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 |
A modifier class in which a linear parabolic PDE coupled to a cell-based simulation is solved on a coarse domain.
The finite element mesh used to solve the PDE numerically is a fixed tessellation of a cuboid (box), which must be supplied to the constructor. The value of the dependent variable is interpolated between coarse mesh nodes to obtain a value at each cell, which is stored and updated in a CellData item.
At each time step the boundary condition supplied to the constructor may be imposed either on the boundary of the box domain, or on the boundary of the cell population (which is assumed to lie within the box domain). This choice can be made using the AbstractBoxDomainPdeModifier method SetBcsOnBoxBoundary(), which is inherited by this class.
Examples of PDEs in the source folder that can be solved using this class are AveragedSourceParabolicPde and UniformSourceParabolicPde.
Definition at line 64 of file ParabolicBoxDomainPdeModifier.hpp.
ParabolicBoxDomainPdeModifier< DIM >::ParabolicBoxDomainPdeModifier | ( | 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 42 of file ParabolicBoxDomainPdeModifier.cpp.
|
overridedefault |
Destructor.
|
virtual |
Helper method to construct the boundary conditions container for the PDE.
rCellPopulation | reference to the cell population |
Definition at line 152 of file ParabolicBoxDomainPdeModifier.cpp.
bool ParabolicBoxDomainPdeModifier< DIM >::GetMoveSolutionWithCells | ( | ) | const |
Definition at line 337 of file ParabolicBoxDomainPdeModifier.cpp.
Vec ParabolicBoxDomainPdeModifier< DIM >::InterpolateSolutionFromCellMovement | ( | AbstractCellPopulation< DIM, DIM > & | rCellPopulation | ) |
Helper method to interpolate the PDE solution from cells using the CellData. Use the cells voronoi region as all fe nodes in a cell centre voronoi region are given the value from cell data.
rCellPopulation | reference to the cell population |
Definition at line 183 of file ParabolicBoxDomainPdeModifier.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), Element< ELEMENT_DIM, SPACE_DIM >::CalculateInterpolationWeights(), PetscTools::CreateAndSetVec(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), ChastePoint< DIM >::rGetLocation(), and PetscVecTools::SetElement().
|
overridevirtual |
Overridden OutputSimulationModifierParameters() method. Output any simulation modifier parameters to file.
rParamsFile | the file stream to which the parameters are output |
Reimplemented from AbstractBoxDomainPdeModifier< DIM >.
Definition at line 343 of file ParabolicBoxDomainPdeModifier.cpp.
References AbstractBoxDomainPdeModifier< 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 80 of file ParabolicBoxDomainPdeModifier.hpp.
References ParabolicBoxDomainPdeModifier< DIM >::mMoveSolutionWithCells, and ParabolicBoxDomainPdeModifier< DIM >::mOldCellLocations.
void ParabolicBoxDomainPdeModifier< DIM >::SetMoveSolutionWithCells | ( | bool | moveSolutionWithCells | ) |
Set mMoveSolutionWithCells.
moveSolutionWithCells | whether to move the solution with cells. |
Definition at line 331 of file ParabolicBoxDomainPdeModifier.cpp.
void ParabolicBoxDomainPdeModifier< DIM >::SetupInitialSolutionVector | ( | AbstractCellPopulation< DIM, DIM > & | rCellPopulation | ) |
Helper method to initialise the PDE solution using the CellData.
Here we assume a homogeneous initial condition.
TODO use InterpolateSolutionFromCellMovement instead!
rCellPopulation | reference to the cell population |
Definition at line 162 of file ParabolicBoxDomainPdeModifier.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), PetscTools::CreateAndSetVec(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), and UNUSED_OPT.
|
override |
Overridden SetupSolve() method.
Specifies what to do in the simulation before the start of the time loop.
rCellPopulation | reference to the cell population |
outputDirectory | the output directory, relative to where Chaste output is stored |
Definition at line 121 of file ParabolicBoxDomainPdeModifier.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre(), and AbstractBoxDomainPdeModifier< DIM >::SetupSolve().
|
overridevirtual |
Overridden UpdateAtEndOfTimeStep() method.
Specifies what to do in the simulation at the end of each time step.
rCellPopulation | reference to the cell population |
Implements AbstractPdeModifier< DIM >.
Definition at line 59 of file ParabolicBoxDomainPdeModifier.cpp.
References AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Begin(), PetscTools::Destroy(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::End(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetLocationOfCellCentre(), SimulationTime::GetTime(), SimulationTime::GetTimeStep(), SimulationTime::Instance(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetInitialCondition(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimes(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimeStep(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
|
friend |
Needed for serialization.
Definition at line 71 of file ParabolicBoxDomainPdeModifier.hpp.
|
friend |
Definition at line 66 of file ParabolicBoxDomainPdeModifier.hpp.
|
private |
Whether to move the solution along with the cells in the cell population. Default to true.
Definition at line 91 of file ParabolicBoxDomainPdeModifier.hpp.
Referenced by ParabolicBoxDomainPdeModifier< DIM >::serialize().
|
private |
Map used to calculate displacement of cells if moving pde solution with cells
Definition at line 96 of file ParabolicBoxDomainPdeModifier.hpp.
Referenced by ParabolicBoxDomainPdeModifier< DIM >::serialize().