changed: move the EnableAsyncVtkOutput parameter to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving 2024-06-28 12:16:28 +02:00
parent db9ac62d9d
commit d1f3411a66
4 changed files with 21 additions and 20 deletions

View File

@ -237,12 +237,6 @@ struct MinTimeStepSize<TypeTag, TTag::FvBaseDiscretization>
static constexpr type value = 0.0;
};
//! 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, TTag::FvBaseDiscretization> { static constexpr bool value = true; };
//! Set the format of the VTK output to ASCII by default
template<class TypeTag>
struct VtkOutputFormat<TypeTag, TTag::FvBaseDiscretization> { static constexpr int value = Dune::VTK::ascii; };
@ -344,6 +338,13 @@ template<class TypeTag>
struct EnableVtkOutput<TypeTag, Properties::TTag::FvBaseDiscretization>
{ static constexpr bool value = true; };
//! 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; };
} // namespace Opm::Parameters
namespace Opm {

View File

@ -61,6 +61,18 @@ struct OutputDir { using type = Properties::UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
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; };
} // namespace Opm::Parameters
#endif

View File

@ -142,7 +142,7 @@ public:
if (enableVtkOutput_()) {
bool asyncVtkOutput =
simulator_.gridView().comm().size() == 1 &&
Parameters::get<TypeTag, Properties::EnableAsyncVtkOutput>();
Parameters::get<TypeTag, Parameters::EnableAsyncVtkOutput>();
// asynchonous VTK output currently does not work in conjunction with grid
// adaptivity because the async-IO code assumes that the grid stays
@ -176,7 +176,7 @@ public:
Parameters::registerParam<TypeTag, Properties::MaxTimeStepDivisions>
("The maximum number of divisions by two of the timestep size "
"before the simulation bails out");
Parameters::registerParam<TypeTag, Properties::EnableAsyncVtkOutput>
Parameters::registerParam<TypeTag, Parameters::EnableAsyncVtkOutput>
("Dispatch a separate thread to write the VTK output");
Parameters::registerParam<TypeTag, Properties::ContinueOnConvergenceError>
("Continue with a non-converged solution instead of giving up "

View File

@ -199,18 +199,6 @@ struct UseLinearizationLock { using type = UndefinedProperty; };
// high-level simulation control
/*!
* \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 = UndefinedProperty; };
/*!
* \brief Specify the format the VTK output is written to disk
*