Merge pull request #4128 from ElyesAhmed/alugrid_fix

some fixes for flow_alugrid
This commit is contained in:
Bård Skaflestad 2022-09-27 13:05:33 +02:00 committed by GitHub
commit eb0a516ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 14 deletions

View File

@ -58,6 +58,11 @@
#include <ebos/femcpgridcompat.hh>
#endif
#if HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#include <dune/alugrid/3d/gridview.hh>
#endif // HAVE_DUNE_ALUGRID
namespace Opm {
namespace EQUIL {
@ -1920,7 +1925,35 @@ template InitialStateComputer<BlackOilFluidSystem<double>,
const GridView&,
const Dune::CartesianIndexMapper<Dune::CpGrid>&,
const double,
const bool);
#if HAVE_DUNE_ALUGRID
#if HAVE_MPI
using ALUGridComm = Dune::ALUGridMPIComm;
#else
using ALUGridComm = Dune::ALUGridNoComm;
#endif //HAVE_MPI
using ALUGrid3CN = Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming, ALUGridComm>;
using ALUGridView = Dune::GridView<Dune::ALU3dLeafGridViewTraits<const ALUGrid3CN, Dune::PartitionIteratorType(4)>>;
using ALUGridMapper = Dune::MultipleCodimMultipleGeomTypeMapper<ALUGridView>;
template class InitialStateComputer<BlackOilFluidSystem<double>,
ALUGrid3CN,
ALUGridView,
ALUGridMapper,
Dune::CartesianIndexMapper<ALUGrid3CN>>;
template InitialStateComputer<BlackOilFluidSystem<double>,
ALUGrid3CN,
ALUGridView,
ALUGridMapper,
Dune::CartesianIndexMapper<ALUGrid3CN>>::
InitialStateComputer(MatLaw&,
const EclipseState&,
const ALUGrid3CN&,
const ALUGridView&,
const Dune::CartesianIndexMapper<ALUGrid3CN>&,
const double,
const bool);
#endif //HAVE_DUNE_ALUGRID
} // namespace DeckDependent

View File

@ -19,26 +19,19 @@
#include "config.h"
#include <opm/simulators/flow/Main.hpp>
namespace Opm::Properties {
namespace TTag {
struct EclFlowProblemAlugrid {
using InheritsFrom = std::tuple<EclFlowProblem>;
};
}
// by default use the dummy aquifer "model"
template<class TypeTag>
struct EclAquiferModel<TypeTag, TTag::EclFlowProblemAlugrid> {
using type = Opm::EclBaseAquiferModel<TypeTag>;
namespace Opm {
namespace Properties {
namespace TTag {
struct EclFlowProblemAlugrid {
using InheritsFrom = std::tuple<EclFlowProblem>;
};
// Enable aquifers by default in experimental mode
}
template<class TypeTag>
struct EclEnableAquifers<TypeTag, TTag::EclFlowProblemAlugrid> {
static constexpr bool value = false;
};
}
}
int main(int argc, char** argv)
{
using TypeTag = Opm::Properties::TTag::EclFlowProblemAlugrid;