diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index 41552add2..a48bac1c6 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -437,9 +437,9 @@ list (APPEND PUBLIC_HEADER_FILES ebos/vtkecltracermodule.hh opm/simulators/flow/countGlobalCells.hpp opm/simulators/flow/priVarsPacking.hpp - opm/simulators/flow/BlackoilModelEbos.hpp - opm/simulators/flow/BlackoilModelEbosNldd.hpp - opm/simulators/flow/BlackoilModelParametersEbos.hpp + opm/simulators/flow/BlackoilModel.hpp + opm/simulators/flow/BlackoilModelNldd.hpp + opm/simulators/flow/BlackoilModelParameters.hpp opm/simulators/flow/Banners.hpp opm/simulators/flow/ConvergenceOutputConfiguration.hpp opm/simulators/flow/EclActionHandler.hpp diff --git a/ebos/ebos.hh b/ebos/ebos.hh index b4a6cb679..385690622 100644 --- a/ebos/ebos.hh +++ b/ebos/ebos.hh @@ -193,7 +193,7 @@ public: { ParentType::registerParameters(); - BlackoilModelParametersEbos::registerParameters(); + BlackoilModelParameters::registerParameters(); EWOMS_REGISTER_PARAM(TypeTag, bool, EnableTerminalOutput, "Do *NOT* use!"); EWOMS_HIDE_PARAM(TypeTag, DbhpMaxRel); EWOMS_HIDE_PARAM(TypeTag, DwellFractionMax); diff --git a/ebos/eclbasevanguard.hh b/ebos/eclbasevanguard.hh index 36c1b7706..03a164b54 100644 --- a/ebos/eclbasevanguard.hh +++ b/ebos/eclbasevanguard.hh @@ -40,9 +40,7 @@ #include #include -#include - - +#include #include #include diff --git a/opm/simulators/flow/BlackoilModelEbos.hpp b/opm/simulators/flow/BlackoilModel.hpp similarity index 98% rename from opm/simulators/flow/BlackoilModelEbos.hpp rename to opm/simulators/flow/BlackoilModel.hpp index 984d9138a..c9dec7302 100644 --- a/opm/simulators/flow/BlackoilModelEbos.hpp +++ b/opm/simulators/flow/BlackoilModel.hpp @@ -21,8 +21,8 @@ along with OPM. If not, see . */ -#ifndef OPM_BLACKOILMODELEBOS_HEADER_INCLUDED -#define OPM_BLACKOILMODELEBOS_HEADER_INCLUDED +#ifndef OPM_BLACKOILMODEL_HEADER_INCLUDED +#define OPM_BLACKOILMODEL_HEADER_INCLUDED #include @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -161,11 +161,11 @@ namespace Opm { /// uses an industry-standard TPFA discretization with per-phase /// upwind weighting of mobilities. template - class BlackoilModelEbos + class BlackoilModel { public: // --------- Types and enums --------- - using ModelParameters = BlackoilModelParametersEbos; + using ModelParameters = BlackoilModelParameters; using Simulator = GetPropType; using Grid = GetPropType; @@ -225,10 +225,10 @@ namespace Opm { /// \param[in] linsolver linear solver /// \param[in] eclState eclipse state /// \param[in] terminal_output request output to cout/cerr - BlackoilModelEbos(Simulator& ebosSimulator, - const ModelParameters& param, - BlackoilWellModel& well_model, - const bool terminal_output) + BlackoilModel(Simulator& ebosSimulator, + const ModelParameters& param, + BlackoilWellModel& well_model, + const bool terminal_output) : ebosSimulator_(ebosSimulator) , grid_(ebosSimulator_.vanguard().grid()) , phaseUsage_(phaseUsageFromDeck(eclState())) @@ -251,7 +251,7 @@ namespace Opm { if (terminal_output) { OpmLog::info("Using Non-Linear Domain Decomposition solver (nldd)."); } - nlddSolver_ = std::make_unique>(*this); + nlddSolver_ = std::make_unique>(*this); } else if (param_.nonlinear_solver_ == "newton") { if (terminal_output) { OpmLog::info("Using Newton nonlinear solver."); @@ -818,7 +818,7 @@ namespace Opm { B_avg, R_sum, maxCoeff, maxCoeffCell); } - OPM_END_PARALLEL_TRY_CATCH("BlackoilModelEbos::localConvergenceData() failed: ", grid_.comm()); + OPM_END_PARALLEL_TRY_CATCH("BlackoilModel::localConvergenceData() failed: ", grid_.comm()); // compute local average in terms of global number of elements const int bSize = B_avg.size(); @@ -872,7 +872,7 @@ namespace Opm { } } - OPM_END_PARALLEL_TRY_CATCH("BlackoilModelEbos::ComputeCnvError() failed: ", grid_.comm()); + OPM_END_PARALLEL_TRY_CATCH("BlackoilModel::ComputeCnvError() failed: ", grid_.comm()); return grid_.comm().sum(errorPV); } @@ -881,7 +881,7 @@ namespace Opm { void updateTUNING(const Tuning& tuning) { param_.tolerance_mb_ = tuning.XXXMBE; if ( terminal_output_ ) { - OpmLog::debug(fmt::format("Setting BlackoilModelEbos mass balance limit (XXXMBE) to {:.2e}", tuning.XXXMBE)); + OpmLog::debug(fmt::format("Setting BlackoilModel mass balance limit (XXXMBE) to {:.2e}", tuning.XXXMBE)); } } @@ -1125,7 +1125,7 @@ namespace Opm { std::vector convergence_reports_; ComponentName compNames_{}; - std::unique_ptr> nlddSolver_; //!< Non-linear DD solver + std::unique_ptr> nlddSolver_; //!< Non-linear DD solver public: /// return the StandardWells object @@ -1285,4 +1285,4 @@ namespace Opm { }; } // namespace Opm -#endif // OPM_BLACKOILMODELBASE_IMPL_HEADER_INCLUDED +#endif // OPM_BLACKOILMODEL_HEADER_INCLUDED diff --git a/opm/simulators/flow/BlackoilModelEbosNldd.hpp b/opm/simulators/flow/BlackoilModelNldd.hpp similarity index 98% rename from opm/simulators/flow/BlackoilModelEbosNldd.hpp rename to opm/simulators/flow/BlackoilModelNldd.hpp index b0ee88d09..b1fe4491f 100644 --- a/opm/simulators/flow/BlackoilModelEbosNldd.hpp +++ b/opm/simulators/flow/BlackoilModelNldd.hpp @@ -21,8 +21,8 @@ along with OPM. If not, see . */ -#ifndef OPM_BLACKOILMODELEBOS_NLDD_HEADER_INCLUDED -#define OPM_BLACKOILMODELEBOS_NLDD_HEADER_INCLUDED +#ifndef OPM_BLACKOILMODEL_NLDD_HEADER_INCLUDED +#define OPM_BLACKOILMODEL_NLDD_HEADER_INCLUDED #include @@ -71,24 +71,24 @@ namespace Opm { -template class BlackoilModelEbos; +template class BlackoilModel; /// A NLDD implementation for three-phase black oil. template -class BlackoilModelEbosNldd { +class BlackoilModelNldd { public: using ElementContext = GetPropType; using FluidSystem = GetPropType; using Grid = GetPropType; using Indices = GetPropType; - using ModelParameters = BlackoilModelParametersEbos; + using ModelParameters = BlackoilModelParameters; using Scalar = GetPropType; using SolutionVector = GetPropType; - using BVector = typename BlackoilModelEbos::BVector; + using BVector = typename BlackoilModel::BVector; using Domain = SubDomain; using ISTLSolverType = ISTLSolverEbos; - using Mat = typename BlackoilModelEbos::Mat; + using Mat = typename BlackoilModel::Mat; static constexpr int numEq = Indices::numEq; @@ -96,7 +96,7 @@ public: //! \param model BlackOil model to solve for //! \param param param Model parameters //! \param compNames Names of the solution components - BlackoilModelEbosNldd(BlackoilModelEbos& model) + BlackoilModelNldd(BlackoilModel& model) : model_(model), rank_(model_.ebosSimulator().vanguard().grid().comm().rank()) { // Create partitions. @@ -958,7 +958,7 @@ private: return p; } - BlackoilModelEbos& model_; //!< Reference to model + BlackoilModel& model_; //!< Reference to model std::vector domains_; //!< Vector of subdomains std::vector> domain_matrices_; //!< Vector of matrix operator for each subdomain std::vector domain_linsolvers_; //!< Vector of linear solvers for each domain @@ -968,4 +968,4 @@ private: } // namespace Opm -#endif // OPM_BLACKOILMODELEBOS_NLDD_HEADER_INCLUDED +#endif // OPM_BLACKOILMODEL_NLDD_HEADER_INCLUDED diff --git a/opm/simulators/flow/BlackoilModelParametersEbos.hpp b/opm/simulators/flow/BlackoilModelParameters.hpp similarity index 99% rename from opm/simulators/flow/BlackoilModelParametersEbos.hpp rename to opm/simulators/flow/BlackoilModelParameters.hpp index 97dfb0a40..e90368e07 100644 --- a/opm/simulators/flow/BlackoilModelParametersEbos.hpp +++ b/opm/simulators/flow/BlackoilModelParameters.hpp @@ -17,8 +17,8 @@ along with OPM. If not, see . */ -#ifndef OPM_BLACKOILMODELPARAMETERS_EBOS_HEADER_INCLUDED -#define OPM_BLACKOILMODELPARAMETERS_EBOS_HEADER_INCLUDED +#ifndef OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED +#define OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED #include @@ -463,7 +463,7 @@ namespace Opm { /// Solver parameters for the BlackoilModel. template - struct BlackoilModelParametersEbos + struct BlackoilModelParameters { private: using Scalar = GetPropType; @@ -595,7 +595,7 @@ namespace Opm bool write_partitions_{false}; /// Construct from user parameters or defaults. - BlackoilModelParametersEbos() + BlackoilModelParameters() { dbhp_max_rel_= EWOMS_GET_PARAM(TypeTag, Scalar, DbhpMaxRel); dwell_fraction_max_ = EWOMS_GET_PARAM(TypeTag, Scalar, DwellFractionMax); @@ -715,4 +715,4 @@ namespace Opm }; } // namespace Opm -#endif // OPM_BLACKOILMODELPARAMETERS_EBOS_HEADER_INCLUDED +#endif // OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED diff --git a/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp b/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp index 549a8ee47..fb5469157 100644 --- a/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp +++ b/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -170,7 +170,7 @@ public: typedef BlackOilPolymerModule PolymerModule; typedef BlackOilMICPModule MICPModule; - typedef BlackoilModelEbos Model; + using Model = BlackoilModel; typedef NonlinearSolverEbos Solver; typedef typename Model::ModelParameters ModelParameters; typedef typename Solver::SolverParameters SolverParameters; diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index 6d6653f96..f27adc057 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/opm/simulators/wells/BlackoilWellModel.hpp b/opm/simulators/wells/BlackoilWellModel.hpp index bb3490451..de72dd055 100644 --- a/opm/simulators/wells/BlackoilWellModel.hpp +++ b/opm/simulators/wells/BlackoilWellModel.hpp @@ -96,7 +96,7 @@ namespace Opm { { public: // --------- Types --------- - typedef BlackoilModelParametersEbos ModelParameters; + using ModelParameters = BlackoilModelParameters; using Grid = GetPropType; using EquilGrid = GetPropType; diff --git a/opm/simulators/wells/WellInterface.hpp b/opm/simulators/wells/WellInterface.hpp index 1d0e48711..c695f10b1 100644 --- a/opm/simulators/wells/WellInterface.hpp +++ b/opm/simulators/wells/WellInterface.hpp @@ -39,7 +39,7 @@ namespace Opm { #include -#include +#include #include #include @@ -78,7 +78,7 @@ class WellInterface : public WellInterfaceIndices, GetPropType>; public: - using ModelParameters = BlackoilModelParametersEbos; + using ModelParameters = BlackoilModelParameters; using Grid = GetPropType; using Simulator = GetPropType; diff --git a/tests/test_equil.cc b/tests/test_equil.cc index d7ef3e4e0..972b3f048 100644 --- a/tests/test_equil.cc +++ b/tests/test_equil.cc @@ -39,7 +39,7 @@ #include #include -#include +#include #include #if HAVE_DUNE_FEM @@ -233,7 +233,7 @@ struct EquilFixture { Dune::MPIHelper::instance(argc, argv); #endif Opm::EclGenericVanguard::setCommunication(std::make_unique()); - Opm::BlackoilModelParametersEbos::registerParameters(); + Opm::BlackoilModelParameters::registerParameters(); Opm::AdaptiveTimeSteppingEbos::registerParameters(); Opm::Parameters::registerParam("EnableTerminalOutput", "EnableTerminalOutput", diff --git a/tests/test_glift1.cpp b/tests/test_glift1.cpp index e0355c966..63d2c725c 100644 --- a/tests/test_glift1.cpp +++ b/tests/test_glift1.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tests/test_wellmodel.cpp b/tests/test_wellmodel.cpp index e53b0738e..9548baf26 100644 --- a/tests/test_wellmodel.cpp +++ b/tests/test_wellmodel.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include @@ -112,7 +112,7 @@ BOOST_AUTO_TEST_CASE(TestStandardWellInput) { const auto& wells_ecl = setup_test.schedule->getWells(setup_test.current_timestep); BOOST_CHECK_EQUAL( wells_ecl.size(), 2); const Opm::Well& well = wells_ecl[1]; - const Opm::BlackoilModelParametersEbos param; + const Opm::BlackoilModelParameters param; // For the conversion between the surface volume rate and resrevoir voidage rate typedef Opm::BlackOilFluidSystem FluidSystem; @@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(TestBehavoir) { { const int nw = wells_ecl.size(); - const Opm::BlackoilModelParametersEbos param; + const Opm::BlackoilModelParameters param; for (int w = 0; w < nw; ++w) { // For the conversion between the surface volume rate and resrevoir voidage rate