Chaste  Build::
GreensFunctionSolver< DIM > Class Template Reference

#include <GreensFunctionSolver.hpp>

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

Public Member Functions

 GreensFunctionSolver ()
 
 ~GreensFunctionSolver ()
 
void SetSubSegmentCutoff (units::quantity< unit::length > value)
 
void Solve ()
 
- 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 Setup ()
 
virtual void UpdateCellData ()
 
virtual void UpdateSolution (std::vector< double > &rData)
 
virtual void UpdateSolution (std::vector< units::quantity< unit::concentration > > &rData)
 
virtual void Update ()
 
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)
 

Private Member Functions

void GenerateSubSegments ()
 
void GenerateTissuePoints ()
 
void UpdateGreensFunctionMatrices (bool updateGtt=0, bool updateGvv=0, bool updateGtv=0, bool updateGvt=0)
 
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > GetVesselVesselInteractionMatrix ()
 
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > GetTissueTissueInteractionMatrix ()
 
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > GetTissueVesselInteractionMatrix ()
 
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > GetVesselTissueInteractionMatrix ()
 
void WriteSolution (std::map< std::string, std::vector< units::quantity< unit::concentration > > > &segmentPointData)
 

Private Attributes

boost::shared_ptr< Part< DIM > > mpDomain
 
std::vector< DimensionalChastePoint< DIM > > mSinkCoordinates
 
std::vector< unsigned > mSinkPointMap
 
std::vector< DimensionalChastePoint< DIM > > mSubSegmentCoordinates
 
std::vector< units::quantity< unit::length > > mSubSegmentLengths
 
std::vector< units::quantity< unit::molar_flow_rate > > mSinkRates
 
std::vector< units::quantity< unit::molar_flow_rate > > mSourceRates
 
std::vector< units::quantity< unit::concentration > > mSegmentConcentration
 
std::map< unsigned, boost::shared_ptr< VesselSegment< DIM > > > mSegmentPointMap
 
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > mGtt
 
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > mGvv
 
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > mGvt
 
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > mGtv
 
units::quantity< unit::length > mSubsegmentCutoff
 

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

A class for solving diffusion-reaction PDEs based on the Greens Function method of Secomb and co-workers.

The method is described here: Secomb, T.W., Hsu, R., Park, E.Y.H. and Dewhirst, M.W. Green's function methods for analysis of oxygen delivery to tissue by microvascular networks. Annals of Biomedical Engineering, 32: 1519-1529 (2004).

The present code is based on a C++ implementation available here (without license): http://physiology.arizona.edu/people/secomb/greens_c3 however it has been re-written from scratch following Chaste style and using PETSc linear solvers.

Definition at line 62 of file GreensFunctionSolver.hpp.

Constructor & Destructor Documentation

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

Constructor

Definition at line 53 of file GreensFunctionSolver.cpp.

template<unsigned DIM>
GreensFunctionSolver< DIM >::~GreensFunctionSolver ( )

Destructor

Definition at line 74 of file GreensFunctionSolver.cpp.

Member Function Documentation

template<unsigned DIM>
void GreensFunctionSolver< DIM >::GenerateTissuePoints ( )
private
template<unsigned DIM>
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > GreensFunctionSolver< DIM >::GetTissueTissueInteractionMatrix ( )
private
template<unsigned DIM>
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > GreensFunctionSolver< DIM >::GetTissueVesselInteractionMatrix ( )
private
template<unsigned DIM>
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > GreensFunctionSolver< DIM >::GetVesselTissueInteractionMatrix ( )
private
template<unsigned DIM>
boost::shared_ptr< boost::multi_array< units::quantity< unit::per_length >, 2 > > GreensFunctionSolver< DIM >::GetVesselVesselInteractionMatrix ( )
private
template<unsigned DIM>
void GreensFunctionSolver< DIM >::SetSubSegmentCutoff ( units::quantity< unit::length >  value)

