36 #include "DiscreteSource.hpp" 37 #include "AbstractCellPopulation.hpp" 38 #include "VesselNetwork.hpp" 39 #include "GeometryTools.hpp" 41 template<
unsigned DIM>
47 mConstantInUValue(0.0*
unit::mole_per_metre_cubed_per_second),
48 mLinearInUValue(0.0*
unit::per_second)
53 template<
unsigned DIM>
59 template<
unsigned DIM>
66 template<
unsigned DIM>
71 EXCEPTION(
"A mesh is required for this type of source");
75 std::vector<units::quantity<unit::concentration_flow_rate> > values(
mpMesh->GetNumElements(), 0.0*unit::mole_per_metre_cubed_per_second);
76 std::vector<std::vector<unsigned> > point_element_map =
mpMesh->GetPointElementMap(
mPoints);
77 for(
unsigned idx=0; idx<point_element_map.size(); idx++)
84 template<
unsigned DIM>
89 EXCEPTION(
"A mesh is required for this type of source");
93 std::vector<units::quantity<unit::rate> > values(
mpMesh->GetNumElements(), 0.0*unit::per_second);
94 std::vector<std::vector<unsigned> > point_element_map =
mpMesh->GetPointElementMap(
mPoints);
95 for(
unsigned idx=0; idx<point_element_map.size(); idx++)
102 template<
unsigned DIM>
107 EXCEPTION(
"A regular grid is required for this type of source");
112 EXCEPTION(
"A point is required for this type of source");
116 std::vector<units::quantity<unit::concentration_flow_rate> > values(
mpRegularGrid->GetNumberOfPoints(), 0.0*unit::mole_per_metre_cubed_per_second);
118 for(
unsigned idx=0; idx<point_point_map.size(); idx++)
125 template<
unsigned DIM>
130 EXCEPTION(
"A regular grid is required for this type of source");
135 EXCEPTION(
"A point is required for this type of source");
139 std::vector<units::quantity<unit::rate> > values(
mpRegularGrid->GetNumberOfPoints(), 0.0*unit::per_second);
141 for(
unsigned idx=0; idx<point_point_map.size(); idx++)
148 template<
unsigned DIM>
154 template<
unsigned DIM>
160 template<
unsigned DIM>
166 template<
unsigned DIM>
172 template<
unsigned DIM>
178 template<
unsigned DIM>
void SetConstantInUValue(units::quantity< unit::concentration_flow_rate > value)
void SetLinearInUValue(units::quantity< unit::rate > value)
virtual ~DiscreteSource()
void SetPoints(std::vector< DimensionalChastePoint< DIM > > points)
void SetLabelName(const std::string &rLabel)
boost::shared_ptr< RegularGrid< DIM > > mpRegularGrid
std::vector< DimensionalChastePoint< DIM > > mPoints
units::quantity< unit::rate > mLinearInUValue
virtual std::vector< units::quantity< unit::concentration_flow_rate > > GetConstantInURegularGridValues()
virtual std::vector< units::quantity< unit::rate > > GetLinearInURegularGridValues()
virtual std::vector< units::quantity< unit::concentration_flow_rate > > GetConstantInUMeshValues()
void SetMesh(boost::shared_ptr< DiscreteContinuumMesh< DIM, DIM > > pMesh)
units::quantity< unit::concentration_flow_rate > mConstantInUValue
static boost::shared_ptr< DiscreteSource< DIM > > Create()
boost::shared_ptr< DiscreteContinuumMesh< DIM, DIM > > mpMesh
void SetRegularGrid(boost::shared_ptr< RegularGrid< DIM > > pRegularGrid)
virtual std::vector< units::quantity< unit::rate > > GetLinearInUMeshValues()