Chaste  Build::
FiniteDifferenceSolver< DIM > Class Template Reference

#include <FiniteDifferenceSolver.hpp>

+ Inheritance diagram for FiniteDifferenceSolver< DIM >:
+ Collaboration diagram for FiniteDifferenceSolver< DIM >:

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
 

Detailed Description

template<unsigned DIM>
class FiniteDifferenceSolver< DIM >

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.

Constructor & Destructor Documentation

template<unsigned DIM>
FiniteDifferenceSolver< DIM >::FiniteDifferenceSolver ( )

Constructor

Definition at line 56 of file FiniteDifferenceSolver.cpp.

template<unsigned DIM>
FiniteDifferenceSolver< DIM >::~FiniteDifferenceSolver ( )
virtual

Destructor

Definition at line 73 of file FiniteDifferenceSolver.cpp.

Member Function Documentation

template<unsigned DIM>
boost::shared_ptr< FiniteDifferenceSolver< DIM > > FiniteDifferenceSolver< DIM >::Create ( )
static

Factory constructor method

Returns
a shared pointer to a new solver

Definition at line 66 of file FiniteDifferenceSolver.cpp.

template<unsigned DIM>
boost::shared_ptr< std::vector< std::pair< bool, units::quantity< unit::concentration > > > > FiniteDifferenceSolver< DIM >::GetRGBoundaryConditions ( )

Get the boundary conditions in the finite difference representation

Returns
pointer to the vector of boundary conditions, which is pairs of whether to apply-concentration values ordered by grid index.

Definition at line 79 of file FiniteDifferenceSolver.cpp.

References FiniteDifferenceSolver< DIM >::mpBoundaryConditions.

Referenced by FiniteDifferenceSolver< DIM >::Solve().

template<unsigned DIM>
void FiniteDifferenceSolver< DIM >::UpdateBoundaryConditionsEachSolve ( bool  doUpdate)

Whether to update the boundary conditions on each solve

Parameters
doUpdateupdate the boundary conditions on each solve

Definition at line 85 of file FiniteDifferenceSolver.cpp.

References FiniteDifferenceSolver< DIM >::mUpdateBoundaryConditionsEachSolve.

Member Data Documentation

template<unsigned DIM>
bool FiniteDifferenceSolver< DIM >::mBoundaryConditionsSet
private

Do the boundary conditions need to be udpated each solve.

Definition at line 64 of file FiniteDifferenceSolver.hpp.

Referenced by FiniteDifferenceSolver< DIM >::Update().

template<unsigned DIM>
boost::shared_ptr<std::vector<std::pair<bool, units::quantity<unit::concentration> > > > FiniteDifferenceSolver< DIM >::mpBoundaryConditions
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().

template<unsigned DIM>
bool FiniteDifferenceSolver< DIM >::mUpdateBoundaryConditionsEachSolve
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().


The documentation for this class was generated from the following files: