mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 01:07:24 -06:00
move EnableGridAdaptation to TypeTag-free parameter system
This commit is contained in:
parent
f6abb4671e
commit
805e0a4bb7
@ -291,11 +291,6 @@ template<class TypeTag>
|
||||
struct ContinueOnConvergenceError<TypeTag, Properties::TTag::FvBaseDiscretization>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
//! Disable grid adaptation by default
|
||||
template<class TypeTag>
|
||||
struct EnableGridAdaptation<TypeTag, Properties::TTag::FvBaseDiscretization>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
//! by default, disable the intensive quantity cache. If the intensive quantities are
|
||||
//! relatively cheap to calculate, the cache basically does not yield any performance
|
||||
//! impact because of the intensive quantity cache will cause additional pressure on the
|
||||
@ -484,7 +479,7 @@ public:
|
||||
, newtonMethod_(simulator)
|
||||
, localLinearizer_(ThreadManager::maxThreads())
|
||||
, linearizer_(new Linearizer())
|
||||
, enableGridAdaptation_(Parameters::get<TypeTag, Parameters::EnableGridAdaptation>() )
|
||||
, enableGridAdaptation_(Parameters::Get<Parameters::EnableGridAdaptation>() )
|
||||
, enableIntensiveQuantityCache_(Parameters::get<TypeTag, Parameters::EnableIntensiveQuantityCache>())
|
||||
, enableStorageCache_(Parameters::get<TypeTag, Parameters::EnableStorageCache>())
|
||||
, enableThermodynamicHints_(Parameters::get<TypeTag, Parameters::EnableThermodynamicHints>())
|
||||
@ -541,7 +536,7 @@ public:
|
||||
// register runtime parameters of the output modules
|
||||
VtkPrimaryVarsModule<TypeTag>::registerParameters();
|
||||
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableGridAdaptation>
|
||||
Parameters::Register<Parameters::EnableGridAdaptation>
|
||||
("Enable adaptive grid refinement/coarsening");
|
||||
Parameters::registerParam<TypeTag, Parameters::EnableVtkOutput>
|
||||
("Global switch for turning on writing VTK files");
|
||||
|
@ -34,9 +34,6 @@
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! \brief Number of threads per process.
|
||||
struct ThreadsPerProcess { static constexpr int value = 1; };
|
||||
|
||||
/*!
|
||||
* \brief Determines if the VTK output is written to disk asynchronously
|
||||
*
|
||||
@ -54,8 +51,10 @@ struct EnableAsyncVtkOutput { static constexpr bool value = true; };
|
||||
* Currently grid adaptation requires the presence of the dune-FEM module. If it is not
|
||||
* available and grid adaptation is enabled, an exception is thrown.
|
||||
*/
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableGridAdaptation { using type = Properties::UndefinedProperty; };
|
||||
struct EnableGridAdaptation { static constexpr bool value = false; };
|
||||
|
||||
//! \brief Number of threads per process.
|
||||
struct ThreadsPerProcess { static constexpr int value = 1; };
|
||||
|
||||
/*!
|
||||
* \brief The directory to which simulation output ought to be written to.
|
||||
|
@ -147,7 +147,7 @@ public:
|
||||
// asynchonous VTK output currently does not work in conjunction with grid
|
||||
// adaptivity because the async-IO code assumes that the grid stays
|
||||
// constant. complain about that case.
|
||||
bool enableGridAdaptation = Parameters::get<TypeTag, Parameters::EnableGridAdaptation>();
|
||||
bool enableGridAdaptation = Parameters::Get<Parameters::EnableGridAdaptation>();
|
||||
if (asyncVtkOutput && enableGridAdaptation)
|
||||
throw std::runtime_error("Asynchronous VTK output currently cannot be used "
|
||||
"at the same time as grid adaptivity");
|
||||
|
Loading…
Reference in New Issue
Block a user