Skip to content
Snippets Groups Projects
Commit 8e08dc38 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[pointsources] change interface to more general one

parent 9075a117
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!335[pointsources] change interface to more general one
......@@ -64,6 +64,7 @@ class PointSource
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, SubControlVolume) SubControlVolume;
typedef typename GridView::template Codim<0>::Entity Element;
......@@ -142,7 +143,9 @@ public:
// to be overloaded by derived classes
void update(const Problem &problem,
const Element &element,
const SubControlVolume& scv)
const FVElementGeometry &fvGeometry,
const ElementVolumeVariables &elemVolVars,
const SubControlVolume &scv)
{}
//! set the number of embeddings for this point source
......@@ -252,6 +255,8 @@ public:
// to be overloaded by derived classes
void update(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const ElementVolumeVariables &elemVolVars,
const SubControlVolume &scv)
{ this->values_ = valueFunction_(problem.timeManager(), this->position()); }
......
......@@ -391,12 +391,14 @@ public:
* Positive values mean that the conserved quantity is created, negative ones mean that it vanishes.
* E.g. for the mass balance that would be a mass rate in \f$ [ kg / s ] \f$.
*/
void pointSource(PointSource& pointSource,
void pointSource(PointSource& source,
const Element &element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolume &scv) const
{
// forward to space dependent interface method
asImp_().pointSourceAtPos(pointSource, pointSource.position());
asImp_().pointSourceAtPos(source, source.position());
}
/*!
......@@ -989,9 +991,9 @@ public:
// The second one might be more convenient for e.g. a solution dependent point source.
// we do an update e.g. used for TimeDependentPointSource
pointSource.update(asImp_(), element, scv);
pointSource.update(asImp_(), element, fvGeometry, elemVolVars, scv);
// call convienience problem interface function
asImp_().pointSource(pointSource, element, scv);
asImp_().pointSource(pointSource, element, fvGeometry, elemVolVars, scv);
// at last take care about multiplying with the correct volume
pointSource /= volume;
// add the point source values to the local residual
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment