Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
|
#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) | |
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 | SetupSolve (AbstractCellPopulation< DIM, DIM > &rCellPopulation, std::string outputDirectory) |
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 | |
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 | 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 43 of file AbstractPdeModifier.cpp.
References AbstractPdeModifier< DIM >::mSolution.
|
virtual |
Destructor.
Definition at line 64 of file AbstractPdeModifier.cpp.
References PetscTools::Destroy().
boost::shared_ptr< AbstractBoundaryCondition< DIM > > AbstractPdeModifier< DIM >::GetBoundaryCondition | ( | ) |
Definition at line 83 of file AbstractPdeModifier.cpp.
TetrahedralMesh< DIM, DIM > * AbstractPdeModifier< DIM >::GetFeMesh | ( | ) | const |
Definition at line 140 of file AbstractPdeModifier.cpp.
bool AbstractPdeModifier< DIM >::GetOutputGradient | ( | ) |
Set whether to calculate and save the gradient of the solution to CellData.
Definition at line 226 of file AbstractPdeModifier.cpp.
boost::shared_ptr< AbstractLinearPde< DIM, DIM > > AbstractPdeModifier< DIM >::GetPde | ( | ) |
Definition at line 77 of file AbstractPdeModifier.cpp.
Vec AbstractPdeModifier< DIM >::GetSolution | ( | ) |
Definition at line 128 of file AbstractPdeModifier.cpp.
Vec AbstractPdeModifier< DIM >::GetSolution | ( | ) | const |
Definition at line 134 of file AbstractPdeModifier.cpp.
bool AbstractPdeModifier< DIM >::HasAveragedSourcePde | ( | ) |
Definition at line 107 of file AbstractPdeModifier.cpp.
bool AbstractPdeModifier< DIM >::IsNeumannBoundaryCondition | ( | ) |
Definition at line 89 of file AbstractPdeModifier.cpp.
|
virtual |
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 >, EllipticGrowingDomainPdeModifier< DIM >, ParabolicBoxDomainPdeModifier< DIM >, and ParabolicGrowingDomainPdeModifier< DIM >.
Definition at line 244 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 101 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 95 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 232 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 238 of file AbstractPdeModifier.cpp.
|
virtual |
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 |
Reimplemented in AbstractBoxDomainPdeModifier< DIM >, EllipticBoxDomainPdeModifier< DIM >, EllipticGrowingDomainPdeModifier< DIM >, ParabolicBoxDomainPdeModifier< DIM >, and ParabolicGrowingDomainPdeModifier< DIM >.
Definition at line 146 of file AbstractPdeModifier.cpp.
References PetscTools::AmMaster(), and OutputFileHandler::OpenOutputFile().
Referenced by AbstractBoxDomainPdeModifier< DIM >::SetupSolve(), EllipticGrowingDomainPdeModifier< DIM >::SetupSolve(), and ParabolicGrowingDomainPdeModifier< 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 114 of file AbstractPdeModifier.cpp.
|
virtual |
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 162 of file AbstractPdeModifier.cpp.
References VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::AddPointData(), PetscTools::AmMaster(), SimulationTime::GetTime(), SimulationTime::GetTimeStepsElapsed(), SimulationTime::Instance(), and VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
|
virtual |
Overridden UpdateAtEndOfSolve() method.
If mOutputSolutionAtPdeNodes is set to true, close mpVizPdeSolutionResultsFile.
rCellPopulation | reference to the cell population |
Definition at line 214 of file AbstractPdeModifier.cpp.
References PetscTools::AmMaster().
|
pure virtual |
Overridden UpdateAtEndOfTimeStep() method.
As this method is pure virtual, it must be overridden in subclasses.
rCellPopulation | reference to the cell population |
Implemented in EllipticBoxDomainPdeModifier< DIM >, EllipticGrowingDomainPdeModifier< DIM >, ParabolicBoxDomainPdeModifier< DIM >, and ParabolicGrowingDomainPdeModifier< 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 |
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 or not 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.
|
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().