20 #ifndef GEOS_FINITEVOLUME_MIMETICINNERPRODUCTS_MIMETICINNERPRODUCTDISPATCH_HPP_
21 #define GEOS_FINITEVOLUME_MIMETICINNERPRODUCTS_MIMETICINNERPRODUCTDISPATCH_HPP_
30 #include "LvArray/src/system.hpp"
34 namespace mimeticInnerProduct
44 static constexpr
auto TPFA =
"TPFA";
48 static constexpr
auto QuasiRT =
"quasiRT";
50 static constexpr
auto Simple =
"simple";
52 static constexpr
auto BdVLM =
"beiraoDaVeigaLipnikovManzini";
54 static constexpr
auto RT =
"RT";
63 template<
typename LAMBDA >
68 if(
auto const *
const ptr1 =
dynamic_cast< TPFAInnerProduct const *
>(&input) )
80 else if(
auto const *
const ptr4 =
dynamic_cast< SimpleInnerProduct const *
>(&input) )
84 else if(
auto const *
const ptr5 =
dynamic_cast< BdVLMInnerProduct const *
>(&input) )
88 else if(
auto const *
const ptr6 =
dynamic_cast< RTInnerProduct const *
>(&input) )
94 GEOS_ERROR( GEOS_FMT(
"mimeticInnerProductDispatch() is not implemented for input of {}",
95 LvArray::system::demangleType( input ) ) );
105 template<
typename LAMBDA >
130 else if(
auto *
const ptr6 =
dynamic_cast< RTInnerProduct *
>(&input) )
136 GEOS_ERROR( GEOS_FMT(
"mimeticInnerProductDispatch() is not implemented for input of {}",
137 LvArray::system::demangleType( input ) ) );
149 template<
typename LAMBDA >
154 if(
auto const *
const ptr1 =
dynamic_cast< TPFAInnerProduct const *
>(&input) )
162 else if(
auto const *
const ptr3 =
dynamic_cast< BdVLMInnerProduct const *
>(&input) )
168 GEOS_ERROR( GEOS_FMT(
"mimeticInnerProductReducedDispatch() is not implemented for input of {}",
169 LvArray::system::demangleType( input ) ) );
181 template<
typename LAMBDA >
200 GEOS_ERROR( GEOS_FMT(
"mimeticInnerProductReducedDispatch() is not supported for input of {}",
201 LvArray::system::demangleType( input ) ) );
#define GEOS_ERROR(...)
Raise a hard error and terminate the program.
void mimeticInnerProductDispatch(MimeticInnerProductBase const &input, LAMBDA &&lambda)
Dispatch for the selection of the mimetic inner product.
void mimeticInnerProductReducedDispatch(MimeticInnerProductBase const &input, LAMBDA &&lambda)
Dispatch for the selection of the mimetic inner product (limited number of possible templates)....
Struct containing the keys to all the implemented inner products.
static constexpr auto QuasiTPFA
string for the quasi-TPFA inner product
static constexpr auto QuasiRT
string for the quasi-RT inner product
static constexpr auto Simple
string for the Simple inner product
static constexpr auto BdVLM
string for the inner product of Beirao da Veiga, Lipnikov, Manzini
static constexpr auto TPFA
string for the TPFA inner product
static constexpr auto RT
string for the Raviart-Thomas inner product (exact RT0 on simplices)