37 #include "AbstractDiscreteContinuumNonLinearEllipticPde.hpp" 39 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
41 AbstractNonlinearEllipticPde<SPACE_DIM>(),
42 mDiffusionTensor(identity_matrix<double>(SPACE_DIM)),
43 mDiffusivity(1.0*
unit::metre_squared_per_second),
49 mUseRegularGrid(true),
50 mDiscreteConstantSourceStrengths(),
51 mDiscreteLinearSourceStrengths()
56 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
62 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
68 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
74 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
81 EXCEPTION(
"Requested out of bound grid index in discrete sources. Maybe you forgot to update the source strengths.");
91 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
98 EXCEPTION(
"Requested out of bound grid index in discrete sources. Maybe you forgot to update the source strengths.");
108 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
114 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
120 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
127 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
133 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
139 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
145 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
151 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
158 EXCEPTION(
"A grid has not been set for the determination of source strengths.");
166 std::vector<units::quantity<unit::rate> > result =
mDiscreteSources[idx]->GetLinearInURegularGridValues();
167 std::transform(mDiscreteLinearSourceStrengths.begin( ), mDiscreteLinearSourceStrengths.end( ),
168 result.begin( ), mDiscreteLinearSourceStrengths.begin( ),std::plus<units::quantity<unit::rate> >( ));
170 std::vector<units::quantity<unit::concentration_flow_rate> > result2 =
mDiscreteSources[idx]->GetConstantInURegularGridValues();
179 EXCEPTION(
"A mesh has not been set for the determination of source strengths.");
virtual units::quantity< unit::rate > ComputeLinearInUCoeffInSourceTerm(unsigned gridIndex=0)
void SetRegularGrid(boost::shared_ptr< RegularGrid< SPACE_DIM > > pRegularGrid)
units::quantity< unit::diffusivity > mDiffusivity
void SetUseRegularGrid(bool useRegularGrid)
boost::shared_ptr< TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > > mpMesh
std::vector< boost::shared_ptr< DiscreteSource< SPACE_DIM > > > mDiscreteSources
void SetMesh(boost::shared_ptr< TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > > pMesh)
virtual units::quantity< unit::concentration_flow_rate > ComputeConstantInUSourceTerm(unsigned gridIndex=0)
units::quantity< unit::rate > mLinearInUTerm
std::vector< units::quantity< unit::rate > > mDiscreteLinearSourceStrengths
units::quantity< unit::diffusivity > ComputeIsotropicDiffusionTerm()
void SetIsotropicDiffusionConstant(units::quantity< unit::diffusivity > diffusivity)
void SetContinuumLinearInUTerm(units::quantity< unit::rate > linearInUTerm)
std::vector< boost::shared_ptr< DiscreteSource< SPACE_DIM > > > GetDiscreteSources()
void AddDiscreteSource(boost::shared_ptr< DiscreteSource< SPACE_DIM > > pDiscreteSource)
boost::shared_ptr< RegularGrid< SPACE_DIM > > mpRegularGrid
std::vector< units::quantity< unit::concentration_flow_rate > > mDiscreteConstantSourceStrengths
c_matrix< double, SPACE_DIM, SPACE_DIM > mDiffusionTensor
virtual void UpdateDiscreteSourceStrengths()
AbstractDiscreteContinuumNonLinearEllipticPde()
units::quantity< unit::concentration_flow_rate > mConstantInUTerm
void SetContinuumConstantInUTerm(units::quantity< unit::concentration_flow_rate > constantInUTerm)
virtual ~AbstractDiscreteContinuumNonLinearEllipticPde()