mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move EnableAsyncVtkOutput to TypeTag-free parameter system
This commit is contained in:
parent
4905289325
commit
00c0304fce
@ -291,13 +291,6 @@ template<class TypeTag>
|
|||||||
struct ContinueOnConvergenceError<TypeTag, Properties::TTag::FvBaseDiscretization>
|
struct ContinueOnConvergenceError<TypeTag, Properties::TTag::FvBaseDiscretization>
|
||||||
{ static constexpr bool value = false; };
|
{ static constexpr bool value = false; };
|
||||||
|
|
||||||
//! By default, write the VTK output to asynchronously to disk
|
|
||||||
//!
|
|
||||||
//! This has only an effect if EnableVtkOutput is true
|
|
||||||
template<class TypeTag>
|
|
||||||
struct EnableAsyncVtkOutput<TypeTag, Properties::TTag::FvBaseDiscretization>
|
|
||||||
{ static constexpr bool value = true; };
|
|
||||||
|
|
||||||
//! Disable grid adaptation by default
|
//! Disable grid adaptation by default
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EnableGridAdaptation<TypeTag, Properties::TTag::FvBaseDiscretization>
|
struct EnableGridAdaptation<TypeTag, Properties::TTag::FvBaseDiscretization>
|
||||||
|
@ -37,6 +37,17 @@ namespace Opm::Parameters {
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct ThreadsPerProcess { using type = Properties::UndefinedProperty; };
|
struct ThreadsPerProcess { using type = Properties::UndefinedProperty; };
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Determines if the VTK output is written to disk asynchronously
|
||||||
|
*
|
||||||
|
* I.e. written to disk using a separate thread. This has only an effect if
|
||||||
|
* EnableVtkOutput is true and if the simulation is run sequentially. The reasons for
|
||||||
|
* this not being used for MPI-parallel simulations are that Dune's VTK output code does
|
||||||
|
* not support multi-threaded multi-process VTK output and even if it would, the result
|
||||||
|
* would be slower than when using synchronous output.
|
||||||
|
*/
|
||||||
|
struct EnableAsyncVtkOutput { static constexpr bool value = true; };
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Switch to enable or disable grid adaptation
|
* \brief Switch to enable or disable grid adaptation
|
||||||
*
|
*
|
||||||
@ -61,18 +72,6 @@ struct OutputDir { using type = Properties::UndefinedProperty; };
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct EnableVtkOutput { using type = Properties::UndefinedProperty; };
|
struct EnableVtkOutput { using type = Properties::UndefinedProperty; };
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Determines if the VTK output is written to disk asynchronously
|
|
||||||
*
|
|
||||||
* I.e. written to disk using a separate thread. This has only an effect if
|
|
||||||
* EnableVtkOutput is true and if the simulation is run sequentially. The reasons for
|
|
||||||
* this not being used for MPI-parallel simulations are that Dune's VTK output code does
|
|
||||||
* not support multi-threaded multi-process VTK output and even if it would, the result
|
|
||||||
* would be slower than when using synchronous output.
|
|
||||||
*/
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
|
||||||
struct EnableAsyncVtkOutput { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Specify the maximum size of a time integration [s].
|
* \brief Specify the maximum size of a time integration [s].
|
||||||
*
|
*
|
||||||
|
@ -142,7 +142,7 @@ public:
|
|||||||
if (enableVtkOutput_()) {
|
if (enableVtkOutput_()) {
|
||||||
bool asyncVtkOutput =
|
bool asyncVtkOutput =
|
||||||
simulator_.gridView().comm().size() == 1 &&
|
simulator_.gridView().comm().size() == 1 &&
|
||||||
Parameters::get<TypeTag, Parameters::EnableAsyncVtkOutput>();
|
Parameters::Get<Parameters::EnableAsyncVtkOutput>();
|
||||||
|
|
||||||
// asynchonous VTK output currently does not work in conjunction with grid
|
// asynchonous VTK output currently does not work in conjunction with grid
|
||||||
// adaptivity because the async-IO code assumes that the grid stays
|
// adaptivity because the async-IO code assumes that the grid stays
|
||||||
@ -176,7 +176,7 @@ public:
|
|||||||
Parameters::registerParam<TypeTag, Parameters::MaxTimeStepDivisions>
|
Parameters::registerParam<TypeTag, Parameters::MaxTimeStepDivisions>
|
||||||
("The maximum number of divisions by two of the timestep size "
|
("The maximum number of divisions by two of the timestep size "
|
||||||
"before the simulation bails out");
|
"before the simulation bails out");
|
||||||
Parameters::registerParam<TypeTag, Parameters::EnableAsyncVtkOutput>
|
Parameters::Register<Parameters::EnableAsyncVtkOutput>
|
||||||
("Dispatch a separate thread to write the VTK output");
|
("Dispatch a separate thread to write the VTK output");
|
||||||
Parameters::registerParam<TypeTag, Parameters::ContinueOnConvergenceError>
|
Parameters::registerParam<TypeTag, Parameters::ContinueOnConvergenceError>
|
||||||
("Continue with a non-converged solution instead of giving up "
|
("Continue with a non-converged solution instead of giving up "
|
||||||
|
Loading…
Reference in New Issue
Block a user