26#ifndef DUMUX_1P_TEST_SPATIALPARAMS_HH
27#define DUMUX_1P_TEST_SPATIALPARAMS_HH
42template<
class Gr
idGeometry,
class Scalar,
class CouplingManager>
43class OnePSpatialParams :
public FVSpatialParamsOneP<GridGeometry, Scalar,
44 OnePSpatialParams<GridGeometry, Scalar, CouplingManager>>
46 using SubControlVolume =
typename GridGeometry::SubControlVolume;
47 using GridView =
typename GridGeometry::GridView;
48 using Element =
typename GridView::template Codim<0>::Entity;
49 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
51 using ThisType = OnePSpatialParams<GridGeometry, Scalar, CouplingManager>;
52 using ParentType = FVSpatialParamsOneP<GridGeometry, Scalar, ThisType>;
59 std::shared_ptr<CouplingManager> couplingManagerPtr)
61 , couplingManagerPtr_(couplingManagerPtr)
62 , permeability_(
getParam<Scalar>(
"SpatialParams.Permeability"))
63 , initPorosity_(
getParam<Scalar>(
"SpatialParams.InitialPorosity"))
68 {
return permeability_; }
71 template<
class ElementSolution>
73 const SubControlVolume& scv,
74 const ElementSolution& elemSol)
const
76 static constexpr auto poroMechId = CouplingManager::poroMechId;
78 const auto& poroMechGridGeom = couplingManagerPtr_->problem(poroMechId).gridGeometry();
79 const auto poroMechElemSol =
elementSolution(element, couplingManagerPtr_->curSol()[poroMechId], poroMechGridGeom);
87 {
return *couplingManagerPtr_; }
90 std::shared_ptr<const CouplingManager> couplingManagerPtr_;
Element solution classes and factory functions.
A relationship for the porosity of a porous medium under mechanical deformation.
The base class for spatial parameters of one-phase problems using a fully implicit discretization met...
Creating random fields using gstat.
auto elementSolution(const Element &element, const SolutionVector &sol, const GridGeometry &gg) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethod::box, BoxElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >
Make an element solution for box schemes.
Definition: box/elementsolution.hh:115
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition: parameters.hh:428
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
static Scalar evaluatePorosity(const FVGridGeom &gridGeometry, const typename FVGridGeom::GridView::template Codim< 0 >::Entity &element, const typename FVGridGeom::GridView::template Codim< 0 >::Entity::Geometry::GlobalCoordinate &globalPos, const ElemSol &elemSol, Scalar refPoro, Scalar minPoro=0.0, Scalar maxPoro=1.0)
Calculates the porosity at a position inside an element.
Definition: porositydeformation.hh:65
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:334
Definition: multidomain/couplingmanager.hh:46
PermeabilityType permeabilityAtPos(const GlobalPosition &globalPoss) const
Returns the permeability at a given position.
Definition: multidomain/poromechanics/el1p/spatialparams_1p.hh:67
Scalar porosity(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the porosity for a sub-control volume.
Definition: multidomain/poromechanics/el1p/spatialparams_1p.hh:72
OnePSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManagerPtr)
Definition: multidomain/poromechanics/el1p/spatialparams_1p.hh:58
Scalar PermeabilityType
Definition: multidomain/boundary/stokesdarcy/1p2c_1p2c/spatialparams.hh:51
const CouplingManager & couplingManager() const
Returns reference to the coupling manager.
Definition: multidomain/poromechanics/el1p/spatialparams_1p.hh:86