Set the minimum subsegment length

Parameters
valuethe minimum subsegment length

Definition at line 80 of file GreensFunctionSolver.cpp.

References GreensFunctionSolver< DIM >::mSubsegmentCutoff.

template<unsigned DIM>
void GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices ( bool  updateGtt = 0,
bool  updateGvv = 0,
bool  updateGtv = 0,
bool  updateGvt = 0 
)
private
template<unsigned DIM>
void GreensFunctionSolver< DIM >::WriteSolution ( std::map< std::string, std::vector< units::quantity< unit::concentration > > > &  segmentPointData)
private

Member Data Documentation

template<unsigned DIM>
boost::shared_ptr<boost::multi_array<units::quantity<unit::per_length> , 2> > GreensFunctionSolver< DIM >::mGtt
private

Greens function matrix for tissue-tissue case

Definition at line 112 of file GreensFunctionSolver.hpp.

Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().

template<unsigned DIM>
boost::shared_ptr<boost::multi_array<units::quantity<unit::per_length> , 2> > GreensFunctionSolver< DIM >::mGtv
private

Greens function matrix for tissue-vessel case

Definition at line 127 of file GreensFunctionSolver.hpp.

Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().

template<unsigned DIM>
boost::shared_ptr<boost::multi_array<units::quantity<unit::per_length> , 2> > GreensFunctionSolver< DIM >::mGvt
private

Greens function matrix for vessel-tissue case

Definition at line 122 of file GreensFunctionSolver.hpp.

Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().

template<unsigned DIM>
boost::shared_ptr<boost::multi_array<units::quantity<unit::per_length> , 2> > GreensFunctionSolver< DIM >::mGvv
private

Greens function matrix for vessel-vessel case

Definition at line 117 of file GreensFunctionSolver.hpp.

Referenced by GreensFunctionSolver< DIM >::Solve(), and GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().

template<unsigned DIM>
boost::shared_ptr<Part<DIM> > GreensFunctionSolver< DIM >::mpDomain
private

A cuboidal tissue domain

Definition at line 67 of file GreensFunctionSolver.hpp.

template<unsigned DIM>
std::vector<units::quantity<unit::concentration> > GreensFunctionSolver< DIM >::mSegmentConcentration
private

Species concentration in vessels

Definition at line 102 of file GreensFunctionSolver.hpp.

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

template<unsigned DIM>
std::map<unsigned, boost::shared_ptr<VesselSegment<DIM> > > GreensFunctionSolver< DIM >::mSegmentPointMap
private

Map between vessel segments and point locations

Definition at line 107 of file GreensFunctionSolver.hpp.

Referenced by GreensFunctionSolver< DIM >::GenerateSubSegments(), and GreensFunctionSolver< DIM >::GetVesselVesselInteractionMatrix().

template<unsigned DIM>
std::vector<unsigned> GreensFunctionSolver< DIM >::mSinkPointMap
private

Map between point sinks and segments

Definition at line 77 of file GreensFunctionSolver.hpp.

Referenced by GreensFunctionSolver< DIM >::GenerateTissuePoints().

template<unsigned DIM>
std::vector<units::quantity<unit::molar_flow_rate> > GreensFunctionSolver< DIM >::mSinkRates
private

Sink rate ordered by point index

Definition at line 92 of file GreensFunctionSolver.hpp.

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

template<unsigned DIM>
std::vector<units::quantity<unit::molar_flow_rate> > GreensFunctionSolver< DIM >::mSourceRates
private

Source rate ordered by point index

Definition at line 97 of file GreensFunctionSolver.hpp.

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

template<unsigned DIM>
units::quantity<unit::length> GreensFunctionSolver< DIM >::mSubsegmentCutoff
private
template<unsigned DIM>
std::vector<units::quantity<unit::length> > GreensFunctionSolver< DIM >::mSubSegmentLengths
private

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