Chaste  Build::
FlowSolver< DIM > Class Template Reference

#include <FlowSolver.hpp>

+ Collaboration diagram for FlowSolver< DIM >:

Public Member Functions

 FlowSolver ()
 
 ~FlowSolver ()
 
void SetUseDirectSolver (bool useDirectSolver)
 
void SetUp ()
 
void SetVesselNetwork (boost::shared_ptr< VesselNetwork< DIM > > pVesselNetwork)
 
void Solve ()
 
void Update (bool runSetup=false)
 

Static Public Member Functions

static boost::shared_ptr< FlowSolver< DIM > > Create ()
 

Private Attributes

std::vector< boost::shared_ptr< VesselNode< DIM > > > mNodes
 
std::vector< boost::shared_ptr< Vessel< DIM > > > mVessels
 
boost::shared_ptr< VesselNetwork< DIM > > mpVesselNetwork
 
std::vector< std::vector< unsigned > > mNodeVesselConnectivity
 
std::vector< std::vector< unsigned > > mNodeNodeConnectivity
 
std::vector< unsigned > mBoundaryConditionNodeIndices
 
std::vector< unsigned > mUnconnectedNodeIndices
 
boost::shared_ptr< LinearSystem > mpLinearSystem
 
bool mUseDirectSolver
 
bool mIsSetUp
 

Detailed Description

template<unsigned DIM>
class FlowSolver< DIM >

This solver calculates the pressures at nodes in a vessel network and flow rates in vessels by assuming mass conservation over inflows and outflows at nodes and based on prescribed pressures at inlet and outlet nodes.

Definition at line 52 of file FlowSolver.hpp.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 46 of file FlowSolver.cpp.

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

Destructor.

Definition at line 62 of file FlowSolver.cpp.

Member Function Documentation

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

Factor constructor. Construct a new instance of the class and return a shared pointer to it.

Returns
a pointer to a new instance of the class.

Definition at line 68 of file FlowSolver.cpp.

template<unsigned DIM>
void FlowSolver< DIM >::SetUseDirectSolver ( bool  useDirectSolver)

Set whether to use a direct solver, an iterative one is used if false (not recommended).

Parameters
useDirectSolverwhether to use a direct solver

Definition at line 132 of file FlowSolver.cpp.

References FlowSolver< DIM >::mUseDirectSolver.

template<unsigned DIM>
void FlowSolver< DIM >::SetVesselNetwork ( boost::shared_ptr< VesselNetwork< DIM > >  pVesselNetwork)

Set the vessel network to use in the solver.

Parameters
pVesselNetworkthe vessel network.

Definition at line 138 of file FlowSolver.cpp.

References FlowSolver< DIM >::mpVesselNetwork.

template<unsigned DIM>
void FlowSolver< DIM >::Solve ( )

Run the flow solver and update the pressure and flow rate data in the vessel network

Definition at line 232 of file FlowSolver.cpp.

References FlowSolver< DIM >::mIsSetUp, FlowSolver< DIM >::mNodes, FlowSolver< DIM >::mpLinearSystem, FlowSolver< DIM >::mVessels, and FlowSolver< DIM >::SetUp().

template<unsigned DIM>
void FlowSolver< DIM >::Update ( bool  runSetup = false)

Update the solver prior to each run.

Parameters
runSetupwhether to do a full SetUp or just update the impedances. The former is needed for angiogenesis simulations.

Definition at line 144 of file FlowSolver.cpp.

References FlowSolver< DIM >::mBoundaryConditionNodeIndices, FlowSolver< DIM >::mIsSetUp, FlowSolver< DIM >::mNodeNodeConnectivity, FlowSolver< DIM >::mNodes, FlowSolver< DIM >::mNodeVesselConnectivity, FlowSolver< DIM >::mpLinearSystem, FlowSolver< DIM >::mUnconnectedNodeIndices, FlowSolver< DIM >::mVessels, and FlowSolver< DIM >::SetUp().

Referenced by FlowSolver< DIM >::SetUp().

Member Data Documentation

template<unsigned DIM>
std::vector<unsigned> FlowSolver< DIM >::mBoundaryConditionNodeIndices
private

Indices of nodes on the network boundary

Definition at line 87 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::Update().

template<unsigned DIM>
bool FlowSolver< DIM >::mIsSetUp
private

Has the solver been set up.

Definition at line 107 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), FlowSolver< DIM >::Solve(), and FlowSolver< DIM >::Update().

template<unsigned DIM>
std::vector<std::vector<unsigned> > FlowSolver< DIM >::mNodeNodeConnectivity
private

A node-node connectivity map

Definition at line 82 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::Update().

template<unsigned DIM>
std::vector<boost::shared_ptr<VesselNode<DIM> > > FlowSolver< DIM >::mNodes
private

Nodes in the vessel network. Stored in the flow solver to avoid recalculation by the vessel network class.

Definition at line 61 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), FlowSolver< DIM >::Solve(), and FlowSolver< DIM >::Update().

template<unsigned DIM>
std::vector<std::vector<unsigned> > FlowSolver< DIM >::mNodeVesselConnectivity
private

A node-vessel connectivity map

Definition at line 77 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::Update().

template<unsigned DIM>
boost::shared_ptr<LinearSystem> FlowSolver< DIM >::mpLinearSystem
private

The linear system to be solved for the nodal pressures

Definition at line 97 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), FlowSolver< DIM >::Solve(), and FlowSolver< DIM >::Update().

template<unsigned DIM>
boost::shared_ptr<VesselNetwork<DIM> > FlowSolver< DIM >::mpVesselNetwork
private

The vessel network

Definition at line 72 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::SetVesselNetwork().

template<unsigned DIM>
std::vector<unsigned> FlowSolver< DIM >::mUnconnectedNodeIndices
private

Indices of nodes that are not connected to the rest of the network

Definition at line 92 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::Update().

template<unsigned DIM>
bool FlowSolver< DIM >::mUseDirectSolver
private

Whether to use a direct or iterative solver, the former is recommended.

Definition at line 102 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::SetUseDirectSolver().

template<unsigned DIM>
std::vector<boost::shared_ptr<Vessel<DIM> > > FlowSolver< DIM >::mVessels
private

Vessels in the vessel network. Stored in the flow solver to avoid recalculation by the vessel network class.

Definition at line 67 of file FlowSolver.hpp.

Referenced by FlowSolver< DIM >::SetUp(), FlowSolver< DIM >::Solve(), and FlowSolver< DIM >::Update().


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