Chaste  Build::
AbstractDiscreteContinuumSolver< DIM > Class Template Referenceabstract

#include <AbstractDiscreteContinuumSolver.hpp>

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

Public Member Functions

 AbstractDiscreteContinuumSolver ()
 
virtual ~AbstractDiscreteContinuumSolver ()
 
void AddBoundaryCondition (boost::shared_ptr< DiscreteContinuumBoundaryCondition< DIM > > pBoundaryCondition)
 
bool CellPopulationIsSet ()
 
virtual std::vector< units::quantity< unit::concentration > > GetConcentrations ()
 
virtual std::vector< units::quantity< unit::concentration > > GetConcentrations (boost::shared_ptr< RegularGrid< DIM > > pGrid)=0
 
virtual std::vector< units::quantity< unit::concentration > > GetConcentrations (const std::vector< DimensionalChastePoint< DIM > > &rSamplePoints)=0
 
virtual std::vector< units::quantity< unit::concentration > > GetConcentrations (boost::shared_ptr< DiscreteContinuumMesh< DIM > > pMesh)=0
 
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 ()
 
virtual std::vector< double > GetSolution (const std::vector< DimensionalChastePoint< DIM > > &rSamplePoints)=0
 
virtual std::vector< double > GetSolution (boost::shared_ptr< RegularGrid< DIM > > pGrid)=0
 
virtual std::vector< double > GetSolution (boost::shared_ptr< DiscreteContinuumMesh< DIM > > pMesh)=0
 
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)
 
virtual void Setup ()=0
 
void SetReferenceConcentration (units::quantity< unit::concentration > referenceConcentration)
 
void SetVesselNetwork (boost::shared_ptr< VesselNetwork< DIM > > pNetwork)
 
void SetWriteSolution (bool write=true)
 
virtual void Solve ()=0
 
virtual void Update ()=0
 
virtual void UpdateCellData ()=0
 
virtual void UpdateSolution (const std::vector< double > &rData)
 
virtual void UpdateSolution (const std::vector< units::quantity< unit::concentration > > &rData)
 
virtual void Write ()=0
 

Protected Attributes

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 AbstractDiscreteContinuumSolver< DIM >

An abstract solver class for continuum-discrete field problems. The class is used by the MicrovesselSolver to provide a concentration or dimensionless field for a single, labelled quantity for cells and/or vessels. It contains methods for sampling on structured and unstructured grids. Derived classes are responsible for updating the values of data fields in cells and vessels on each call and optionally writing the solution to file.

Definition at line 59 of file AbstractDiscreteContinuumSolver.hpp.

Constructor & Destructor Documentation

Constructor

Definition at line 40 of file AbstractDiscreteContinuumSolver.cpp.

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

Destructor

Definition at line 63 of file AbstractDiscreteContinuumSolver.cpp.

Member Function Documentation

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::AddBoundaryCondition ( boost::shared_ptr< DiscreteContinuumBoundaryCondition< DIM > >  pBoundaryCondition)

Add a DiscreteContinuum boundary condition for the domain

Parameters
pBoundaryConditionthe boundary condition

Definition at line 69 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mBoundaryConditions.

template<unsigned DIM>
std::vector< units::quantity< unit::concentration > > AbstractDiscreteContinuumSolver< DIM >::GetConcentrations ( )
virtual

Return the value of the field with ordering determined by child classes

Returns
the value of the field with ordering determined by child classes

Definition at line 81 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mConcentrations.

Referenced by AbstractRegularGridDiscreteContinuumSolver< DIM >::GetConcentrations(), and AbstractUnstructuredGridDiscreteContinuumSolver< DIM >::GetConcentrations().

template<unsigned DIM>
virtual std::vector<units::quantity<unit::concentration> > AbstractDiscreteContinuumSolver< DIM >::GetConcentrations ( boost::shared_ptr< RegularGrid< DIM > >  pGrid)
pure virtual

Return the value of the field at all points on the supplied grid

Parameters
pGridthe sampling grid
Returns
the value of the field ordered according to grid order

Implemented in AbstractUnstructuredGridDiscreteContinuumSolver< DIM >, and AbstractRegularGridDiscreteContinuumSolver< DIM >.

template<unsigned DIM>
virtual std::vector<units::quantity<unit::concentration> > AbstractDiscreteContinuumSolver< DIM >::GetConcentrations ( const std::vector< DimensionalChastePoint< DIM > > &  rSamplePoints)
pure virtual

Return the value of the field at the requested points

