24#ifndef DUMUX_INCOMPRESSIBLE_ONEP_TEST_SPATIAL_PARAMS_HH
25#define DUMUX_INCOMPRESSIBLE_ONEP_TEST_SPATIAL_PARAMS_HH
37template<
class TypeTag>
38class OnePTestSpatialParams
39:
public FVSpatialParamsOneP<GetPropType<TypeTag, Properties::GridGeometry>,
40 GetPropType<TypeTag, Properties::Scalar>,
41 OnePTestSpatialParams<TypeTag>>
43 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
44 using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
45 using GridView =
typename GridGeometry::GridView;
46 using Element =
typename GridView::template Codim<0>::Entity;
47 using FVElementGeometry =
typename GridGeometry::LocalView;
48 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
49 using ParentType = FVSpatialParamsOneP<GridGeometry, Scalar, OnePTestSpatialParams<TypeTag>>;
51 static constexpr int dimWorld = GridView::dimensionworld;
52 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
59 permeability_ = getParam<Scalar>(
"SpatialParams.Permeability");
60 permeabilityLens_ = getParam<Scalar>(
"SpatialParams.PermeabilityLens");
62 lensLowerLeft_ = getParam<GlobalPosition>(
"SpatialParams.LensLowerLeft");
63 lensUpperRight_ = getParam<GlobalPosition>(
"SpatialParams.LensUpperRight");
74 template<
class ElementSolution>
76 const SubControlVolume& scv,
77 const ElementSolution& elemSol)
const
79 if (isInLens_(scv.dofPosition()))
80 return permeabilityLens_;
94 bool isInLens_(
const GlobalPosition &globalPos)
const
96 for (
int i = 0; i < dimWorld; ++i) {
97 if (globalPos[i] < lensLowerLeft_[i] + eps_ || globalPos[i] > lensUpperRight_[i] - eps_)
103 GlobalPosition lensLowerLeft_;
104 GlobalPosition lensUpperRight_;
106 Scalar permeability_, permeabilityLens_;
108 static constexpr Scalar eps_ = 1.5e-7;
The base class for spatial parameters of one-phase problems using a fully implicit discretization met...
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
The base class for spatial parameters of one-phase problems using a fully implicit discretization met...
Definition: fv1p.hh:77
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:334
Scalar PermeabilityType
Definition: multidomain/boundary/darcydarcy/1p_1p/spatialparams.hh:74
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the (intrinsic) permeability .
Definition: porousmediumflow/1p/implicit/periodicbc/spatialparams.hh:75
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Defines the porosity .
Definition: porousmediumflow/1p/implicit/periodicbc/spatialparams.hh:90
OnePTestSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/1p/implicit/periodicbc/spatialparams.hh:56
Defines a type tag and some properties for models using the box scheme.