move ebos/eclbasevanguard.hh to opm/simulators/flow

This commit is contained in:
Arne Morten Kvarving 2024-02-02 10:46:44 +01:00
parent 9fe969378d
commit 6949abbf0d
10 changed files with 55 additions and 59 deletions

View File

@ -410,7 +410,6 @@ list (APPEND TEST_DATA_FILES
# find opm -name '*.h*' -a ! -name '*-pch.hpp' -printf '\t%p\n' | sort
list (APPEND PUBLIC_HEADER_FILES
ebos/ebos.hh
ebos/eclbasevanguard.hh
ebos/eclgenericproblem.hh
ebos/eclgenericproblem_impl.hh
ebos/eclgenericvanguard.hh
@ -440,6 +439,7 @@ list (APPEND PUBLIC_HEADER_FILES
opm/simulators/flow/ExtraConvergenceOutputThread.hpp
opm/simulators/flow/FemCpGridCompat.hpp
opm/simulators/flow/FIBlackoilModel.hpp
opm/simulators/flow/FlowBaseVanguard.hpp
opm/simulators/flow/FlowMain.hpp
opm/simulators/flow/FlowUtils.hpp
opm/simulators/flow/FlowsData.hpp

View File

@ -34,12 +34,12 @@
#include <dune/grid/common/partitionset.hh>
#include <ebos/damaris_properties.hh>
#include <ebos/eclbasevanguard.hh>
#include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/simulators/flow/countGlobalCells.hpp>
#include <opm/simulators/flow/EclGenericWriter.hpp>
#include <opm/simulators/flow/FlowBaseVanguard.hpp>
#include <opm/simulators/flow/OutputBlackoilModule.hpp>
#include <opm/simulators/utils/DamarisVar.hpp>
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>

View File

@ -31,7 +31,6 @@
#include <dune/alugrid/dgf.hh>
#include <dune/alugrid/grid.hh>
#include <ebos/eclbasevanguard.hh>
#include <ebos/ecltransmissibility.hh>
#include <opm/common/OpmLog/OpmLog.hpp>
@ -41,6 +40,7 @@
#include <opm/models/common/multiphasebaseproperties.hh>
#include <opm/simulators/flow/AluGridCartesianIndexMapper.hpp>
#include <opm/simulators/flow/FlowBaseVanguard.hpp>
#include <opm/simulators/utils/ParallelEclipseState.hpp>
#include <array>
@ -59,7 +59,7 @@ namespace Opm::Properties {
namespace TTag {
struct AluGridVanguard {
using InheritsFrom = std::tuple<EclBaseVanguard>;
using InheritsFrom = std::tuple<FlowBaseVanguard>;
};
}
@ -86,17 +86,17 @@ struct EquilGrid<TypeTag, TTag::AluGridVanguard> {
namespace Opm {
/*!
* \ingroup EclBlackOilSimulator
* \ingroup BlackOilSimulator
*
* \brief Helper class for grid instantiation of ECL file-format using problems.
*
* This class uses Dune::ALUGrid as the simulation grid.
*/
template <class TypeTag>
class AluGridVanguard : public EclBaseVanguard<TypeTag>
class AluGridVanguard : public FlowBaseVanguard<TypeTag>
{
friend class EclBaseVanguard<TypeTag>;
using ParentType = EclBaseVanguard<TypeTag>;
friend class FlowBaseVanguard<TypeTag>;
using ParentType = FlowBaseVanguard<TypeTag>;
using ElementMapper = GetPropType<TypeTag, Properties::ElementMapper>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
@ -115,7 +115,7 @@ public:
static constexpr int dimensionworld = Grid::dimensionworld;
AluGridVanguard(Simulator& simulator)
: EclBaseVanguard<TypeTag>(simulator)
: FlowBaseVanguard<TypeTag>(simulator)
{
this->mpiRank = EclGenericVanguard::comm().rank();
this->callImplementationInit();

View File

@ -27,7 +27,6 @@
#ifndef OPM_CPGRID_VANGUARD_HPP
#define OPM_CPGRID_VANGUARD_HPP
#include <ebos/eclbasevanguard.hh>
#include <ebos/ecltransmissibility.hh>
#include <opm/common/TimingMacros.hpp>
@ -36,6 +35,7 @@
#include <opm/models/blackoil/blackoilproperties.hh>
#include <opm/simulators/flow/FemCpGridCompat.hpp>
#include <opm/simulators/flow/FlowBaseVanguard.hpp>
#include <opm/simulators/flow/GenericCpGridVanguard.hpp>
#include <array>
@ -54,7 +54,7 @@ namespace Opm::Properties {
namespace TTag {
struct CpGridVanguard {
using InheritsFrom = std::tuple<EclBaseVanguard>;
using InheritsFrom = std::tuple<FlowBaseVanguard>;
};
}
@ -84,13 +84,13 @@ namespace Opm {
* This class uses Dune::CpGrid as the simulation grid.
*/
template <class TypeTag>
class CpGridVanguard : public EclBaseVanguard<TypeTag>
class CpGridVanguard : public FlowBaseVanguard<TypeTag>
, public GenericCpGridVanguard<GetPropType<TypeTag, Properties::ElementMapper>,
GetPropType<TypeTag, Properties::GridView>,
GetPropType<TypeTag, Properties::Scalar>>
{
friend class EclBaseVanguard<TypeTag>;
using ParentType = EclBaseVanguard<TypeTag>;
friend class FlowBaseVanguard<TypeTag>;
using ParentType = FlowBaseVanguard<TypeTag>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
@ -112,7 +112,7 @@ private:
public:
CpGridVanguard(Simulator& simulator)
: EclBaseVanguard<TypeTag>(simulator)
: FlowBaseVanguard<TypeTag>(simulator)
{
this->checkConsistency();
this->callImplementationInit();

View File

@ -30,10 +30,6 @@
#include <dune/grid/common/partitionset.hh>
#include <ebos/eclbasevanguard.hh>
#include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/input/eclipse/Units/UnitSystem.hpp>
@ -43,6 +39,7 @@
#include <opm/simulators/flow/CollectDataOnIORank.hpp>
#include <opm/simulators/flow/countGlobalCells.hpp>
#include <opm/simulators/flow/EclGenericWriter.hpp>
#include <opm/simulators/flow/FlowBaseVanguard.hpp>
#include <opm/simulators/flow/OutputBlackoilModule.hpp>
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>

View File

@ -22,10 +22,10 @@
*/
/*!
* \file
* \copydoc Opm::EclBaseVanguard
* \copydoc Opm::FlowBaseVanguard
*/
#ifndef EWOMS_ECL_BASE_VANGUARD_HH
#define EWOMS_ECL_BASE_VANGUARD_HH
#ifndef OPM_FLOW_BASE_VANGUARD_HPP
#define OPM_FLOW_BASE_VANGUARD_HPP
#include <ebos/eclgenericvanguard.hh>
@ -49,14 +49,14 @@
namespace Opm {
template <class TypeTag>
class EclBaseVanguard;
class FlowBaseVanguard;
template<typename Grid, typename GridView> struct LookUpCellCentroid;
}
namespace Opm::Properties {
namespace TTag {
struct EclBaseVanguard {};
struct FlowBaseVanguard {};
}
// declare the properties required by the for the ecl simulator vanguard
@ -128,77 +128,77 @@ struct AllowDistributedWells {
};
template<class TypeTag>
struct IgnoreKeywords<TypeTag, TTag::EclBaseVanguard> {
struct IgnoreKeywords<TypeTag, TTag::FlowBaseVanguard> {
static constexpr auto value = "";
};
template<class TypeTag>
struct EclDeckFileName<TypeTag, TTag::EclBaseVanguard> {
struct EclDeckFileName<TypeTag, TTag::FlowBaseVanguard> {
static constexpr auto value = "";
};
template<class TypeTag>
struct EclOutputInterval<TypeTag, TTag::EclBaseVanguard> {
struct EclOutputInterval<TypeTag, TTag::FlowBaseVanguard> {
static constexpr int value = -1;
};
template<class TypeTag>
struct EnableOpmRstFile<TypeTag, TTag::EclBaseVanguard> {
struct EnableOpmRstFile<TypeTag, TTag::FlowBaseVanguard> {
static constexpr bool value = false;
};
template<class TypeTag>
struct ParsingStrictness<TypeTag, TTag::EclBaseVanguard> {
struct ParsingStrictness<TypeTag, TTag::FlowBaseVanguard> {
static constexpr auto value = "normal";
};
template<class TypeTag>
struct SchedRestart<TypeTag, TTag::EclBaseVanguard> {
struct SchedRestart<TypeTag, TTag::FlowBaseVanguard> {
static constexpr bool value = false;
};
template<class TypeTag>
struct EdgeWeightsMethod<TypeTag, TTag::EclBaseVanguard> {
struct EdgeWeightsMethod<TypeTag, TTag::FlowBaseVanguard> {
static constexpr int value = 1;
};
#if HAVE_OPENCL || HAVE_ROCSPARSE
template<class TypeTag>
struct NumJacobiBlocks<TypeTag, TTag::EclBaseVanguard> {
struct NumJacobiBlocks<TypeTag, TTag::FlowBaseVanguard> {
static constexpr int value = 0;
};
#endif // HAVE_OPENCL || HAVE_ROCSPARSE
template<class TypeTag>
struct OwnerCellsFirst<TypeTag, TTag::EclBaseVanguard> {
struct OwnerCellsFirst<TypeTag, TTag::FlowBaseVanguard> {
static constexpr bool value = true;
};
template<class TypeTag>
struct SerialPartitioning<TypeTag, TTag::EclBaseVanguard> {
struct SerialPartitioning<TypeTag, TTag::FlowBaseVanguard> {
static constexpr bool value = false;
};
template<class TypeTag>
struct ZoltanImbalanceTol<TypeTag, TTag::EclBaseVanguard> {
struct ZoltanImbalanceTol<TypeTag, TTag::FlowBaseVanguard> {
static constexpr double value = 1.1;
};
template<class TypeTag>
struct ZoltanParams<TypeTag,TTag::EclBaseVanguard> {
struct ZoltanParams<TypeTag,TTag::FlowBaseVanguard> {
static constexpr auto value = "graph";
};
template <class TypeTag>
struct ExternalPartition<TypeTag, TTag::EclBaseVanguard>
struct ExternalPartition<TypeTag, TTag::FlowBaseVanguard>
{
static constexpr auto* value = "";
};
template<class TypeTag>
struct AllowDistributedWells<TypeTag, TTag::EclBaseVanguard> {
struct AllowDistributedWells<TypeTag, TTag::FlowBaseVanguard> {
static constexpr bool value = false;
};
template<class T1, class T2>
struct UseMultisegmentWell;
// Same as in BlackoilModelParametersEbos.hpp but for here.
// Same as in BlackoilModelParameters.hpp but for here.
template<class TypeTag>
struct UseMultisegmentWell<TypeTag, TTag::EclBaseVanguard> {
struct UseMultisegmentWell<TypeTag, TTag::FlowBaseVanguard> {
static constexpr bool value = true;
};
} // namespace Opm::Properties
@ -206,13 +206,13 @@ struct UseMultisegmentWell<TypeTag, TTag::EclBaseVanguard> {
namespace Opm {
/*!
* \ingroup EclBlackOilSimulator
* \ingroup BlackOilSimulator
*
* \brief Helper class for grid instantiation of ECL file-format using problems.
*/
template <class TypeTag>
class EclBaseVanguard : public BaseVanguard<TypeTag>,
public EclGenericVanguard
class FlowBaseVanguard : public BaseVanguard<TypeTag>,
public EclGenericVanguard
{
using ParentType = BaseVanguard<TypeTag>;
using Implementation = GetPropType<TypeTag, Properties::Vanguard>;
@ -232,7 +232,6 @@ protected:
using Element = typename GridView::template Codim<0>::Entity;
using CartesianIndexMapper = Dune::CartesianIndexMapper<Grid>;
public:
/*!
* \brief Register the common run-time parameters for all ECL simulator vanguards.
@ -286,7 +285,7 @@ public:
#endif
EWOMS_REGISTER_PARAM(TypeTag, bool, AllowDistributedWells,
"Allow the perforations of a well to be distributed to interior of multiple processes");
// register here for the use in the tests without BlackoildModelParametersEbos
// register here for the use in the tests without BlackoilModelParameters
EWOMS_REGISTER_PARAM(TypeTag, bool, UseMultisegmentWell, "Use the well model for multi-segment wells instead of the one for single-segment wells");
}
@ -297,7 +296,7 @@ public:
* This is the file format used by the commercial ECLiPSE simulator. Usually it uses
* a cornerpoint description of the grid.
*/
EclBaseVanguard(Simulator& simulator)
FlowBaseVanguard(Simulator& simulator)
: ParentType(simulator)
{
fileName_ = EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName);
@ -649,4 +648,4 @@ protected:
} // namespace Opm
#endif
#endif // OPM_FLOW_BASE_VANGUARD_HPP

View File

@ -194,7 +194,7 @@ void Main::readDeck(const std::string& deckFilename,
std::string_view moduleVersion,
std::string_view compileTimestamp)
{
auto omode = setupLogging(EclGenericVanguard::comm(),
auto omode = setupLogging(FlowGenericVanguard::comm(),
deckFilename,
outputDir,
outputMode,

View File

@ -29,7 +29,6 @@
#include <dune/common/fvector.hh>
#include <ebos/eclbasevanguard.hh>
#include <opm/simulators/utils/moduleVersion.hpp>
#include <opm/common/Exceptions.hpp>
@ -52,6 +51,7 @@
#include <opm/output/eclipse/EclipseIO.hpp>
#include <opm/output/eclipse/Inplace.hpp>
#include <opm/simulators/flow/FlowBaseVanguard.hpp>
#include <opm/simulators/flow/GenericOutputBlackoilModule.hpp>
#include <algorithm>

View File

@ -27,13 +27,14 @@
#ifndef OPM_POLYHEDRAL_GRID_VANGUARD_HPP
#define OPM_POLYHEDRAL_GRID_VANGUARD_HPP
#include <ebos/eclbasevanguard.hh>
#include <ebos/ecltransmissibility.hh>
#include <opm/grid/polyhedralgrid.hh>
#include <opm/models/common/multiphasebaseproperties.hh>
#include <opm/simulators/flow/FlowBaseVanguard.hpp>
#include <array>
#include <functional>
#include <string>
@ -49,7 +50,7 @@ namespace Opm::Properties {
namespace TTag {
struct PolyhedralGridVanguard {
using InheritsFrom = std::tuple<EclBaseVanguard>;
using InheritsFrom = std::tuple<FlowBaseVanguard>;
};
}
@ -79,10 +80,10 @@ namespace Opm {
* This class uses Dune::PolyhedralGrid as the simulation grid.
*/
template <class TypeTag>
class PolyhedralGridVanguard : public EclBaseVanguard<TypeTag>
class PolyhedralGridVanguard : public FlowBaseVanguard<TypeTag>
{
friend class EclBaseVanguard<TypeTag>;
using ParentType = EclBaseVanguard<TypeTag>;
friend class FlowBaseVanguard<TypeTag>;
using ParentType = FlowBaseVanguard<TypeTag>;
using ElementMapper = GetPropType<TypeTag, Properties::ElementMapper>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
@ -106,8 +107,8 @@ public:
CartesianIndexMapper, Scalar>;
PolyhedralGridVanguard(Simulator& simulator)
: EclBaseVanguard<TypeTag>(simulator),
simulator_( simulator )
: FlowBaseVanguard<TypeTag>(simulator)
, simulator_(simulator)
{
this->callImplementationInit();
// add a copy in standard vector format to fullfill new interface
@ -215,7 +216,7 @@ public:
* It is a function return the centroid for the given element
* index.
*/
std::function<std::array<double,EclBaseVanguard<TypeTag>::dimensionworld>(int)>
std::function<std::array<double,FlowBaseVanguard<TypeTag>::dimensionworld>(int)>
cellCentroids() const
{
return this->cellCentroids_(this->cartesianIndexMapper(), false);

View File

@ -25,8 +25,6 @@
#include <dune/istl/owneroverlapcopy.hh>
#include <dune/istl/solver.hh>
#include <ebos/eclbasevanguard.hh>
#include <opm/common/ErrorMacros.hpp>
#include <opm/common/Exceptions.hpp>
#include <opm/common/TimingMacros.hpp>
@ -36,6 +34,7 @@
#include <opm/models/utils/parametersystem.hh>
#include <opm/models/utils/propertysystem.hh>
#include <opm/simulators/flow/BlackoilModelParameters.hpp>
#include <opm/simulators/flow/FlowBaseVanguard.hpp>
#include <opm/simulators/linalg/ExtractParallelGridInformationToISTL.hpp>
#include <opm/simulators/linalg/FlowLinearSolverParameters.hpp>
#include <opm/simulators/linalg/matrixblock.hh>