11#ifndef DUMUX_CVFE_LOCAL_VARIABLES_ADAPTER_HH
12#define DUMUX_CVFE_LOCAL_VARIABLES_ADAPTER_HH
14#include <dune/common/std/type_traits.hh>
15#include <dumux/common/concepts/ipdata_.hh>
20template<
class Imp,
class ES,
class P,
class E,
class SCV>
22 std::declval<Imp>().update(std::declval<ES>(), std::declval<P>(), std::declval<E>(), std::declval<SCV>())
26template<
class Imp,
class ES,
class P,
class E,
class SCV>
28{
return Dune::Std::is_detected<UpdateFunctionDetector, Imp, ES, P, E, SCV>::value; }
34template <
class VolumeVariables>
42 using Indices =
typename VolumeVariables::Indices;
53 template<
class ElementSolution,
class Problem,
class FVElementGeometry, Concept::LocalDofIpData IpData>
54 void update(
const ElementSolution& elemSol,
55 const Problem& problem,
56 const FVElementGeometry& fvGeometry,
62 typename FVElementGeometry::Element,
typename FVElementGeometry::SubControlVolume>())
63 VolumeVariables::update(elemSol, problem, fvGeometry.element(), fvGeometry.scv(ipData.localDofIndex()));
65 VolumeVariables::update(elemSol, problem, fvGeometry, ipData);
A class for providing the new update interface of variables. This allows to still use the VolumesVari...
Definition: variablesadapter.hh:36
typename VolumeVariables::Indices Indices
export the indices type
Definition: variablesadapter.hh:42
typename VolumeVariables::PrimaryVariables PrimaryVariables
export the type used for the primary variables
Definition: variablesadapter.hh:39
void update(const ElementSolution &elemSol, const Problem &problem, const FVElementGeometry &fvGeometry, const IpData &ipData)
Update all quantities for a given control volume.
Definition: variablesadapter.hh:54
Definition: elementvariables.hh:24
decltype(std::declval< Imp >().update(std::declval< ES >(), std::declval< P >(), std::declval< E >(), std::declval< SCV >())) UpdateFunctionDetector
helper struct detecting if volumeVariables class has update function for scvs (old interface)
Definition: variablesadapter.hh:23
constexpr bool hasUpdateFunctionForScvs()
Whenever the old interface is supported, we update related to scvs.
Definition: variablesadapter.hh:27