Merge pull request #5175 from akva2/move_alugrid

Move AluGrid files from ebos to opm/simulators/flow
This commit is contained in:
Kai Bao 2024-03-06 00:02:12 +01:00 committed by GitHub
commit 9f13a25ebc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 22 additions and 35 deletions

View File

@ -409,11 +409,9 @@ list (APPEND TEST_DATA_FILES
# originally generated with the command:
# find opm -name '*.h*' -a ! -name '*-pch.hpp' -printf '\t%p\n' | sort
list (APPEND PUBLIC_HEADER_FILES
ebos/alucartesianindexmapper.hh
ebos/collecttoiorank.hh
ebos/collecttoiorank_impl.hh
ebos/ebos.hh
ebos/eclalugridvanguard.hh
ebos/eclbaseaquifermodel.hh
ebos/eclbasevanguard.hh
ebos/eclcpgridvanguard.hh
@ -443,6 +441,8 @@ list (APPEND PUBLIC_HEADER_FILES
ebos/femcpgridcompat.hh
ebos/vtkecltracermodule.hh
opm/simulators/flow/ActionHandler.hpp
opm/simulators/flow/AluGridCartesianIndexMapper.hpp
opm/simulators/flow/AluGridVanguard.hpp
opm/simulators/flow/Banners.hpp
opm/simulators/flow/BlackoilModel.hpp
opm/simulators/flow/BlackoilModelNldd.hpp

View File

@ -19,7 +19,6 @@
#include <config.h>
#include <dune/alugrid/grid.hh>
#include <ebos/eclalugridvanguard.hh>
#include <opm/simulators/flow/Main.hpp>
// for equilgrid in writer
@ -35,6 +34,7 @@
#include <ebos/eclgenericwriter_impl.hh>
#include <ebos/ecltransmissibility_impl.hh>
#include <ebos/equil/initstateequil_impl.hh>
#include <opm/simulators/flow/AluGridVanguard.hpp>
#include <opm/simulators/utils/GridDataOutput_impl.hpp>
namespace Opm {
@ -62,7 +62,7 @@ struct EquilGrid<TypeTag, TTag::FlowProblemAlugrid> {
};
template<class TypeTag>
struct Vanguard<TypeTag, TTag::FlowProblemAlugrid> {
using type = Opm::EclAluGridVanguard<TypeTag>;
using type = Opm::AluGridVanguard<TypeTag>;
};
}
}

View File

@ -20,13 +20,9 @@
module for the precise wording of the license and the list of
copyright holders.
*/
/*!
* \file
*
* \copydoc Opm::AluCartesianIndexMapper
*/
#ifndef EWOMS_ALU_CARTESIAN_INDEX_MAPPER_HH
#define EWOMS_ALU_CARTESIAN_INDEX_MAPPER_HH
#ifndef OPM_ALUGRID_CARTESIAN_INDEX_MAPPER_HPP
#define OPM_ALUGRID_CARTESIAN_INDEX_MAPPER_HPP
#include <dune/alugrid/grid.hh>
#include <dune/alugrid/3d/gridview.hh>
@ -275,4 +271,4 @@ protected:
} // end namespace Dune
#endif
#endif // OPM_ALUGRID_CARTESIAN_INDEX_MAPPER_HPP

View File

@ -22,16 +22,15 @@
*/
/*!
* \file
* \copydoc Opm::EclAluGridVanguard
* \copydoc Opm::AluGridVanguard
*/
#ifndef EWOMS_ECL_ALU_GRID_VANGUARD_HH
#define EWOMS_ECL_ALU_GRID_VANGUARD_HH
#ifndef OPM_ALUGRID_VANGUARD_HPP
#define OPM_ALUGRID_VANGUARD_HPP
#include <dune/alugrid/common/fromtogridfactory.hh>
#include <dune/alugrid/dgf.hh>
#include <dune/alugrid/grid.hh>
#include <ebos/alucartesianindexmapper.hh>
#include <ebos/eclbasevanguard.hh>
#include <ebos/ecltransmissibility.hh>
@ -41,6 +40,7 @@
#include <opm/models/common/multiphasebaseproperties.hh>
#include <opm/simulators/flow/AluGridCartesianIndexMapper.hpp>
#include <opm/simulators/utils/ParallelEclipseState.hpp>
#include <array>
@ -51,25 +51,25 @@
namespace Opm {
template <class TypeTag>
class EclAluGridVanguard;
class FlowAluGridVanguard;
} // namespace Opm
namespace Opm::Properties {
namespace TTag {
struct EclAluGridVanguard {
struct AluGridVanguard {
using InheritsFrom = std::tuple<EclBaseVanguard>;
};
}
// declare the properties
template<class TypeTag>
struct Vanguard<TypeTag, TTag::EclAluGridVanguard> {
using type = Opm::EclAluGridVanguard<TypeTag>;
struct Vanguard<TypeTag, TTag::AluGridVanguard> {
using type = Opm::FlowAluGridVanguard<TypeTag>;
};
template<class TypeTag>
struct Grid<TypeTag, TTag::EclAluGridVanguard> {
struct Grid<TypeTag, TTag::AluGridVanguard> {
#if HAVE_MPI
using type = Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming, Dune::ALUGridMPIComm>;
#else
@ -77,7 +77,7 @@ struct Grid<TypeTag, TTag::EclAluGridVanguard> {
#endif //HAVE_MPI
};
template<class TypeTag>
struct EquilGrid<TypeTag, TTag::EclAluGridVanguard> {
struct EquilGrid<TypeTag, TTag::AluGridVanguard> {
using type = Dune::CpGrid;
};
@ -93,7 +93,7 @@ namespace Opm {
* This class uses Dune::ALUGrid as the simulation grid.
*/
template <class TypeTag>
class EclAluGridVanguard : public EclBaseVanguard<TypeTag>
class AluGridVanguard : public EclBaseVanguard<TypeTag>
{
friend class EclBaseVanguard<TypeTag>;
using ParentType = EclBaseVanguard<TypeTag>;
@ -114,15 +114,13 @@ public:
static constexpr int dimension = Grid::dimension;
static constexpr int dimensionworld = Grid::dimensionworld;
EclAluGridVanguard(Simulator& simulator)
AluGridVanguard(Simulator& simulator)
: EclBaseVanguard<TypeTag>(simulator)
{
this->mpiRank = EclGenericVanguard::comm().rank();
this->callImplementationInit();
}
~EclAluGridVanguard() = default;
/*!
* \brief Return a reference to the simulation grid.
*/
@ -365,4 +363,4 @@ protected:
} // namespace Opm
#endif
#endif // OPM_ALUGRID_VANGUARD_HPP

View File

@ -38,13 +38,6 @@
#include <opm/simulators/linalg/bda/WellContributions.hpp>
#endif
#if HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#include <ebos/alucartesianindexmapper.hh>
#endif // HAVE_DUNE_ALUGRID
#include <opm/grid/polyhedralgrid.hh>
namespace Opm {
namespace detail {

View File

@ -38,7 +38,7 @@
#if HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#include <ebos/alucartesianindexmapper.hh>
#include <opm/simulators/flow/AluGridCartesianIndexMapper.hpp>
#endif // HAVE_DUNE_ALUGRID
#include <opm/grid/polyhedralgrid.hh>