Chaste
Build::
|
#include <FiniteDifferenceSolver.hpp>
Public Member Functions | |
FiniteDifferenceSolver () | |
virtual | ~FiniteDifferenceSolver () |
boost::shared_ptr< std::vector< std::pair< bool, units::quantity< unit::concentration > > > > | GetRGBoundaryConditions () |
virtual void | Solve () |
void | Setup () |
void | Update () |
void | UpdateBoundaryConditionsEachSolve (bool doUpdate) |
Public Member Functions inherited from AbstractRegularGridDiscreteContinuumSolver< DIM > | |
AbstractRegularGridDiscreteContinuumSolver () | |
virtual | ~AbstractRegularGridDiscreteContinuumSolver () |
boost::shared_ptr< RegularGrid< DIM > > | GetGrid () |
virtual std::vector< units::quantity< unit::concentration > > | GetConcentrations (const std::vector< DimensionalChastePoint< DIM > > &rSamplePoints) |
virtual std::vector< units::quantity< unit::concentration > > | GetConcentrations (boost::shared_ptr< RegularGrid< DIM > > pGrid) |
virtual std::vector< units::quantity< unit::concentration > > | GetConcentrations (boost::shared_ptr< DiscreteContinuumMesh< DIM > > pMesh) |
virtual std::vector< double > | GetSolution (const std::vector< DimensionalChastePoint< DIM > > &rSamplePoints) |
virtual std::vector< double > | GetSolution (boost::shared_ptr< RegularGrid< DIM > > pGrid) |
virtual std::vector< double > | GetSolution (boost::shared_ptr< DiscreteContinuumMesh< DIM > > pMesh) |
virtual vtkSmartPointer< vtkImageData > | GetVtkSolution () |
void | SetGrid (boost::shared_ptr< RegularGrid< DIM > > pRegularGrid) |
virtual void | UpdateCellData () |
virtual void | UpdateSolution (std::vector< double > &rData) |
virtual void | UpdateSolution (std::vector< units::quantity< unit::concentration > > &rData) |
virtual void | Write () |
Public Member Functions inherited from AbstractDiscreteContinuumSolver< DIM > | |
AbstractDiscreteContinuumSolver () | |
virtual | ~AbstractDiscreteContinuumSolver () |
void | AddBoundaryCondition (boost::shared_ptr< DiscreteContinuumBoundaryCondition< DIM > > pBoundaryCondition) |
bool | CellPopulationIsSet () |
virtual std::vector< units::quantity< unit::concentration > > | GetConcentrations () |
const std::string & | GetLabel () |
boost::shared_ptr< AbstractDiscreteContinuumNonLinearEllipticPde< DIM, DIM > > | GetNonLinearPde () |
boost::shared_ptr< AbstractDiscreteContinuumLinearEllipticPde< DIM, DIM > > | GetPde () |
units::quantity< unit::concentration > | GetReferenceConcentration () |
virtual std::vector< double > | GetSolution () |
bool | HasRegularGrid () |
bool | HasUnstructuredGrid () |
void | SetCellPopulation (AbstractCellPopulation< DIM > &rCellPopulation, units::quantity< unit::length > cellPopulationReferenceLength, units::quantity< unit::concentration > cellPopulationReferenceConcentration) |
void | SetFileHandler (boost::shared_ptr< OutputFileHandler > pOutputFileHandler) |
void | SetFileName (const std::string &rFilename) |
void | SetLabel (const std::string &rLabel) |
void | SetPde (boost::shared_ptr< AbstractDiscreteContinuumLinearEllipticPde< DIM, DIM > > pPde) |
void | SetNonLinearPde (boost::shared_ptr< AbstractDiscreteContinuumNonLinearEllipticPde< DIM, DIM > > pPde) |
void | SetReferenceConcentration (units::quantity< unit::concentration > referenceConcentration) |
void | SetVesselNetwork (boost::shared_ptr< VesselNetwork< DIM > > pNetwork) |
void | SetWriteSolution (bool write=true) |
virtual void | UpdateSolution (const std::vector< double > &rData) |
virtual void | UpdateSolution (const std::vector< units::quantity< unit::concentration > > &rData) |
Static Public Member Functions | |
static boost::shared_ptr< FiniteDifferenceSolver< DIM > > | Create () |
Private Member Functions | |
void | DoLinearSolve () |
Private Attributes | |
boost::shared_ptr< std::vector< std::pair< bool, units::quantity< unit::concentration > > > > | mpBoundaryConditions |
bool | mUpdateBoundaryConditionsEachSolve |
bool | mBoundaryConditionsSet |
Additional Inherited Members | |
Protected Attributes inherited from AbstractRegularGridDiscreteContinuumSolver< DIM > | |
vtkSmartPointer< vtkImageData > | mpVtkSolution |
boost::shared_ptr< RegularGrid< DIM > > | mpRegularGrid |
Protected Attributes inherited from AbstractDiscreteContinuumSolver< DIM > | |
boost::shared_ptr< VesselNetwork< DIM > > | mpNetwork |
AbstractCellPopulation< DIM > * | mpCellPopulation |
units::quantity< unit::length > | mCellPopulationReferenceLength |
units::quantity< unit::concentration > | mCellPopulationReferenceConcentration |
boost::shared_ptr< OutputFileHandler > | mpOutputFileHandler |
std::string | mFilename |
std::string | mLabel |
bool | IsSetupForSolve |
bool | mWriteSolution |
boost::shared_ptr< AbstractDiscreteContinuumLinearEllipticPde< DIM, DIM > > | mpPde |
boost::shared_ptr< AbstractDiscreteContinuumNonLinearEllipticPde< DIM, DIM > > | mpNonLinearPde |
std::vector< boost::shared_ptr< DiscreteContinuumBoundaryCondition< DIM > > > | mBoundaryConditions |
units::quantity< unit::concentration > | mReferenceConcentration |
std::vector< double > | mSolution |
std::vector< units::quantity< unit::concentration > > | mConcentrations |
bool | mHasRegularGrid |
bool | mHasUnstructuredGrid |
Finite difference solver for concentration based reaction diffusion PDEs. It can include discrete representations of cells and vessels.
Definition at line 48 of file FiniteDifferenceSolver.hpp.
FiniteDifferenceSolver< DIM >::FiniteDifferenceSolver | ( | ) |
Constructor
Definition at line 56 of file FiniteDifferenceSolver.cpp.
|
virtual |
Destructor
Definition at line 73 of file FiniteDifferenceSolver.cpp.
|
static |
Factory constructor method
Definition at line 66 of file FiniteDifferenceSolver.cpp.
|
private |
Do a linear PDE solve
Definition at line 168 of file FiniteDifferenceSolver.cpp.
References BaseUnits::GetReferenceTimeScale(), BaseUnits::Instance(), FiniteDifferenceSolver< DIM >::mpBoundaryConditions, AbstractDiscreteContinuumSolver< DIM >::mpNonLinearPde, AbstractDiscreteContinuumSolver< DIM >::mpPde, AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, AbstractDiscreteContinuumSolver< DIM >::mReferenceConcentration, AbstractDiscreteContinuumSolver< DIM >::mWriteSolution, AbstractRegularGridDiscreteContinuumSolver< DIM >::UpdateSolution(), and AbstractRegularGridDiscreteContinuumSolver< DIM >::Write().
Referenced by FiniteDifferenceSolver< DIM >::Solve().
boost::shared_ptr< std::vector< std::pair< bool, units::quantity< unit::concentration > > > > FiniteDifferenceSolver< DIM >::GetRGBoundaryConditions | ( | ) |
Get the boundary conditions in the finite difference representation
Definition at line 79 of file FiniteDifferenceSolver.cpp.
References FiniteDifferenceSolver< DIM >::mpBoundaryConditions.
Referenced by FiniteDifferenceSolver< DIM >::Solve().
|
virtual |
Overridden setup method
Reimplemented from AbstractRegularGridDiscreteContinuumSolver< DIM >.
Definition at line 91 of file FiniteDifferenceSolver.cpp.
References AbstractDiscreteContinuumSolver< DIM >::CellPopulationIsSet(), AbstractDiscreteContinuumSolver< DIM >::IsSetupForSolve, AbstractDiscreteContinuumSolver< DIM >::mBoundaryConditions, AbstractDiscreteContinuumSolver< DIM >::mCellPopulationReferenceLength, FiniteDifferenceSolver< DIM >::mpBoundaryConditions, AbstractDiscreteContinuumSolver< DIM >::mpCellPopulation, AbstractDiscreteContinuumSolver< DIM >::mpNetwork, AbstractDiscreteContinuumSolver< DIM >::mpNonLinearPde, AbstractDiscreteContinuumSolver< DIM >::mpPde, AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, AbstractDiscreteContinuumSolver< DIM >::mReferenceConcentration, AbstractRegularGridDiscreteContinuumSolver< DIM >::Setup(), and FiniteDifferenceSolver< DIM >::Update().
Referenced by FiniteDifferenceSolver< DIM >::Solve().
|
virtual |
Overridden solve method
Implements AbstractRegularGridDiscreteContinuumSolver< DIM >.
Definition at line 298 of file FiniteDifferenceSolver.cpp.
References FiniteDifferenceSolver< DIM >::DoLinearSolve(), AbstractRegularGridDiscreteContinuumSolver< DIM >::GetGrid(), AbstractDiscreteContinuumSolver< DIM >::GetNonLinearPde(), AbstractDiscreteContinuumSolver< DIM >::GetReferenceConcentration(), BaseUnits::GetReferenceTimeScale(), FiniteDifferenceSolver< DIM >::GetRGBoundaryConditions(), BaseUnits::Instance(), AbstractDiscreteContinuumSolver< DIM >::IsSetupForSolve, AbstractDiscreteContinuumSolver< DIM >::mConcentrations, AbstractDiscreteContinuumSolver< DIM >::mpPde, AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, AbstractDiscreteContinuumSolver< DIM >::mReferenceConcentration, AbstractDiscreteContinuumSolver< DIM >::mWriteSolution, FiniteDifferenceSolver< DIM >::Setup(), AbstractRegularGridDiscreteContinuumSolver< DIM >::UpdateSolution(), and AbstractRegularGridDiscreteContinuumSolver< DIM >::Write().
|
virtual |
Overridden update method
Reimplemented from AbstractRegularGridDiscreteContinuumSolver< DIM >.
Definition at line 144 of file FiniteDifferenceSolver.cpp.
References AbstractDiscreteContinuumSolver< DIM >::mBoundaryConditions, FiniteDifferenceSolver< DIM >::mBoundaryConditionsSet, FiniteDifferenceSolver< DIM >::mpBoundaryConditions, AbstractDiscreteContinuumSolver< DIM >::mpNonLinearPde, AbstractDiscreteContinuumSolver< DIM >::mpPde, and FiniteDifferenceSolver< DIM >::mUpdateBoundaryConditionsEachSolve.
Referenced by FiniteDifferenceSolver< DIM >::Setup().
void FiniteDifferenceSolver< DIM >::UpdateBoundaryConditionsEachSolve | ( | bool | doUpdate | ) |
Whether to update the boundary conditions on each solve
doUpdate | update the boundary conditions on each solve |
Definition at line 85 of file FiniteDifferenceSolver.cpp.
References FiniteDifferenceSolver< DIM >::mUpdateBoundaryConditionsEachSolve.
|
private |
Do the boundary conditions need to be udpated each solve.
Definition at line 64 of file FiniteDifferenceSolver.hpp.
Referenced by FiniteDifferenceSolver< DIM >::Update().
|
private |
Solver specific copy of boundary condition information, used for efficiency. It is a vector of pairs of whether to apply-concentration values ordered by grid index.
Definition at line 54 of file FiniteDifferenceSolver.hpp.
Referenced by FiniteDifferenceSolver< DIM >::DoLinearSolve(), FiniteDifferenceSolver< DIM >::GetRGBoundaryConditions(), FiniteDifferenceSolver< DIM >::Setup(), and FiniteDifferenceSolver< DIM >::Update().
|
private |
Do the boundary conditions need to be udpated each solve.
Definition at line 59 of file FiniteDifferenceSolver.hpp.
Referenced by FiniteDifferenceSolver< DIM >::Update(), and FiniteDifferenceSolver< DIM >::UpdateBoundaryConditionsEachSolve().