25#ifndef DUMUX_FV_SPATIAL_PARAMS_HH
26#define DUMUX_FV_SPATIAL_PARAMS_HH
28#warning "This file is deprecated, use FVPorousMediumFlowSpatialParamsMP from dumux/porousmediumflow/fvspatialparamsmp.hh instead!"
30#include <dune/common/exceptions.hh>
40template<
class GlobalPosition>
41struct hasFluidMatrixInteractionAtPos
43 template<
class SpatialParams>
44 auto operator()(
const SpatialParams& a)
45 ->
decltype(a.fluidMatrixInteractionAtPos(std::declval<GlobalPosition>()))
56template<
class Gr
idGeometry,
class Scalar,
class Implementation>
58[[deprecated(
"Use FVPorousMediumFlowSpatialParamsMP from dumux/porousmediumflow/fvspatialparamsmp.hh instead. This class will be removed after 3.5.")]]
59FVSpatialParams :
public FVSpatialParamsOneP<GridGeometry, Scalar, Implementation>
61 using ParentType = FVSpatialParamsOneP<GridGeometry, Scalar, Implementation>;
62 using GridView =
typename GridGeometry::GridView;
63 using FVElementGeometry =
typename GridGeometry::LocalView;
64 using SubControlVolume =
typename GridGeometry::SubControlVolume;
65 using Element =
typename GridView::template Codim<0>::Entity;
67 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
81 template<
class ElementSolution>
83 const SubControlVolume& scv,
84 const ElementSolution& elemSol)
const
86 static_assert(
decltype(
isValid(Detail::hasFluidMatrixInteractionAtPos<GlobalPosition>())(this->asImp_()))::value,
" \n\n"
87 " Your spatial params class has to either implement\n\n"
88 " auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const\n\n"
89 " or overload this function\n\n"
90 " template<class ElementSolution>\n"
91 " auto fluidMatrixInteraction(const Element& element,\n"
92 " const SubControlVolume& scv,\n"
93 " const ElementSolution& elemSol) const\n\n");
95 return this->asImp_().fluidMatrixInteractionAtPos(scv.center());
106 template<
class Flu
idSystem,
class ElementSolution>
108 const SubControlVolume& scv,
109 const ElementSolution& elemSol)
const
111 return this->asImp_().template wettingPhaseAtPos<FluidSystem>(scv.center());
120 template<
class Flu
idSystem>
123 DUNE_THROW(Dune::InvalidStateException,
124 "The spatial parameters do not provide "
125 "a wettingPhaseAtPos() method.");
A helper function for class member function introspection.
The base class for spatial parameters of one-phase problems using a fully implicit discretization met...
constexpr auto isValid(const Expression &t)
A function that creates a test functor to do class member introspection at compile time.
Definition: isvalid.hh:93
int wettingPhase(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining which phase is to be considered as the wetting phase.
Definition: fv.hh:107
FVSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: fv.hh:70
decltype(auto) fluidMatrixInteraction(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: fv.hh:82
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: fv.hh:121
The base class for spatial parameters of one-phase problems using a fully implicit discretization met...
Definition: fv1p.hh:80