Commit c22ff548 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'fix/forchheimer' into 'master'

[implict][fluxvars] Fix update function to make implicit problems compilable using Forchheimer

See merge request !195
parents 5555d1d1 f39a98c8
......@@ -360,6 +360,10 @@ protected:
}// loop all phases
// set const reference to the fvGeometry
const void setFVGeometryPtr_(const FVElementGeometry& fvGeometry)
{ fvGeometryPtr_ = &fvGeometry; }
// return const reference to the fvGeometry
const FVElementGeometry& fvGeometry_() const
{ return *fvGeometryPtr_; }
......@@ -82,6 +82,7 @@ class ImplicitForchheimerFluxVariables
friend class ImplicitDarcyFluxVariables<TypeTag>; // be friends with parent
typedef ImplicitDarcyFluxVariables<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) Implementation;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
......@@ -126,6 +127,32 @@ public:
ImplicitForchheimerFluxVariables() = default;
/*! \copydoc ParentType::update() */
void update(const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int fIdx,
const ElementVolumeVariables &elemVolVars,
const bool onBoundary = false)
ParentType::onBoundary_ = onBoundary;
ParentType::faceIdx_ = fIdx;
ParentType::mobilityUpwindWeight_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Implicit, MobilityUpwindWeight);
asImp_().calculateGradients_(problem, element, elemVolVars);
asImp_().calculateNormalVelocity_(problem, element, elemVolVars);
//! Returns the implementation of the flux variables (i.e. static polymorphism)
Implementation &asImp_()
{ return *static_cast<Implementation *>(this); }
//! \copydoc asImp_()
const Implementation &asImp_() const
{ return *static_cast<const Implementation *>(this); }
* \brief Function for calculation of velocities.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment