mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: FlowMain parameters moved to Opm::Parameters namespace
This commit is contained in:
parent
4fc1487a9d
commit
466e26d330
@ -41,37 +41,32 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace Opm::Properties {
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct EnableDryRun {
|
struct EnableDryRun { using type = Properties::UndefinedProperty; };
|
||||||
using type = UndefinedProperty;
|
|
||||||
};
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct OutputInterval {
|
struct OutputInterval { using type = Properties::UndefinedProperty; };
|
||||||
using type = UndefinedProperty;
|
|
||||||
};
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct EnableLoggingFalloutWarning {
|
struct EnableLoggingFalloutWarning { using type = Properties::UndefinedProperty; };
|
||||||
using type = UndefinedProperty;
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: enumeration parameters. we use strings for now.
|
// TODO: enumeration parameters. we use strings for now.
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableDryRun<TypeTag, TTag::FlowProblem> {
|
struct EnableDryRun<TypeTag, Properties::TTag::FlowProblem>
|
||||||
static constexpr auto value = "auto";
|
{ static constexpr auto value = "auto"; };
|
||||||
};
|
|
||||||
// Do not merge parallel output files or warn about them
|
// Do not merge parallel output files or warn about them
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableLoggingFalloutWarning<TypeTag, TTag::FlowProblem> {
|
struct EnableLoggingFalloutWarning<TypeTag, Properties::TTag::FlowProblem>
|
||||||
static constexpr bool value = false;
|
{ static constexpr bool value = false; };
|
||||||
};
|
|
||||||
template<class TypeTag>
|
|
||||||
struct OutputInterval<TypeTag, TTag::FlowProblem> {
|
|
||||||
static constexpr int value = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Opm::Properties
|
template<class TypeTag>
|
||||||
|
struct OutputInterval<TypeTag, Properties::TTag::FlowProblem>
|
||||||
|
{ static constexpr int value = 1; };
|
||||||
|
|
||||||
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
@ -114,11 +109,11 @@ namespace Opm {
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
// register the flow specific parameters
|
// register the flow specific parameters
|
||||||
Parameters::registerParam<TypeTag, Properties::EnableDryRun>
|
Parameters::registerParam<TypeTag, Parameters::EnableDryRun>
|
||||||
("Specify if the simulation ought to be actually run, or just pretended to be");
|
("Specify if the simulation ought to be actually run, or just pretended to be");
|
||||||
Parameters::registerParam<TypeTag, Properties::OutputInterval>
|
Parameters::registerParam<TypeTag, Parameters::OutputInterval>
|
||||||
("Specify the number of report steps between two consecutive writes of restart data");
|
("Specify the number of report steps between two consecutive writes of restart data");
|
||||||
Parameters::registerParam<TypeTag, Properties::EnableLoggingFalloutWarning>
|
Parameters::registerParam<TypeTag, Parameters::EnableLoggingFalloutWarning>
|
||||||
("Developer option to see whether logging was on non-root processors. "
|
("Developer option to see whether logging was on non-root processors. "
|
||||||
"In that case it will be appended to the *.DBG or *.PRT files");
|
"In that case it will be appended to the *.DBG or *.PRT files");
|
||||||
|
|
||||||
@ -421,7 +416,7 @@ namespace Opm {
|
|||||||
|
|
||||||
detail::mergeParallelLogFiles(eclState().getIOConfig().getOutputDir(),
|
detail::mergeParallelLogFiles(eclState().getIOConfig().getOutputDir(),
|
||||||
Parameters::get<TypeTag, Properties::EclDeckFileName>(),
|
Parameters::get<TypeTag, Properties::EclDeckFileName>(),
|
||||||
Parameters::get<TypeTag, Properties::EnableLoggingFalloutWarning>());
|
Parameters::get<TypeTag, Parameters::EnableLoggingFalloutWarning>());
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupModelSimulator()
|
void setupModelSimulator()
|
||||||
@ -432,7 +427,7 @@ namespace Opm {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Possible to force initialization only behavior (NOSIM).
|
// Possible to force initialization only behavior (NOSIM).
|
||||||
const std::string& dryRunString = Parameters::get<TypeTag, Properties::EnableDryRun>();
|
const std::string& dryRunString = Parameters::get<TypeTag, Parameters::EnableDryRun>();
|
||||||
if (dryRunString != "" && dryRunString != "auto") {
|
if (dryRunString != "" && dryRunString != "auto") {
|
||||||
bool yesno;
|
bool yesno;
|
||||||
if (dryRunString == "true"
|
if (dryRunString == "true"
|
||||||
|
@ -417,7 +417,7 @@ private:
|
|||||||
outputDir,
|
outputDir,
|
||||||
Parameters::get<PreTypeTag, Properties::OutputMode>(),
|
Parameters::get<PreTypeTag, Properties::OutputMode>(),
|
||||||
!Parameters::get<PreTypeTag, Parameters::SchedRestart>(),
|
!Parameters::get<PreTypeTag, Parameters::SchedRestart>(),
|
||||||
Parameters::get<PreTypeTag, Properties::EnableLoggingFalloutWarning>(),
|
Parameters::get<PreTypeTag, Parameters::EnableLoggingFalloutWarning>(),
|
||||||
Parameters::get<PreTypeTag, Parameters::ParsingStrictness>(),
|
Parameters::get<PreTypeTag, Parameters::ParsingStrictness>(),
|
||||||
Parameters::get<PreTypeTag, Parameters::InputSkipMode>(),
|
Parameters::get<PreTypeTag, Parameters::InputSkipMode>(),
|
||||||
getNumThreads<PreTypeTag>(),
|
getNumThreads<PreTypeTag>(),
|
||||||
|
Loading…
Reference in New Issue
Block a user