mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add check for gridType
This commit is contained in:
parent
6cf91e7f19
commit
7a42a82c55
@ -35,6 +35,12 @@
|
|||||||
#include <opm/simulators/aquifers/AquiferCarterTracy.hpp>
|
#include <opm/simulators/aquifers/AquiferCarterTracy.hpp>
|
||||||
#include <opm/simulators/aquifers/AquiferFetkovich.hpp>
|
#include <opm/simulators/aquifers/AquiferFetkovich.hpp>
|
||||||
|
|
||||||
|
#include <opm/grid/CpGrid.hpp>
|
||||||
|
#include <opm/grid/polyhedralgrid.hh>
|
||||||
|
#if HAVE_DUNE_ALUGRID
|
||||||
|
#include <dune/alugrid/grid.hh>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <opm/material/densead/Math.hpp>
|
#include <opm/material/densead/Math.hpp>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -49,6 +55,14 @@ class BlackoilAquiferModel
|
|||||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||||
|
|
||||||
|
constexpr bool supportsFaceTag(const Dune::CpGrid&){ return true;}
|
||||||
|
constexpr bool supportsFaceTag(const Dune::PolyhedralGrid<3, 3>&){ return true;}
|
||||||
|
#if HAVE_DUNE_ALUGRID
|
||||||
|
constexpr bool supportsFaceTag(const Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>&){ return true;}
|
||||||
|
#endif
|
||||||
|
template<class G>
|
||||||
|
constexpr bool supportsFaceTag(const G&){ return false;}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BlackoilAquiferModel(Simulator& simulator);
|
explicit BlackoilAquiferModel(Simulator& simulator);
|
||||||
|
|
||||||
|
@ -25,6 +25,9 @@ template <typename TypeTag>
|
|||||||
BlackoilAquiferModel<TypeTag>::BlackoilAquiferModel(Simulator& simulator)
|
BlackoilAquiferModel<TypeTag>::BlackoilAquiferModel(Simulator& simulator)
|
||||||
: simulator_(simulator)
|
: simulator_(simulator)
|
||||||
{
|
{
|
||||||
|
// Grid needs to support Facetag
|
||||||
|
assert(supportsFaceTag(simulator.vanguard().grid()));
|
||||||
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user