Chaste
Build::
|
#include <GreensFunctionSolver.hpp>
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 |
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.
GreensFunctionSolver< DIM >::GreensFunctionSolver | ( | ) |
Constructor
Definition at line 53 of file GreensFunctionSolver.cpp.
GreensFunctionSolver< DIM >::~GreensFunctionSolver | ( | ) |
Destructor
Definition at line 74 of file GreensFunctionSolver.cpp.
|
private |
Generate vessel subsegments
Definition at line 219 of file GreensFunctionSolver.cpp.
References AbstractDiscreteContinuumSolver< DIM >::mpNetwork, GreensFunctionSolver< DIM >::mSegmentPointMap, GreensFunctionSolver< DIM >::mSubSegmentCoordinates, GreensFunctionSolver< DIM >::mSubsegmentCutoff, and GreensFunctionSolver< DIM >::mSubSegmentLengths.
Referenced by GreensFunctionSolver< DIM >::Solve().
|
private |
Generate tissue points
Definition at line 267 of file GreensFunctionSolver.cpp.
References AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, GreensFunctionSolver< DIM >::mSinkCoordinates, and GreensFunctionSolver< DIM >::mSinkPointMap.
Referenced by GreensFunctionSolver< DIM >::Solve().
|
private |
Update Gtt
Definition at line 342 of file GreensFunctionSolver.cpp.
References AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, and GreensFunctionSolver< DIM >::mSinkCoordinates.
Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().
|
private |
Update Gtv
Definition at line 370 of file GreensFunctionSolver.cpp.
References AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, GreensFunctionSolver< DIM >::mSinkCoordinates, and GreensFunctionSolver< DIM >::mSubSegmentCoordinates.
Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().
|
private |
Update Gvt
Definition at line 402 of file GreensFunctionSolver.cpp.
References AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, GreensFunctionSolver< DIM >::mSinkCoordinates, and GreensFunctionSolver< DIM >::mSubSegmentCoordinates.
Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().
|
private |
Update Gvv
Definition at line 303 of file GreensFunctionSolver.cpp.
References GreensFunctionSolver< DIM >::mSegmentPointMap, GreensFunctionSolver< DIM >::mSubSegmentCoordinates, and GreensFunctionSolver< DIM >::mSubSegmentLengths.
Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().
void GreensFunctionSolver< DIM >::SetSubSegmentCutoff | ( | units::quantity< unit::length > | value | ) |
Set the minimum subsegment length
value | the minimum subsegment length |
Definition at line 80 of file GreensFunctionSolver.cpp.
References GreensFunctionSolver< DIM >::mSubsegmentCutoff.
|
virtual |
Do the solve
Implements AbstractRegularGridDiscreteContinuumSolver< DIM >.
Definition at line 86 of file GreensFunctionSolver.cpp.
References GreensFunctionSolver< DIM >::GenerateSubSegments(), GreensFunctionSolver< DIM >::GenerateTissuePoints(), BaseUnits::GetReferenceTimeScale(), BaseUnits::Instance(), AbstractDiscreteContinuumSolver< DIM >::mConcentrations, GreensFunctionSolver< DIM >::mGvv, AbstractDiscreteContinuumSolver< DIM >::mLabel, AbstractDiscreteContinuumSolver< DIM >::mpPde, AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, AbstractDiscreteContinuumSolver< DIM >::mReferenceConcentration, GreensFunctionSolver< DIM >::mSegmentConcentration, GreensFunctionSolver< DIM >::mSinkCoordinates, GreensFunctionSolver< DIM >::mSinkRates, GreensFunctionSolver< DIM >::mSourceRates, GreensFunctionSolver< DIM >::mSubSegmentCoordinates, AbstractDiscreteContinuumSolver< DIM >::mWriteSolution, GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices(), AbstractRegularGridDiscreteContinuumSolver< DIM >::UpdateSolution(), and GreensFunctionSolver< DIM >::WriteSolution().
|
private |
Update the greens function matrices
updateGtt | Update Gtt |
updateGvv | Update Gvv |
updateGtv | Update Gtv |
updateGvt | Update Gvt |
Definition at line 280 of file GreensFunctionSolver.cpp.
References GreensFunctionSolver< DIM >::GetTissueTissueInteractionMatrix(), GreensFunctionSolver< DIM >::GetTissueVesselInteractionMatrix(), GreensFunctionSolver< DIM >::GetVesselTissueInteractionMatrix(), GreensFunctionSolver< DIM >::GetVesselVesselInteractionMatrix(), GreensFunctionSolver< DIM >::mGtt, GreensFunctionSolver< DIM >::mGtv, GreensFunctionSolver< DIM >::mGvt, and GreensFunctionSolver< DIM >::mGvv.
Referenced by GreensFunctionSolver< DIM >::Solve().
|
private |
Over-ridden method for writing solution to file
segmentPointData | the concentrations in each segment |
Definition at line 434 of file GreensFunctionSolver.cpp.
References AbstractDiscreteContinuumSolver< DIM >::mpOutputFileHandler, AbstractRegularGridDiscreteContinuumSolver< DIM >::mpRegularGrid, AbstractRegularGridDiscreteContinuumSolver< DIM >::mpVtkSolution, GreensFunctionSolver< DIM >::mSubSegmentCoordinates, RegularGridWriter::SetFilename(), GeometryWriter::SetFileName(), RegularGridWriter::SetImage(), GeometryWriter::SetInput(), RegularGridWriter::Write(), and GeometryWriter::Write().
Referenced by GreensFunctionSolver< DIM >::Solve().
|
private |
Greens function matrix for tissue-tissue case
Definition at line 112 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().
|
private |
Greens function matrix for tissue-vessel case
Definition at line 127 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().
|
private |
Greens function matrix for vessel-tissue case
Definition at line 122 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::UpdateGreensFunctionMatrices().
|
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().
|
private |
A cuboidal tissue domain
Definition at line 67 of file GreensFunctionSolver.hpp.
|
private |
Species concentration in vessels
Definition at line 102 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::Solve().
|
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().
|
private |
The positions of point sinks
Definition at line 72 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::GenerateTissuePoints(), GreensFunctionSolver< DIM >::GetTissueTissueInteractionMatrix(), GreensFunctionSolver< DIM >::GetTissueVesselInteractionMatrix(), GreensFunctionSolver< DIM >::GetVesselTissueInteractionMatrix(), and GreensFunctionSolver< DIM >::Solve().
|
private |
Map between point sinks and segments
Definition at line 77 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::GenerateTissuePoints().
|
private |
Sink rate ordered by point index
Definition at line 92 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::Solve().
|
private |
Source rate ordered by point index
Definition at line 97 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::Solve().
|
private |
Coorindates of subsegments
Definition at line 82 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::GenerateSubSegments(), GreensFunctionSolver< DIM >::GetTissueVesselInteractionMatrix(), GreensFunctionSolver< DIM >::GetVesselTissueInteractionMatrix(), GreensFunctionSolver< DIM >::GetVesselVesselInteractionMatrix(), GreensFunctionSolver< DIM >::Solve(), and GreensFunctionSolver< DIM >::WriteSolution().
|
private |
Minimum subsegment length
Definition at line 132 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::GenerateSubSegments(), and GreensFunctionSolver< DIM >::SetSubSegmentCutoff().
|
private |
Subsegment lengths
Definition at line 87 of file GreensFunctionSolver.hpp.
Referenced by GreensFunctionSolver< DIM >::GenerateSubSegments(), and GreensFunctionSolver< DIM >::GetVesselVesselInteractionMatrix().