![]() |
Chaste Commit::43b116bb45f11066c455b15e05c77f8bbe23ac85
|
#include <AbstractPdeModifier.hpp>
Public Member Functions | |
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 | |
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 | boost::serialization::access |
An abstract modifier class containing functionality common to AbstractBoxDomainPdeModifier, AbstractGrowingDomainPdeModifier and their subclasses, which solve a linear elliptic or parabolic PDE coupled to a cell-based simulation.
Definition at line 54 of file AbstractPdeModifier.hpp.
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 |
||
) |
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) |
solution | solution vector (defaults to NULL) |
Definition at line 44 of file AbstractPdeModifier.cpp.
References AbstractPdeModifier< DIM >::mSolution.
|
override |
Destructor.
Definition at line 60 of file AbstractPdeModifier.cpp.
References PetscTools::Destroy().
boost::shared_ptr< AbstractBoundaryCondition< DIM > > AbstractPdeModifier< DIM >::GetBoundaryCondition | ( | ) |
Definition at line 79 of file AbstractPdeModifier.cpp.
TetrahedralMesh< DIM, DIM > * AbstractPdeModifier< DIM >::GetFeMesh | ( | ) | const |
Definition at line 141 of file AbstractPdeModifier.cpp.
bool AbstractPdeModifier< DIM >::GetOutputGradient | ( | ) | const |
Set whether to calculate and save the gradient of the solution to CellData.
Definition at line 231 of file AbstractPdeModifier.cpp.
boost::shared_ptr< AbstractLinearPde< DIM, DIM > > AbstractPdeModifier< DIM >::GetPde | ( | ) |
Definition at line 73 of file AbstractPdeModifier.cpp.
Vec AbstractPdeModifier< DIM >::GetSolution | ( | ) |
Definition at line 129 of file AbstractPdeModifier.cpp.
Vec AbstractPdeModifier< DIM >::GetSolution | ( | ) | const |
Definition at line 135 of file AbstractPdeModifier.cpp.
bool AbstractPdeModifier< DIM >::HasAveragedSourcePde | ( | ) |
Definition at line 103 of file AbstractPdeModifier.cpp.
bool AbstractPdeModifier< DIM >::IsNeumannBoundaryCondition | ( | ) | const |
Definition at line 85 of file AbstractPdeModifier.cpp.
|
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 ParabolicGrowingDomainPdeModifier< DIM >, EllipticBoxDomainPdeModifier< DIM >, EllipticGrowingDomainPdeModifier< DIM >, and ParabolicBoxDomainPdeModifier< DIM >.
Definition at line 249 of file AbstractPdeModifier.cpp.
References AbstractCellBasedSimulationModifier< ELEMENT_DIM, SPACE_DIM >::OutputSimulationModifierParameters().
Referenced by AbstractBoxDomainPdeModifier< DIM >::OutputSimulationModifierParameters(), and AbstractGrowingDomainPdeModifier< DIM >::OutputSimulationModifierParameters().
std::string & AbstractPdeModifier< DIM >::rGetDependentVariableName | ( | ) |
Get the name of the dependent variable.
Definition at line 97 of file AbstractPdeModifier.cpp.
|
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 68 of file AbstractPdeModifier.hpp.
References AbstractPdeModifier< DIM >::mDependentVariableName, AbstractPdeModifier< DIM >::mIsNeumannBoundaryCondition, AbstractPdeModifier< DIM >::mOutputDirectory, AbstractPdeModifier< DIM >::mOutputGradient, AbstractPdeModifier< DIM >::mOutputSolutionAtPdeNodes, AbstractPdeModifier< DIM >::mpBoundaryCondition, and AbstractPdeModifier< DIM >::mpPde.
void AbstractPdeModifier< DIM >::SetDependentVariableName | ( | const std::string & | rName | ) |
Set the name of the dependent variable.
rName | the name. |
Definition at line 91 of file AbstractPdeModifier.cpp.
void AbstractPdeModifier< DIM >::SetOutputGradient | ( | bool | outputGradient | ) |
Set whether to calculate and save the gradient of the solution to CellData.
outputGradient | whether to output the gradient |
Definition at line 237 of file AbstractPdeModifier.cpp.
void AbstractPdeModifier< DIM >::SetOutputSolutionAtPdeNodes | ( | bool | outputSolutionAtPdeNodes | ) |
Set mOutputSolutionAtPdeNodes.
outputSolutionAtPdeNodes | whether to output the PDE solution at each node of the FE mesh at output time steps |
Definition at line 243 of file AbstractPdeModifier.cpp.
|
override |
Overridden SetupSolve() method.
Set mOutputDirectory and, if mOutputSolutionAtPdeNodes is set to true, open mpVizPdeSolutionResultsFile. This method is overridden in subclasses.
rCellPopulation | reference to the cell population |
outputDirectory | the output directory, relative to where Chaste output is stored |
Definition at line 147 of file AbstractPdeModifier.cpp.
References PetscTools::AmMaster(), OutputFileHandler::OpenOutputFile(), and AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::Update().
Referenced by ParabolicGrowingDomainPdeModifier< DIM >::SetupSolve(), AbstractBoxDomainPdeModifier< DIM >::SetupSolve(), and EllipticGrowingDomainPdeModifier< DIM >::SetupSolve().
void AbstractPdeModifier< DIM >::SetUpSourceTermsForAveragedSourcePde | ( | TetrahedralMesh< DIM, DIM > * | pMesh, |
std::map< CellPtr, unsigned > * | pCellPdeElementMap = nullptr |
||
) |
In the case where the PDE has an averaged source, set the source terms using the information in the given mesh.
pMesh | Pointer to a tetrahedral mesh |
pCellPdeElementMap | map between cells and elements |
Definition at line 111 of file AbstractPdeModifier.cpp.
|
override |
Overridden UpdateAtEndOfOutputTimeStep() method, after UpdateAtEndOfTimeStep() has been called.
Output the solution to the PDE at each cell to VTK and, if mOutputSolutionAtPdeNodes is set to true, output the solution to the PDE at each node of mpFeMesh to mpVizPdeSolutionResultsFile.
rCellPopulation | reference to the cell population |
Definition at line 166 of file AbstractPdeModifier.cpp.
References PetscTools::AmMaster(), SimulationTime::GetTime(), SimulationTime::GetTimeStepsElapsed(), and SimulationTime::Instance().
|
override |
Overridden UpdateAtEndOfSolve() method.
If mOutputSolutionAtPdeNodes is set to true, close mpVizPdeSolutionResultsFile.
rCellPopulation | reference to the cell population |
Definition at line 219 of file AbstractPdeModifier.cpp.
References PetscTools::AmMaster().
|
overridepure virtual |
Overridden UpdateAtEndOfTimeStep() method.
As this method is pure virtual, it must be overridden in subclasses.
rCellPopulation | reference to the cell population |
Implemented in ParabolicGrowingDomainPdeModifier< DIM >, EllipticBoxDomainPdeModifier< DIM >, EllipticGrowingDomainPdeModifier< DIM >, and ParabolicBoxDomainPdeModifier< DIM >.
|
friend |
Needed for serialization.
Definition at line 59 of file AbstractPdeModifier.hpp.
|
protected |
Whether to delete the finite element mesh when we are destroyed.
Definition at line 131 of file AbstractPdeModifier.hpp.
Referenced by AbstractBoxDomainPdeModifier< DIM >::AbstractBoxDomainPdeModifier().
|
protected |
For use in PDEs where we know what the quantity for which we are solving is called, e.g. oxygen concentration.
Definition at line 105 of file AbstractPdeModifier.hpp.
Referenced by AbstractPdeModifier< DIM >::serialize().
|
protected |
Store the nodes that dirichlet boundary conditions on which are output with the solution.
Definition at line 136 of file AbstractPdeModifier.hpp.
Referenced by AbstractBoxDomainPdeModifier< DIM >::AbstractBoxDomainPdeModifier().
|
protected |
Whether the boundary condition is Neumann (false corresponds to a Dirichlet boundary condition).
Definition at line 99 of file AbstractPdeModifier.hpp.
Referenced by AbstractPdeModifier< DIM >::serialize().
|
protected |
Store the output directory name.
Definition at line 114 of file AbstractPdeModifier.hpp.
Referenced by AbstractPdeModifier< DIM >::serialize().
|
protected |
Whether to calculate and output the gradient of the solution.
Definition at line 117 of file AbstractPdeModifier.hpp.
Referenced by AbstractPdeModifier< DIM >::serialize().
|
protected |
Whether to output the PDE solution at each node of the FE mesh at output time steps. Defaults to false.
Definition at line 123 of file AbstractPdeModifier.hpp.
Referenced by AbstractPdeModifier< DIM >::serialize().
|
protected |
Shared pointer to a boundary condition object.
Definition at line 92 of file AbstractPdeModifier.hpp.
Referenced by AbstractPdeModifier< DIM >::serialize().
|
protected |
Pointer to the finite element mesh on which to solve the PDE.
Definition at line 111 of file AbstractPdeModifier.hpp.
Referenced by AbstractBoxDomainPdeModifier< DIM >::AbstractBoxDomainPdeModifier().
|
protected |
Shared pointer to a linear PDE object.
Definition at line 87 of file AbstractPdeModifier.hpp.
Referenced by AbstractPdeModifier< DIM >::serialize().
|
protected |
File that the values of the PDE solution are written out to.
Definition at line 126 of file AbstractPdeModifier.hpp.
|
protected |
The solution to the PDE problem at the current time step.
Definition at line 108 of file AbstractPdeModifier.hpp.
Referenced by AbstractPdeModifier< DIM >::AbstractPdeModifier().