Use old style traits class approach to check for face tag support.

Old version failed due to a gcc compiler
bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77446 with error:
"non-constant condition for static assertion"
This commit is contained in:
Markus Blatt
2020-12-11 17:38:00 +01:00
parent 7a42a82c55
commit 924bf5ed19
2 changed files with 28 additions and 8 deletions

View File

@@ -26,7 +26,8 @@ BlackoilAquiferModel<TypeTag>::BlackoilAquiferModel(Simulator& simulator)
: simulator_(simulator)
{
// Grid needs to support Facetag
assert(supportsFaceTag(simulator.vanguard().grid()));
using Grid = std::remove_const_t<std::remove_reference_t<decltype(simulator.vanguard().grid())>>;
static_assert(SupportsFaceTag<Grid>::value, "Grid has to support assumptions about face tag.");
init();
}