Parameters
rSamplePointsa vector of sample points
Returns
the value of the field ordered according to input point order

Implemented in AbstractUnstructuredGridDiscreteContinuumSolver< DIM >, and AbstractRegularGridDiscreteContinuumSolver< DIM >.

template<unsigned DIM>
virtual std::vector<units::quantity<unit::concentration> > AbstractDiscreteContinuumSolver< DIM >::GetConcentrations ( boost::shared_ptr< DiscreteContinuumMesh< DIM > >  pMesh)
pure virtual

Return the value of the field on the nodes of the input mesh

Parameters
pMeshthe mesh from which nodes are sampled
Returns
the value of the field ordered according to mesh node ordering

Implemented in AbstractUnstructuredGridDiscreteContinuumSolver< DIM >, and AbstractRegularGridDiscreteContinuumSolver< DIM >.

template<unsigned DIM>
boost::shared_ptr< AbstractDiscreteContinuumNonLinearEllipticPde< DIM, DIM > > AbstractDiscreteContinuumSolver< DIM >::GetNonLinearPde ( )

Return the nonlinear PDE

Returns
the DiscreteContinuum nonlinear elliptic pde

Definition at line 103 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mpNonLinearPde.

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

template<unsigned DIM>
boost::shared_ptr< AbstractDiscreteContinuumLinearEllipticPde< DIM, DIM > > AbstractDiscreteContinuumSolver< DIM >::GetPde ( )

Return the PDE

Returns
the DiscreteContinuum linear elliptic pde

Definition at line 93 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mpPde.

template<unsigned DIM>
units::quantity< unit::concentration > AbstractDiscreteContinuumSolver< DIM >::GetReferenceConcentration ( )

Return the reference concentration value.

Returns
the reference concentration value

Definition at line 113 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mReferenceConcentration.

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

template<unsigned DIM>
std::vector< double > AbstractDiscreteContinuumSolver< DIM >::GetSolution ( )
virtual

Return the value of the field with ordering determined by child classes

Returns
the value of the field with ordering determined by child classes

Definition at line 119 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mSolution.

Referenced by AbstractRegularGridDiscreteContinuumSolver< DIM >::GetSolution(), and AbstractUnstructuredGridDiscreteContinuumSolver< DIM >::GetSolution().

template<unsigned DIM>
virtual std::vector<double> AbstractDiscreteContinuumSolver< DIM >::GetSolution ( const std::vector< DimensionalChastePoint< DIM > > &  rSamplePoints)
pure virtual

Return the value of the field at the requested points

Parameters
rSamplePointsthe points for sampling
Returns
the value of the field ordered according to input point order

Implemented in AbstractUnstructuredGridDiscreteContinuumSolver< DIM >, and AbstractRegularGridDiscreteContinuumSolver< DIM >.

template<unsigned DIM>
virtual std::vector<double> AbstractDiscreteContinuumSolver< DIM >::GetSolution ( boost::shared_ptr< RegularGrid< DIM > >  pGrid)
pure virtual

Return the value of the field at all points on the supplied grid

Parameters
pGridthe grid to be sampled
Returns
the value of the field ordered according to input point order

Implemented in AbstractUnstructuredGridDiscreteContinuumSolver< DIM >, and AbstractRegularGridDiscreteContinuumSolver< DIM >.

template<unsigned DIM>
virtual std::vector<double> AbstractDiscreteContinuumSolver< DIM >::GetSolution ( boost::shared_ptr< DiscreteContinuumMesh< DIM > >  pMesh)
pure virtual

Return the value of the field at all points on the supplied mesh nodes

Parameters
pMeshthe mesh for point sampling
Returns
the value of the field ordered according to mesh node order

Implemented in AbstractUnstructuredGridDiscreteContinuumSolver< DIM >, and AbstractRegularGridDiscreteContinuumSolver< DIM >.

template<unsigned DIM>
bool AbstractDiscreteContinuumSolver< DIM >::HasRegularGrid ( )

Return true if the solver uses a regular grid to store solutions

Returns
true if the solver uses a regular grid to store solutions

Definition at line 125 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mHasRegularGrid.

template<unsigned DIM>
bool AbstractDiscreteContinuumSolver< DIM >::HasUnstructuredGrid ( )

Return true if the solver uses a unstructured grid to store solutions

Returns
true if the solver uses a unstructured grid to store solutions

Definition at line 131 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mHasUnstructuredGrid.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetCellPopulation ( AbstractCellPopulation< DIM > &  rCellPopulation,
units::quantity< unit::length >  cellPopulationReferenceLength,
units::quantity< unit::concentration >  cellPopulationReferenceConcentration 
)

