Chaste
Build::
|
#include <FlowSolver.hpp>
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 |
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.
FlowSolver< DIM >::FlowSolver | ( | ) |
Constructor.
Definition at line 46 of file FlowSolver.cpp.
FlowSolver< DIM >::~FlowSolver | ( | ) |
Destructor.
Definition at line 62 of file FlowSolver.cpp.
|
static |
Factor constructor. Construct a new instance of the class and return a shared pointer to it.
Definition at line 68 of file FlowSolver.cpp.
void FlowSolver< DIM >::SetUp | ( | ) |
Set up the flow solver. Called the first time the solver is run.
Definition at line 75 of file FlowSolver.cpp.
References VesselNetworkGraphCalculator< DIM >::Create(), FlowSolver< DIM >::mBoundaryConditionNodeIndices, FlowSolver< DIM >::mIsSetUp, FlowSolver< DIM >::mNodeNodeConnectivity, FlowSolver< DIM >::mNodes, FlowSolver< DIM >::mNodeVesselConnectivity, FlowSolver< DIM >::mpLinearSystem, FlowSolver< DIM >::mpVesselNetwork, FlowSolver< DIM >::mUnconnectedNodeIndices, FlowSolver< DIM >::mUseDirectSolver, FlowSolver< DIM >::mVessels, and FlowSolver< DIM >::Update().
Referenced by FlowSolver< DIM >::Solve(), and FlowSolver< DIM >::Update().
void FlowSolver< DIM >::SetUseDirectSolver | ( | bool | useDirectSolver | ) |
Set whether to use a direct solver, an iterative one is used if false (not recommended).
useDirectSolver | whether to use a direct solver |
Definition at line 132 of file FlowSolver.cpp.
References FlowSolver< DIM >::mUseDirectSolver.
void FlowSolver< DIM >::SetVesselNetwork | ( | boost::shared_ptr< VesselNetwork< DIM > > | pVesselNetwork | ) |
Set the vessel network to use in the solver.
pVesselNetwork | the vessel network. |
Definition at line 138 of file FlowSolver.cpp.
References FlowSolver< DIM >::mpVesselNetwork.
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().
void FlowSolver< DIM >::Update | ( | bool | runSetup = false | ) |
Update the solver prior to each run.
runSetup | whether 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().
|
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().
|
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().
|
private |
A node-node connectivity map
Definition at line 82 of file FlowSolver.hpp.
Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::Update().
|
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().
|
private |
A node-vessel connectivity map
Definition at line 77 of file FlowSolver.hpp.
Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::Update().
|
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().
|
private |
The vessel network
Definition at line 72 of file FlowSolver.hpp.
Referenced by FlowSolver< DIM >::SetUp(), and FlowSolver< DIM >::SetVesselNetwork().
|
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().
|
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().
|
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().