Commit 56da4feb authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[experimental][gridvars] add helper boolean

parent 7484273c
......@@ -173,6 +173,9 @@ private:
// Experimental implementation of new grid variables layout //
#include <utility>
#include <dumux/common/typetraits/isvalid.hh>
#include <dumux/discretization/localview.hh>
#include "gridvariables.hh"
......@@ -372,6 +375,23 @@ namespace Dumux::Experimental {
GridFluxVariablesCache gridFluxVarsCache_; //!< the flux variables cache
namespace Detail {
struct hasGridVolVars
template<class GV>
auto operator()(const GV& gv) -> decltype(gv.gridVolVars()) {}
} // end namespace Detail
// helper bool to check if a grid variables type fulfills the new experimental interface
// can be used in the transition period in places where both interfaces should be supported
// Note that this doesn't check if the provided type actually models grid variables. Instead,
// it is assumed that that is known, and it is only checked if the new or old behaviour can be
// expected from it.
template<class GridVariables>
inline constexpr bool areExperimentalGridVars =
} // end namespace Dumux::Experimental
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment