Commit 4c3b6e02 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[linear] improve hasGridView construct

parent 00cf670c
......@@ -39,7 +39,7 @@ template <typename T>
using GVDetector = typename T::GridView;
template <typename T>
using hasGridView = Dune::Std::is_detected<GVDetector, T>;
constexpr bool hasGridView = Dune::Std::is_detected<GVDetector, T>::value;
}
template<class LinearSolverTraits>
......@@ -70,7 +70,7 @@ public:
params["preconditioner.relaxation"] = "1.0";
params["preconditioner.verbosity"] = "0";
params["preconditioner.defaultAggregationSizeMode"] = "isotropic";
if constexpr (Detail::hasGridView<LinearSolverTraits>::value)
if constexpr (Detail::hasGridView<LinearSolverTraits>)
params["preconditioner.defaultAggregationDimension"] = std::to_string(LinearSolverTraits::GridView::dimension);
else
params["preconditioner.defaultAggregationDimension"] = 3;
......
Supports Markdown
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