Set the cell population

Parameters
rCellPopulationa reference to the cell population
cellPopulationReferenceLengththe length scale for the cell population
cellPopulationReferenceConcentrationthe concentration scale for the cell population

Definition at line 137 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mCellPopulationReferenceConcentration, AbstractDiscreteContinuumSolver< DIM >::mCellPopulationReferenceLength, and AbstractDiscreteContinuumSolver< DIM >::mpCellPopulation.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetFileHandler ( boost::shared_ptr< OutputFileHandler >  pOutputFileHandler)

Set the file handler containing the working directory

Parameters
pOutputFileHandlerthe file handler containing the working directory

Definition at line 147 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mpOutputFileHandler.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetFileName ( const std::string &  rFilename)

Set the file name for output

Parameters
rFilenamethe file name

Definition at line 153 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mFilename.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetLabel ( const std::string &  rLabel)

Set the name of the field being solved for

Parameters
rLabela reference to the field name

Definition at line 159 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mLabel.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetNonLinearPde ( boost::shared_ptr< AbstractDiscreteContinuumNonLinearEllipticPde< DIM, DIM > >  pPde)

Set the nonlinear PDE to be solved

Parameters
pPdethe pde to be solved

Definition at line 171 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mpNonLinearPde.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetPde ( boost::shared_ptr< AbstractDiscreteContinuumLinearEllipticPde< DIM, DIM > >  pPde)

Set the PDE to be solved

Parameters
pPdethe pde to be solved

Definition at line 165 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mpPde.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetReferenceConcentration ( units::quantity< unit::concentration >  referenceConcentration)

Set the reference concentration

Parameters
referenceConcentrationthe reference concentration

Definition at line 177 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mReferenceConcentration.

template<unsigned DIM>
virtual void AbstractDiscreteContinuumSolver< DIM >::Setup ( )
pure virtual
template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetVesselNetwork ( boost::shared_ptr< VesselNetwork< DIM > >  pNetwork)

Set the vessel network

Parameters
pNetworkthe vessel network

Definition at line 183 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mpNetwork.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::SetWriteSolution ( bool  write = true)

Set whether to write the solution to file on next solve

Parameters
writewrite the solution

Definition at line 189 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mWriteSolution.

template<unsigned DIM>
virtual void AbstractDiscreteContinuumSolver< DIM >::Update ( )
pure virtual
template<unsigned DIM>
virtual void AbstractDiscreteContinuumSolver< DIM >::UpdateCellData ( )
pure virtual
template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::UpdateSolution ( const std::vector< double > &  rData)
virtual

Update the solution manually

Parameters
rDatasolution data map

Reimplemented in AbstractUnstructuredGridDiscreteContinuumSolver< DIM >.

Definition at line 195 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mSolution.

template<unsigned DIM>
void AbstractDiscreteContinuumSolver< DIM >::UpdateSolution ( const std::vector< units::quantity< unit::concentration > > &  rData)
virtual

Update the solution manually

Parameters
rDatasolution data map

Reimplemented in AbstractUnstructuredGridDiscreteContinuumSolver< DIM >.

Definition at line 201 of file AbstractDiscreteContinuumSolver.cpp.

References AbstractDiscreteContinuumSolver< DIM >::mConcentrations.

template<unsigned DIM>
virtual void AbstractDiscreteContinuumSolver< DIM >::Write ( )
pure virtual

Member Data Documentation

template<unsigned DIM>
bool AbstractDiscreteContinuumSolver< DIM >::IsSetupForSolve
protected
template<unsigned DIM>
std::vector<boost::shared_ptr<DiscreteContinuumBoundaryCondition<DIM> > > AbstractDiscreteContinuumSolver< DIM >::mBoundaryConditions
protected
template<unsigned DIM>
units::quantity<unit::concentration> AbstractDiscreteContinuumSolver< DIM >::mCellPopulationReferenceConcentration
protected

The reference concentration scale for the cellpopulation.

Definition at line 82 of file AbstractDiscreteContinuumSolver.hpp.

Referenced by AbstractDiscreteContinuumSolver< DIM >::SetCellPopulation(), and AbstractRegularGridDiscreteContinuumSolver< DIM >::UpdateCellData().

template<unsigned DIM>
units::quantity<unit::length> AbstractDiscreteContinuumSolver< DIM >::mCellPopulationReferenceLength
protected

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