mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: EclWriter parameters moved to Opm::Parameters namespace
This commit is contained in:
parent
917fdbedfd
commit
b69439aa1f
@ -191,7 +191,9 @@ public:
|
||||
OPM_TIMEBLOCK(problemWriteOutput);
|
||||
// use the generic code to prepare the output fields and to
|
||||
// write the desired VTK files.
|
||||
if (Parameters::get<TypeTag, Properties::EnableWriteAllSolutions>() || this->simulator().episodeWillBeOver()) {
|
||||
if (Parameters::get<TypeTag, Parameters::EnableWriteAllSolutions>() ||
|
||||
this->simulator().episodeWillBeOver())
|
||||
{
|
||||
// \Note: the SimulatorTimer does not carry any useful information, so PRT file (if it gets output) will contain wrong
|
||||
// timing information.
|
||||
BaseType::writeOutput(SimulatorTimer{}, verbose);
|
||||
|
@ -50,31 +50,26 @@
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace Opm::Properties {
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableEclOutput {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
struct EnableEclOutput { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableAsyncEclOutput {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
struct EnableAsyncEclOutput { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EclOutputDoublePrecision {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
struct EclOutputDoublePrecision { using type = Properties::UndefinedProperty; };
|
||||
|
||||
// Write all solutions for visualization, not just the ones for the
|
||||
// report steps...
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableWriteAllSolutions {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
struct EnableWriteAllSolutions { using type = Properties::UndefinedProperty; };
|
||||
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableEsmry {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
} // namespace Opm::Properties
|
||||
struct EnableEsmry { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -130,10 +125,10 @@ public:
|
||||
{
|
||||
OutputBlackOilModule<TypeTag>::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Properties::EnableAsyncEclOutput>
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableAsyncEclOutput>
|
||||
("Write the ECL-formated results in a non-blocking way "
|
||||
"(i.e., using a separate thread).");
|
||||
Parameters::registerParam<TypeTag, Properties::EnableEsmry>
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableEsmry>
|
||||
("Write ESMRY file for fast loading of summary data.");
|
||||
}
|
||||
|
||||
@ -153,8 +148,8 @@ public:
|
||||
((simulator.vanguard().grid().comm().rank() == 0)
|
||||
? &simulator.vanguard().equilCartesianIndexMapper()
|
||||
: nullptr),
|
||||
Parameters::get<TypeTag, Properties::EnableAsyncEclOutput>(),
|
||||
Parameters::get<TypeTag, Properties::EnableEsmry>())
|
||||
Parameters::get<TypeTag, Parameters::EnableAsyncEclOutput>(),
|
||||
Parameters::get<TypeTag, Parameters::EnableEsmry>())
|
||||
, simulator_(simulator)
|
||||
{
|
||||
#if HAVE_MPI
|
||||
@ -404,7 +399,7 @@ public:
|
||||
auto floresn = this->outputModule_->getFloresn();
|
||||
|
||||
// data::Solution localCellData = {};
|
||||
if (! isSubStep || Parameters::get<TypeTag, Properties::EnableWriteAllSolutions>()) {
|
||||
if (! isSubStep || Parameters::get<TypeTag, Parameters::EnableWriteAllSolutions>()) {
|
||||
|
||||
auto rstep = timer.reportStepNum();
|
||||
|
||||
@ -460,7 +455,7 @@ public:
|
||||
const Scalar curTime = simulator_.time() + simulator_.timeStepSize();
|
||||
const Scalar nextStepSize = simulator_.problem().nextTimeStepSize();
|
||||
std::optional<int> timeStepIdx;
|
||||
if (Parameters::get<TypeTag, Properties::EnableWriteAllSolutions>()) {
|
||||
if (Parameters::get<TypeTag, Parameters::EnableWriteAllSolutions>()) {
|
||||
timeStepIdx = simulator_.timeStepIndex();
|
||||
}
|
||||
this->doWriteOutput(reportStepNum, timeStepIdx, isSubStep,
|
||||
@ -474,7 +469,7 @@ public:
|
||||
this->summaryState(),
|
||||
this->simulator_.problem().thresholdPressure().getRestartVector(),
|
||||
curTime, nextStepSize,
|
||||
Parameters::get<TypeTag, Properties::EclOutputDoublePrecision>(),
|
||||
Parameters::get<TypeTag, Parameters::EclOutputDoublePrecision>(),
|
||||
isFlowsn, std::move(flowsn),
|
||||
isFloresn, std::move(floresn));
|
||||
}
|
||||
@ -609,7 +604,7 @@ public:
|
||||
|
||||
private:
|
||||
static bool enableEclOutput_()
|
||||
{ return Parameters::get<TypeTag, Properties::EnableEclOutput>(); }
|
||||
{ return Parameters::get<TypeTag, Parameters::EnableEclOutput>(); }
|
||||
|
||||
const EclipseState& eclState() const
|
||||
{ return simulator_.vanguard().eclState(); }
|
||||
@ -642,7 +637,7 @@ private:
|
||||
countLocalInteriorCellsGridView(gridView);
|
||||
this->outputModule_->
|
||||
allocBuffers(num_interior, reportStepNum,
|
||||
isSubStep && !Parameters::get<TypeTag, Properties::EnableWriteAllSolutions>(), log, /*isRestart*/ false);
|
||||
isSubStep && !Parameters::get<TypeTag, Parameters::EnableWriteAllSolutions>(), log, /*isRestart*/ false);
|
||||
|
||||
ElementContext elemCtx(simulator_);
|
||||
|
||||
|
@ -216,17 +216,17 @@ public:
|
||||
|
||||
VtkTracerModule<TypeTag>::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Properties::EnableWriteAllSolutions>
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableWriteAllSolutions>
|
||||
("Write all solutions to disk instead of only the ones for the "
|
||||
"report steps");
|
||||
Parameters::registerParam<TypeTag, Properties::EnableEclOutput>
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableEclOutput>
|
||||
("Write binary output which is compatible with the commercial "
|
||||
"Eclipse simulator");
|
||||
#if HAVE_DAMARIS
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableDamarisOutput>
|
||||
("Write a specific variable using Damaris in a separate core");
|
||||
#endif
|
||||
Parameters::registerParam<TypeTag, Properties::EclOutputDoublePrecision>
|
||||
Parameters::registerParam<TypeTag, Parameters::EclOutputDoublePrecision>
|
||||
("Tell the output writer to use double precision. Useful for 'perfect' restarts");
|
||||
Parameters::registerParam<TypeTag, Parameters::RestartWritingInterval>
|
||||
("The frequencies of which time steps are serialized to disk");
|
||||
@ -313,7 +313,7 @@ public:
|
||||
#endif
|
||||
enableDriftCompensation_ = Parameters::get<TypeTag, Parameters::EnableDriftCompensation>();
|
||||
|
||||
enableEclOutput_ = Parameters::get<TypeTag, Properties::EnableEclOutput>();
|
||||
enableEclOutput_ = Parameters::get<TypeTag, Parameters::EnableEclOutput>();
|
||||
|
||||
this->enableTuning_ = Parameters::get<TypeTag, Parameters::EnableTuning>();
|
||||
this->initialTimeStepSize_ = Parameters::get<TypeTag, Parameters::InitialTimeStepSize>();
|
||||
@ -780,7 +780,7 @@ public:
|
||||
OPM_TIMEBLOCK(problemWriteOutput);
|
||||
// use the generic code to prepare the output fields and to
|
||||
// write the desired VTK files.
|
||||
if (Parameters::get<TypeTag, Properties::EnableWriteAllSolutions>() ||
|
||||
if (Parameters::get<TypeTag, Parameters::EnableWriteAllSolutions>() ||
|
||||
this->simulator().episodeWillBeOver()) {
|
||||
ParentType::writeOutput(verbose);
|
||||
}
|
||||
|
@ -198,36 +198,11 @@ template<class TypeTag>
|
||||
struct EnableDispersion<TypeTag, TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// only write the solutions for the report steps to disk
|
||||
template<class TypeTag>
|
||||
struct EnableWriteAllSolutions<TypeTag, TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// disable API tracking
|
||||
template<class TypeTag>
|
||||
struct EnableApiTracking<TypeTag, TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// ... but enable the ECL output by default
|
||||
template<class TypeTag>
|
||||
struct EnableEclOutput<TypeTag,TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
// If available, write the ECL output in a non-blocking manner
|
||||
template<class TypeTag>
|
||||
struct EnableAsyncEclOutput<TypeTag, TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
// Write ESMRY file for fast loading of summary data
|
||||
template<class TypeTag>
|
||||
struct EnableEsmry<TypeTag, TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// By default, use single precision for the ECL formated results
|
||||
template<class TypeTag>
|
||||
struct EclOutputDoublePrecision<TypeTag, TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// Use the "velocity module" which uses the Eclipse "NEWTRAN" transmissibilities
|
||||
template<class TypeTag>
|
||||
struct FluxModule<TypeTag, TTag::FlowBaseProblem>
|
||||
@ -371,6 +346,16 @@ struct DamarisLimitVariables<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
{ static constexpr auto value = ""; };
|
||||
#endif
|
||||
|
||||
// By default, use single precision for the ECL formated results
|
||||
template<class TypeTag>
|
||||
struct EclOutputDoublePrecision<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// If available, write the ECL output in a non-blocking manner
|
||||
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>
|
||||
@ -383,6 +368,16 @@ template<class TypeTag>
|
||||
struct EnableDriftCompensation<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
// enable the ECL output by default
|
||||
template<class TypeTag>
|
||||
struct EnableEclOutput<TypeTag,Properties::TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
// Write ESMRY file for fast loading of summary data
|
||||
template<class TypeTag>
|
||||
struct EnableEsmry<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// Enable gravity
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
@ -404,6 +399,11 @@ template<class TypeTag>
|
||||
struct EnableVtkOutput<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// only write the solutions for the report steps to disk
|
||||
template<class TypeTag>
|
||||
struct EnableWriteAllSolutions<TypeTag, Properties::TTag::FlowBaseProblem>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
// The default for the end time of the simulation [s]
|
||||
//
|
||||
// By default, stop it after the universe will probably have stopped
|
||||
|
Loading…
Reference in New Issue
Block a user