Merge pull request #5142 from akva2/blackoilmodel_remove_ebos

BlackoilModel: remove Ebos from class names
This commit is contained in:
Bård Skaflestad 2024-02-01 12:34:12 +01:00 committed by GitHub
commit 71b383d8e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 49 additions and 51 deletions

View File

@ -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

View File

@ -193,7 +193,7 @@ public:
{
ParentType::registerParameters();
BlackoilModelParametersEbos<TypeTag>::registerParameters();
BlackoilModelParameters<TypeTag>::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableTerminalOutput, "Do *NOT* use!");
EWOMS_HIDE_PARAM(TypeTag, DbhpMaxRel);
EWOMS_HIDE_PARAM(TypeTag, DwellFractionMax);

View File

@ -40,9 +40,7 @@
#include <opm/models/utils/parametersystem.hh>
#include <opm/models/utils/propertysystem.hh>
#include <opm/simulators/flow/BlackoilModelParametersEbos.hpp>
#include <opm/simulators/flow/BlackoilModelParameters.hpp>
#include <array>
#include <cstddef>

View File

@ -21,8 +21,8 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_BLACKOILMODELEBOS_HEADER_INCLUDED
#define OPM_BLACKOILMODELEBOS_HEADER_INCLUDED
#ifndef OPM_BLACKOILMODEL_HEADER_INCLUDED
#define OPM_BLACKOILMODEL_HEADER_INCLUDED
#include <fmt/format.h>
@ -39,8 +39,8 @@
#include <opm/simulators/aquifers/AquiferGridUtils.hpp>
#include <opm/simulators/aquifers/BlackoilAquiferModel.hpp>
#include <opm/simulators/flow/BlackoilModelEbosNldd.hpp>
#include <opm/simulators/flow/BlackoilModelParametersEbos.hpp>
#include <opm/simulators/flow/BlackoilModelNldd.hpp>
#include <opm/simulators/flow/BlackoilModelParameters.hpp>
#include <opm/simulators/flow/countGlobalCells.hpp>
#include <opm/simulators/flow/NonlinearSolverEbos.hpp>
#include <opm/simulators/flow/RSTConv.hpp>
@ -161,11 +161,11 @@ namespace Opm {
/// uses an industry-standard TPFA discretization with per-phase
/// upwind weighting of mobilities.
template <class TypeTag>
class BlackoilModelEbos
class BlackoilModel
{
public:
// --------- Types and enums ---------
using ModelParameters = BlackoilModelParametersEbos<TypeTag>;
using ModelParameters = BlackoilModelParameters<TypeTag>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using Grid = GetPropType<TypeTag, Properties::Grid>;
@ -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<TypeTag>& well_model,
const bool terminal_output)
BlackoilModel(Simulator& ebosSimulator,
const ModelParameters& param,
BlackoilWellModel<TypeTag>& 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<BlackoilModelEbosNldd<TypeTag>>(*this);
nlddSolver_ = std::make_unique<BlackoilModelNldd<TypeTag>>(*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<StepReport> convergence_reports_;
ComponentName compNames_{};
std::unique_ptr<BlackoilModelEbosNldd<TypeTag>> nlddSolver_; //!< Non-linear DD solver
std::unique_ptr<BlackoilModelNldd<TypeTag>> 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

View File

@ -21,8 +21,8 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#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 <dune/common/timer.hh>
@ -71,24 +71,24 @@
namespace Opm {
template<class TypeTag> class BlackoilModelEbos;
template<class TypeTag> class BlackoilModel;
/// A NLDD implementation for three-phase black oil.
template <class TypeTag>
class BlackoilModelEbosNldd {
class BlackoilModelNldd {
public:
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using Grid = GetPropType<TypeTag, Properties::Grid>;
using Indices = GetPropType<TypeTag, Properties::Indices>;
using ModelParameters = BlackoilModelParametersEbos<TypeTag>;
using ModelParameters = BlackoilModelParameters<TypeTag>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
using BVector = typename BlackoilModelEbos<TypeTag>::BVector;
using BVector = typename BlackoilModel<TypeTag>::BVector;
using Domain = SubDomain<Grid>;
using ISTLSolverType = ISTLSolverEbos<TypeTag>;
using Mat = typename BlackoilModelEbos<TypeTag>::Mat;
using Mat = typename BlackoilModel<TypeTag>::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<TypeTag>& model)
BlackoilModelNldd(BlackoilModel<TypeTag>& model)
: model_(model), rank_(model_.ebosSimulator().vanguard().grid().comm().rank())
{
// Create partitions.
@ -958,7 +958,7 @@ private:
return p;
}
BlackoilModelEbos<TypeTag>& model_; //!< Reference to model
BlackoilModel<TypeTag>& model_; //!< Reference to model
std::vector<Domain> domains_; //!< Vector of subdomains
std::vector<std::unique_ptr<Mat>> domain_matrices_; //!< Vector of matrix operator for each subdomain
std::vector<ISTLSolverType> 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

View File

@ -17,8 +17,8 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_BLACKOILMODELPARAMETERS_EBOS_HEADER_INCLUDED
#define OPM_BLACKOILMODELPARAMETERS_EBOS_HEADER_INCLUDED
#ifndef OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
#define OPM_BLACKOILMODELPARAMETERS_HEADER_INCLUDED
#include <opm/models/discretization/common/fvbaseproperties.hh>
@ -463,7 +463,7 @@ namespace Opm
{
/// Solver parameters for the BlackoilModel.
template <class TypeTag>
struct BlackoilModelParametersEbos
struct BlackoilModelParameters
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
@ -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

View File

@ -25,8 +25,8 @@
#include <fmt/format.h>
#include <opm/simulators/aquifers/BlackoilAquiferModel.hpp>
#include <opm/simulators/flow/BlackoilModelEbos.hpp>
#include <opm/simulators/flow/BlackoilModelParametersEbos.hpp>
#include <opm/simulators/flow/BlackoilModel.hpp>
#include <opm/simulators/flow/BlackoilModelParameters.hpp>
#include <opm/simulators/flow/ConvergenceOutputConfiguration.hpp>
#include <opm/simulators/flow/ExtraConvergenceOutputThread.hpp>
#include <opm/simulators/flow/NonlinearSolverEbos.hpp>
@ -170,7 +170,7 @@ public:
typedef BlackOilPolymerModule<TypeTag> PolymerModule;
typedef BlackOilMICPModule<TypeTag> MICPModule;
typedef BlackoilModelEbos<TypeTag> Model;
using Model = BlackoilModel<TypeTag>;
typedef NonlinearSolverEbos<TypeTag, Model> Solver;
typedef typename Model::ModelParameters ModelParameters;
typedef typename Solver::SolverParameters SolverParameters;

View File

@ -35,7 +35,7 @@
#include <opm/models/common/multiphasebaseproperties.hh>
#include <opm/models/utils/parametersystem.hh>
#include <opm/models/utils/propertysystem.hh>
#include <opm/simulators/flow/BlackoilModelParametersEbos.hpp>
#include <opm/simulators/flow/BlackoilModelParameters.hpp>
#include <opm/simulators/linalg/ExtractParallelGridInformationToISTL.hpp>
#include <opm/simulators/linalg/FlowLinearSolverParameters.hpp>
#include <opm/simulators/linalg/matrixblock.hh>

View File

@ -96,7 +96,7 @@ namespace Opm {
{
public:
// --------- Types ---------
typedef BlackoilModelParametersEbos<TypeTag> ModelParameters;
using ModelParameters = BlackoilModelParameters<TypeTag>;
using Grid = GetPropType<TypeTag, Properties::Grid>;
using EquilGrid = GetPropType<TypeTag, Properties::EquilGrid>;

View File

@ -39,7 +39,7 @@ namespace Opm {
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/simulators/flow/BlackoilModelParametersEbos.hpp>
#include <opm/simulators/flow/BlackoilModelParameters.hpp>
#include <opm/simulators/wells/BlackoilWellModel.hpp>
#include <opm/simulators/wells/GasLiftGroupInfo.hpp>
@ -78,7 +78,7 @@ class WellInterface : public WellInterfaceIndices<GetPropType<TypeTag, Propertie
GetPropType<TypeTag, Properties::Indices>,
GetPropType<TypeTag, Properties::Scalar>>;
public:
using ModelParameters = BlackoilModelParametersEbos<TypeTag>;
using ModelParameters = BlackoilModelParameters<TypeTag>;
using Grid = GetPropType<TypeTag, Properties::Grid>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;

View File

@ -39,7 +39,7 @@
#include <opm/models/utils/start.hh>
#include <opm/simulators/linalg/parallelbicgstabbackend.hh>
#include <opm/simulators/flow/BlackoilModelParametersEbos.hpp>
#include <opm/simulators/flow/BlackoilModelParameters.hpp>
#include <opm/simulators/wells/BlackoilWellModel.hpp>
#if HAVE_DUNE_FEM
@ -233,7 +233,7 @@ struct EquilFixture {
Dune::MPIHelper::instance(argc, argv);
#endif
Opm::EclGenericVanguard::setCommunication(std::make_unique<Opm::Parallel::Communication>());
Opm::BlackoilModelParametersEbos<TypeTag>::registerParameters();
Opm::BlackoilModelParameters<TypeTag>::registerParameters();
Opm::AdaptiveTimeSteppingEbos<TypeTag>::registerParameters();
Opm::Parameters::registerParam<TypeTag, bool>("EnableTerminalOutput",
"EnableTerminalOutput",

View File

@ -35,7 +35,7 @@
#include <opm/input/eclipse/Schedule/Schedule.hpp>
#include <opm/input/eclipse/Schedule/Well/Well.hpp>
#include <opm/simulators/utils/DeferredLogger.hpp>
#include <opm/simulators/flow/BlackoilModelEbos.hpp>
#include <opm/simulators/flow/BlackoilModel.hpp>
#include <opm/simulators/wells/BlackoilWellModel.hpp>
#include <opm/simulators/wells/StandardWell.hpp>
#include <opm/simulators/wells/GasLiftSingleWell.hpp>

View File

@ -42,7 +42,7 @@
#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
#include <opm/grid/GridHelpers.hpp>
#include <opm/simulators/flow/FlowMainEbos.hpp>
#include <opm/simulators/flow/BlackoilModelEbos.hpp>
#include <opm/simulators/flow/BlackoilModel.hpp>
#include <ebos/eclproblem.hh>
#include <opm/models/utils/start.hh>
@ -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<Opm::Properties::TTag::EclFlowProblem> param;
const Opm::BlackoilModelParameters<Opm::Properties::TTag::EclFlowProblem> param;
// For the conversion between the surface volume rate and resrevoir voidage rate
typedef Opm::BlackOilFluidSystem<double> FluidSystem;
@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(TestBehavoir) {
{
const int nw = wells_ecl.size();
const Opm::BlackoilModelParametersEbos<Opm::Properties::TTag::EclFlowProblem> param;
const Opm::BlackoilModelParameters<Opm::Properties::TTag::EclFlowProblem> param;
for (int w = 0; w < nw; ++w) {
// For the conversion between the surface volume rate and resrevoir voidage rate