BlackoilWellModel: move initialization of terminal_output_ to the generic class

it is now possible since parameter system does not need typetag
This commit is contained in:
Arne Morten Kvarving 2025-01-06 15:07:10 +01:00
parent 61ff8a85fd
commit 7c5f9c59b3
4 changed files with 10 additions and 9 deletions

View File

@ -80,12 +80,6 @@
#include <opm/simulators/utils/DeferredLogger.hpp>
namespace Opm::Parameters {
struct EnableTerminalOutput { static constexpr bool value = true; };
} // namespace Opm::Parameters
namespace Opm {
#if COMPILE_GPU_BRIDGE

View File

@ -49,6 +49,8 @@
#include <opm/input/eclipse/Units/Units.hpp>
#include <opm/models/utils/parametersystem.hpp>
#include <opm/simulators/utils/DeferredLogger.hpp>
#include <opm/simulators/wells/BlackoilWellModelConstraints.hpp>
#include <opm/simulators/wells/BlackoilWellModelGuideRates.hpp>
@ -93,6 +95,8 @@ BlackoilWellModelGeneric(Schedule& schedule,
, eclState_(eclState)
, comm_(comm)
, phase_usage_(phase_usage)
, terminal_output_(comm_.rank() == 0 &&
Parameters::Get<Parameters::EnableTerminalOutput>())
, wbpCalculationService_ { eclState.gridDims(), comm_ }
, guideRate_(schedule)
, active_wgstate_(phase_usage)

View File

@ -75,6 +75,12 @@ namespace Opm { namespace data {
struct NodeData;
}} // namespace Opm::data
namespace Opm::Parameters {
struct EnableTerminalOutput { static constexpr bool value = true; };
} // namespace Opm::Parameters
namespace Opm {
/// Class for handling the blackoil well model.

View File

@ -80,9 +80,6 @@ namespace Opm {
simulator.gridView().comm())
, simulator_(simulator)
{
this->terminal_output_ = (simulator.gridView().comm().rank() == 0)
&& Parameters::Get<Parameters::EnableTerminalOutput>();
local_num_cells_ = simulator_.gridView().size(0);
// Number of cells the global grid view