12#ifndef DUMUX_MATERIAL_POROSITY_DEFORMATION_HH 
   13#define DUMUX_MATERIAL_POROSITY_DEFORMATION_HH 
   52    template< 
class FVGr
idGeom, 
class ElemSol >
 
   54                                   const typename FVGridGeom::GridView::template Codim<0>::Entity& element,
 
   55                                   const typename FVGridGeom::GridView::template Codim<0>::Entity::Geometry::GlobalCoordinate& globalPos,
 
   56                                   const ElemSol& elemSol,
 
   63        const auto gradU = 
evalGradients(element, element.geometry(), gridGeometry, elemSol, globalPos);
 
   64        for (
int dir = 0; dir < FVGridGeom::GridView::dimension; ++dir)
 
   65            divU += gradU[dir][dir];
 
   68        return clamp((refPoro+divU)/(1.0+divU), minPoro, maxPoro);
 
 
   85    template< 
class FVGr
idGeom, 
class ElemSol >
 
   87                                   const typename FVGridGeom::GridView::template Codim<0>::Entity& element,
 
   88                                   const typename FVGridGeom::SubControlVolume& scv,
 
   89                                   const ElemSol& elemSol,
 
   94        return evaluatePorosity(gridGeometry, element, scv.center(), elemSol, refPoro, minPoro);
 
 
 
free functions for the evaluation of primary variable gradients inside elements.
auto evalGradients(const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const CVFEElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos, bool ignoreState=false)
Evaluates the gradient of a given CVFE element solution to a given global position.
Definition evalgradients.hh:110