36 #include "SolutionDependentDiscreteSource.hpp" 37 #include "AbstractCellPopulation.hpp" 38 #include "VesselNetwork.hpp" 39 #include "GeometryTools.hpp" 41 template<
unsigned DIM>
45 mConstantInUSinkRatePerSolutionQuantity(0.0*
unit::per_second),
46 mLinearInUSinkRatePerSolutionQuantity(0.0*
unit::metre_cubed_per_mole_per_second)
51 template<
unsigned DIM>
57 template<
unsigned DIM>
64 template<
unsigned DIM>
69 EXCEPTION(
"A mesh is required for this type of source");
72 std::vector<units::quantity<unit::concentration_flow_rate> > values(this->
mpMesh->GetNumElements(), 0.0*unit::mole_per_metre_cubed_per_second);
75 EXCEPTION(
"A solution sampled on the mesh is required for this type of source");
77 for(
unsigned idx=0; idx<this->
mpMesh->GetNumElements(); idx++)
84 template<
unsigned DIM>
89 EXCEPTION(
"A mesh is required for this type of source");
92 std::vector<units::quantity<unit::rate> > values(this->
mpMesh->GetNumElements(), 0.0*unit::per_second);
95 EXCEPTION(
"A solution sampled on the mesh is required for this type of source");
97 for(
unsigned idx=0; idx<this->
mpMesh->GetNumElements(); idx++)
104 template<
unsigned DIM>
107 std::vector<units::quantity<unit::concentration_flow_rate> > values(this->
mpRegularGrid->GetNumberOfPoints(), 0.0*unit::mole_per_metre_cubed_per_second);
110 EXCEPTION(
"A solution sampled on the grid is required for this type of source");
112 for(
unsigned idx=0; idx<this->
mpRegularGrid->GetNumberOfPoints(); idx++)
119 template<
unsigned DIM>
122 std::vector<units::quantity<unit::rate> > values(this->
mpRegularGrid->GetNumberOfPoints(), 0.0*unit::per_second);
125 EXCEPTION(
"A solution sampled on the grid is required for this type of source");
127 for(
unsigned idx=0; idx<this->
mpRegularGrid->GetNumberOfPoints(); idx++)
134 template<
unsigned DIM>
140 template<
unsigned DIM>
146 template<
unsigned DIM>
void SetSolution(std::vector< units::quantity< unit::concentration > > solution)
virtual std::vector< units::quantity< unit::rate > > GetLinearInURegularGridValues()
virtual std::vector< units::quantity< unit::concentration_flow_rate > > GetConstantInURegularGridValues()
boost::shared_ptr< RegularGrid< DIM > > mpRegularGrid
void SetConstantInUSinkRatePerSolutionQuantity(units::quantity< unit::rate > value)
static boost::shared_ptr< SolutionDependentDiscreteSource< DIM > > Create()
units::quantity< unit::rate_per_concentration > mLinearInUSinkRatePerSolutionQuantity
void SetLinearInUSinkRatePerSolutionQuantity(units::quantity< unit::rate_per_concentration > value)
units::quantity< unit::rate > mConstantInUSinkRatePerSolutionQuantity
virtual std::vector< units::quantity< unit::concentration_flow_rate > > GetConstantInUMeshValues()
SolutionDependentDiscreteSource()
virtual ~SolutionDependentDiscreteSource()
std::vector< units::quantity< unit::concentration > > mpSolution
virtual std::vector< units::quantity< unit::rate > > GetLinearInUMeshValues()
boost::shared_ptr< DiscreteContinuumMesh< DIM, DIM > > mpMesh