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

This commit is contained in:
Arne Morten Kvarving 2024-02-02 10:46:44 +01:00
parent bc2dd1110e
commit 04ed17ebd0
5 changed files with 22 additions and 22 deletions

View File

@ -411,7 +411,6 @@ list (APPEND TEST_DATA_FILES
list (APPEND PUBLIC_HEADER_FILES list (APPEND PUBLIC_HEADER_FILES
ebos/ebos.hh ebos/ebos.hh
ebos/eclbasevanguard.hh ebos/eclbasevanguard.hh
ebos/eclcpgridvanguard.hh
ebos/eclgenericcpgridvanguard.hh ebos/eclgenericcpgridvanguard.hh
ebos/eclgenericproblem.hh ebos/eclgenericproblem.hh
ebos/eclgenericproblem_impl.hh ebos/eclgenericproblem_impl.hh
@ -433,6 +432,7 @@ list (APPEND PUBLIC_HEADER_FILES
opm/simulators/flow/CollectDataOnIORank_impl.hpp opm/simulators/flow/CollectDataOnIORank_impl.hpp
opm/simulators/flow/ConvergenceOutputConfiguration.hpp opm/simulators/flow/ConvergenceOutputConfiguration.hpp
opm/simulators/flow/countGlobalCells.hpp opm/simulators/flow/countGlobalCells.hpp
opm/simulators/flow/CpGridVanguard.hpp
opm/simulators/flow/DummyGradientCalculator.hpp opm/simulators/flow/DummyGradientCalculator.hpp
opm/simulators/flow/EclGenericWriter.hpp opm/simulators/flow/EclGenericWriter.hpp
opm/simulators/flow/EclGenericWriter_impl.hpp opm/simulators/flow/EclGenericWriter_impl.hpp

View File

@ -34,7 +34,6 @@
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
#include <ebos/eclcpgridvanguard.hh>
#include <ebos/eclgenericproblem.hh> #include <ebos/eclgenericproblem.hh>
#include <ebos/eclnewtonmethod.hh> #include <ebos/eclnewtonmethod.hh>
#include <ebos/eclproblem_properties.hh> #include <ebos/eclproblem_properties.hh>
@ -74,6 +73,7 @@
#include <opm/simulators/flow/ActionHandler.hpp> #include <opm/simulators/flow/ActionHandler.hpp>
#include <opm/simulators/flow/BaseAquiferModel.hpp> #include <opm/simulators/flow/BaseAquiferModel.hpp>
#include <opm/simulators/flow/CpGridVanguard.hpp>
#include <opm/simulators/flow/DummyGradientCalculator.hpp> #include <opm/simulators/flow/DummyGradientCalculator.hpp>
#include <opm/simulators/flow/EclWriter.hpp> #include <opm/simulators/flow/EclWriter.hpp>
#include <opm/simulators/flow/EquilInitializer.hpp> #include <opm/simulators/flow/EquilInitializer.hpp>

View File

@ -28,7 +28,6 @@
#ifndef ECL_PROBLEM_PROPERTIES_HH #ifndef ECL_PROBLEM_PROPERTIES_HH
#define ECL_PROBLEM_PROPERTIES_HH #define ECL_PROBLEM_PROPERTIES_HH
#include <ebos/eclcpgridvanguard.hh>
#include <ebos/eclnewtonmethod.hh> #include <ebos/eclnewtonmethod.hh>
#if HAVE_DAMARIS #if HAVE_DAMARIS
@ -44,6 +43,7 @@
#include <opm/models/utils/propertysystem.hh> #include <opm/models/utils/propertysystem.hh>
#include <opm/simulators/flow/BaseAquiferModel.hpp> #include <opm/simulators/flow/BaseAquiferModel.hpp>
#include <opm/simulators/flow/CpGridVanguard.hpp>
#include <opm/simulators/flow/DummyGradientCalculator.hpp> #include <opm/simulators/flow/DummyGradientCalculator.hpp>
#include <opm/simulators/flow/EclWriter.hpp> #include <opm/simulators/flow/EclWriter.hpp>
#include <opm/simulators/flow/FIBlackoilModel.hpp> #include <opm/simulators/flow/FIBlackoilModel.hpp>
@ -63,7 +63,7 @@ namespace Opm::Properties {
namespace TTag { namespace TTag {
struct EclBaseProblem { struct EclBaseProblem {
using InheritsFrom = std::tuple<VtkTracer, OutputBlackOil, EclCpGridVanguard>; using InheritsFrom = std::tuple<VtkTracer, OutputBlackOil, CpGridVanguard>;
}; };
} }

View File

@ -23,7 +23,7 @@
#include "config.h" #include "config.h"
#include <opm/simulators/flow/Main.hpp> #include <opm/simulators/flow/Main.hpp>
#include <ebos/eclcpgridvanguard.hh> #include <opm/simulators/flow/CpGridVanguard.hpp>
std::vector<int> loadBalanceInZOnly(const Dune::CpGrid& grid) std::vector<int> loadBalanceInZOnly(const Dune::CpGrid& grid)
{ {
@ -61,7 +61,7 @@ std::vector<int> loadBalanceInZOnly(const Dune::CpGrid& grid)
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
auto mainObject = std::make_unique<Opm::Main>(argc, argv); auto mainObject = std::make_unique<Opm::Main>(argc, argv);
Opm::EclCpGridVanguard<Opm::Properties::TTag::FlowProblem>::setExternalLoadBalancer(loadBalanceInZOnly); Opm::CpGridVanguard<Opm::Properties::TTag::FlowProblem>::setExternalLoadBalancer(loadBalanceInZOnly);
auto ret = mainObject->runDynamic(); auto ret = mainObject->runDynamic();
// Destruct mainObject as the destructor calls MPI_Finalize! // Destruct mainObject as the destructor calls MPI_Finalize!
mainObject.reset(); mainObject.reset();

View File

@ -22,10 +22,10 @@
*/ */
/*! /*!
* \file * \file
* \copydoc Opm::EclCpGridVanguard * \copydoc Opm::CpGridVanguard
*/ */
#ifndef EWOMS_ECL_CP_GRID_VANGUARD_HH #ifndef OPM_CPGRID_VANGUARD_HPP
#define EWOMS_ECL_CP_GRID_VANGUARD_HH #define OPM_CPGRID_VANGUARD_HPP
#include <ebos/eclbasevanguard.hh> #include <ebos/eclbasevanguard.hh>
#include <ebos/eclgenericcpgridvanguard.hh> #include <ebos/eclgenericcpgridvanguard.hh>
@ -47,28 +47,28 @@
namespace Opm { namespace Opm {
template <class TypeTag> template <class TypeTag>
class EclCpGridVanguard; class CpGridVanguard;
} }
namespace Opm::Properties { namespace Opm::Properties {
namespace TTag { namespace TTag {
struct EclCpGridVanguard { struct CpGridVanguard {
using InheritsFrom = std::tuple<EclBaseVanguard>; using InheritsFrom = std::tuple<EclBaseVanguard>;
}; };
} }
// declare the properties // declare the properties
template<class TypeTag> template<class TypeTag>
struct Vanguard<TypeTag, TTag::EclCpGridVanguard> { struct Vanguard<TypeTag, TTag::CpGridVanguard> {
using type = EclCpGridVanguard<TypeTag>; using type = CpGridVanguard<TypeTag>;
}; };
template<class TypeTag> template<class TypeTag>
struct Grid<TypeTag, TTag::EclCpGridVanguard> { struct Grid<TypeTag, TTag::CpGridVanguard> {
using type = Dune::CpGrid; using type = Dune::CpGrid;
}; };
template<class TypeTag> template<class TypeTag>
struct EquilGrid<TypeTag, TTag::EclCpGridVanguard> { struct EquilGrid<TypeTag, TTag::CpGridVanguard> {
using type = GetPropType<TypeTag, Properties::Grid>; using type = GetPropType<TypeTag, Properties::Grid>;
}; };
@ -77,14 +77,14 @@ struct EquilGrid<TypeTag, TTag::EclCpGridVanguard> {
namespace Opm { namespace Opm {
/*! /*!
* \ingroup EclBlackOilSimulator * \ingroup BlackOilSimulator
* *
* \brief Helper class for grid instantiation of ECL file-format using problems. * \brief Helper class for grid instantiation of ECL file-format using problems.
* *
* This class uses Dune::CpGrid as the simulation grid. * This class uses Dune::CpGrid as the simulation grid.
*/ */
template <class TypeTag> template <class TypeTag>
class EclCpGridVanguard : public EclBaseVanguard<TypeTag> class CpGridVanguard : public EclBaseVanguard<TypeTag>
, public EclGenericCpGridVanguard<GetPropType<TypeTag, Properties::ElementMapper>, , public EclGenericCpGridVanguard<GetPropType<TypeTag, Properties::ElementMapper>,
GetPropType<TypeTag, Properties::GridView>, GetPropType<TypeTag, Properties::GridView>,
GetPropType<TypeTag, Properties::Scalar>> GetPropType<TypeTag, Properties::Scalar>>
@ -111,7 +111,7 @@ private:
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
public: public:
EclCpGridVanguard(Simulator& simulator) CpGridVanguard(Simulator& simulator)
: EclBaseVanguard<TypeTag>(simulator) : EclBaseVanguard<TypeTag>(simulator)
{ {
this->checkConsistency(); this->checkConsistency();
@ -317,4 +317,4 @@ protected:
} // namespace Opm } // namespace Opm
#endif #endif // OPM_CPGRID_VANGUARD_HPP