EnableVtkOutput moved to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving 2024-07-06 10:22:47 +02:00
parent 18a18a64c7
commit fd012efac8
3 changed files with 5 additions and 7 deletions

View File

@ -256,6 +256,8 @@ public:
// one of the initial episode (if the length of the initial episode is // one of the initial episode (if the length of the initial episode is
// not millions of trillions of years, that is...) // not millions of trillions of years, that is...)
Parameters::SetDefault<Parameters::InitialTimeStepSize<Scalar>>(3600*24); Parameters::SetDefault<Parameters::InitialTimeStepSize<Scalar>>(3600*24);
// Disable the VTK output by default for this problem ...
Parameters::SetDefault<Parameters::EnableVtkOutput>(false);
} }
@ -326,7 +328,7 @@ public:
enableDriftCompensation_ = Parameters::get<TypeTag, Parameters::EnableDriftCompensation>(); enableDriftCompensation_ = Parameters::get<TypeTag, Parameters::EnableDriftCompensation>();
enableEclOutput_ = Parameters::get<TypeTag, Parameters::EnableEclOutput>(); enableEclOutput_ = Parameters::get<TypeTag, Parameters::EnableEclOutput>();
enableVtkOutput_ = Parameters::get<TypeTag, Parameters::EnableVtkOutput>(); enableVtkOutput_ = Parameters::Get<Parameters::EnableVtkOutput>();
this->enableTuning_ = Parameters::get<TypeTag, Parameters::EnableTuning>(); this->enableTuning_ = Parameters::get<TypeTag, Parameters::EnableTuning>();
this->initialTimeStepSize_ = Parameters::Get<Parameters::InitialTimeStepSize<Scalar>>(); this->initialTimeStepSize_ = Parameters::Get<Parameters::InitialTimeStepSize<Scalar>>();

View File

@ -399,11 +399,6 @@ template<class TypeTag>
struct EnableStorageCache<TypeTag, Properties::TTag::FlowBaseProblem> struct EnableStorageCache<TypeTag, Properties::TTag::FlowBaseProblem>
{ static constexpr bool value = true; }; { static constexpr bool value = true; };
// Disable the VTK output by default for this problem ...
template<class TypeTag>
struct EnableVtkOutput<TypeTag, Properties::TTag::FlowBaseProblem>
{ static constexpr bool value = false; };
// only write the solutions for the report steps to disk // only write the solutions for the report steps to disk
template<class TypeTag> template<class TypeTag>
struct EnableWriteAllSolutions<TypeTag, Properties::TTag::FlowBaseProblem> struct EnableWriteAllSolutions<TypeTag, Properties::TTag::FlowBaseProblem>

View File

@ -126,8 +126,9 @@ namespace Opm {
*/ */
void processElement(const ElementContext& elemCtx) void processElement(const ElementContext& elemCtx)
{ {
if (!Parameters::get<TypeTag, Parameters::EnableVtkOutput>()) if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
return; return;
}
if (eclTracerConcentrationOutput_()) { if (eclTracerConcentrationOutput_()) {
const auto& tracerModel = elemCtx.problem().tracerModel(); const auto& tracerModel = elemCtx.problem().tracerModel();