37 #include "AbstractDiscreteContinuumLinearEllipticPde.hpp" 38 #include "BaseUnits.hpp" 40 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
43 mDiffusionTensor(identity_matrix<double>(SPACE_DIM)),
44 mDiffusivity(1.0 *
unit::metre_squared_per_second),
45 mConstantInUTerm(0.0 *
unit::mole_per_metre_cubed_per_second),
49 mUseRegularGrid(true),
50 mDiscreteConstantSourceStrengths(),
51 mReferenceConcentration(
BaseUnits::Instance()->GetReferenceConcentrationScale())
56 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
61 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
67 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
69 Element<ELEMENT_DIM, SPACE_DIM>* pElement)
75 EXCEPTION(
"Requested out of bound grid index in discrete sources. Maybe you forgot to update the source strengths.");
87 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
94 EXCEPTION(
"Requested out of bound grid index in discrete sources. Maybe you forgot to update the source strengths.");
104 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
110 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
116 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
122 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
128 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
136 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
142 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
148 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
154 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
160 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
167 EXCEPTION(
"A grid has not been set for the determination of source strengths.");
173 std::vector<units::quantity<unit::concentration_flow_rate> > result =
mDiscreteSources[idx]->GetConstantInURegularGridValues();
182 EXCEPTION(
"A mesh has not been set for the determination of source strengths.");
189 std::vector<units::quantity<unit::concentration_flow_rate> > result =
mDiscreteSources[idx]->GetConstantInUMeshValues();
boost::shared_ptr< RegularGrid< SPACE_DIM > > mpRegularGrid
units::quantity< unit::concentration_flow_rate > mConstantInUTerm
void SetMesh(boost::shared_ptr< DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM > > pMesh)
boost::shared_ptr< DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM > > mpMesh
void SetReferenceConcentration(units::quantity< unit::concentration > referenceConcentration)
c_matrix< double, SPACE_DIM, SPACE_DIM > mDiffusionTensor
virtual ~AbstractDiscreteContinuumLinearEllipticPde()
double ComputeConstantInUSourceTerm(const ChastePoint< SPACE_DIM > &rX, Element< ELEMENT_DIM, SPACE_DIM > *pElement)
units::quantity< unit::time > GetReferenceTimeScale()
void AddDiscreteSource(boost::shared_ptr< DiscreteSource< SPACE_DIM > > pDiscreteSource)
void SetContinuumConstantInUTerm(units::quantity< unit::concentration_flow_rate > constantInUTerm)
void SetUseRegularGrid(bool useRegularGrid)
virtual void UpdateDiscreteSourceStrengths()
std::vector< units::quantity< unit::concentration_flow_rate > > mDiscreteConstantSourceStrengths
void SetRegularGrid(boost::shared_ptr< RegularGrid< SPACE_DIM > > pRegularGrid)
std::vector< boost::shared_ptr< DiscreteSource< SPACE_DIM > > > GetDiscreteSources()
static BaseUnits * Instance()
void SetIsotropicDiffusionConstant(units::quantity< unit::diffusivity > diffusivity)
std::vector< boost::shared_ptr< DiscreteSource< SPACE_DIM > > > mDiscreteSources
units::quantity< unit::diffusivity > mDiffusivity
units::quantity< unit::concentration > mReferenceConcentration
c_matrix< double, SPACE_DIM, SPACE_DIM > ComputeDiffusionTerm(const ChastePoint< SPACE_DIM > &)
units::quantity< unit::diffusivity > ComputeIsotropicDiffusionTerm()
AbstractDiscreteContinuumLinearEllipticPde()
units::quantity< unit::length > GetReferenceLengthScale()