fixed: EnableDebuggingChecks is a property, not a parameter

This commit is contained in:
Arne Morten Kvarving 2024-08-14 14:05:43 +02:00
parent 9141f2c2d5
commit fdcc9a0fb2
4 changed files with 14 additions and 18 deletions

View File

@ -142,15 +142,11 @@ template<class TypeTag>
struct LinearSolverSplice<TypeTag, TTag::FlowProblem>
{ using type = TTag::FlowIstlSolver; };
} // namespace Opm::Properties
namespace Opm::Parameters {
template<class TypeTag>
struct EnableDebuggingChecks<TypeTag, Properties::TTag::FlowProblem>
struct EnableDebuggingChecks<TypeTag, TTag::FlowProblem>
{ static constexpr bool value = false; };
}
} // namespace Opm::Properties
namespace Opm {

View File

@ -679,7 +679,7 @@ public:
OPM_TIMEBLOCK(endTimeStep);
#ifndef NDEBUG
if constexpr (getPropValue<TypeTag, Parameters::EnableDebuggingChecks>()) {
if constexpr (getPropValue<TypeTag, Properties::EnableDebuggingChecks>()) {
// in debug mode, we don't care about performance, so we check
// if the model does the right thing (i.e., the mass change
// inside the whole reservoir must be equivalent to the fluxes

View File

@ -32,12 +32,6 @@
namespace Opm::Parameters {
// Enable the additional checks even if compiled in debug mode (i.e., with the NDEBUG
// macro undefined). Next to a slightly better performance, this also eliminates some
// print statements in debug mode.
template<class TypeTag, class MyTypeTag>
struct EnableDebuggingChecks { using type = Properties::UndefinedProperty; };
// Enable partial compensation of systematic mass losses via the source term of the next time
// step
template<class TypeTag, class MyTypeTag>

View File

@ -76,6 +76,12 @@ struct AquiferModel { using type = UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct EnableApiTracking { using type = UndefinedProperty; };
// Enable the additional checks even if compiled in debug mode (i.e., with the NDEBUG
// macro undefined). Next to a slightly better performance, this also eliminates some
// print statements in debug mode.
template<class TypeTag, class MyTypeTag>
struct EnableDebuggingChecks { using type = Properties::UndefinedProperty; };
// if thermal flux boundaries are enabled an effort is made to preserve the initial
// thermal gradient specified via the TEMPVD keyword
template<class TypeTag, class MyTypeTag>
@ -264,6 +270,11 @@ template<class TypeTag>
struct EnableExperiments<TypeTag, TTag::FlowBaseProblem>
{ static constexpr bool value = false; };
// By default, we enable the debugging checks if we're compiled in debug mode
template<class TypeTag>
struct EnableDebuggingChecks<TypeTag, TTag::FlowBaseProblem>
{ static constexpr bool value = true; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -278,11 +289,6 @@ template<class TypeTag>
struct EnableAsyncEclOutput<TypeTag, Properties::TTag::FlowBaseProblem>
{ static constexpr bool value = true; };
// By default, we enable the debugging checks if we're compiled in debug mode
template<class TypeTag>
struct EnableDebuggingChecks<TypeTag, Properties::TTag::FlowBaseProblem>
{ static constexpr bool value = true; };
// Drift compensation is an experimental feature, i.e., systematic errors in the
// conservation quantities are only compensated for
// as default if experimental mode is enabled.