19 #ifndef GEOS_FINITEVOLUME_MIMETICINNERPRODUCTS_MIMETICINNERPRODUCTDISPATCH_HPP_
20 #define GEOS_FINITEVOLUME_MIMETICINNERPRODUCTS_MIMETICINNERPRODUCTDISPATCH_HPP_
28 #include "LvArray/src/system.hpp"
32 namespace mimeticInnerProduct
42 static constexpr
auto TPFA =
"TPFA";
46 static constexpr
auto QuasiRT =
"quasiRT";
48 static constexpr
auto Simple =
"simple";
50 static constexpr
auto BdVLM =
"beiraoDaVeigaLipnikovManzini";
59 template<
typename LAMBDA >
64 if(
auto const *
const ptr1 =
dynamic_cast< TPFAInnerProduct const *
>(&input) )
76 else if(
auto const *
const ptr4 =
dynamic_cast< SimpleInnerProduct const *
>(&input) )
80 else if(
auto const *
const ptr5 =
dynamic_cast< BdVLMInnerProduct const *
>(&input) )
86 GEOS_ERROR(
"mimeticInnerProductDispatch() is not implemented for input of " << LvArray::system::demangleType( input ) );
96 template<
typename LAMBDA >
123 GEOS_ERROR(
"mimeticInnerProductDispatch() is not implemented for input of " << LvArray::system::demangleType( input ) );
135 template<
typename LAMBDA >
140 if(
auto const *
const ptr1 =
dynamic_cast< TPFAInnerProduct const *
>(&input) )
144 else if(
auto const *
const ptr2 =
dynamic_cast< BdVLMInnerProduct const *
>(&input) )
150 GEOS_ERROR(
"mimeticInnerProductReducedDispatch() is not implemented for input of " << LvArray::system::demangleType( input ) );
162 template<
typename LAMBDA >
177 GEOS_ERROR(
"mimeticInnerProductReducedDispatch() is not supported for input of " << LvArray::system::demangleType( input ) );
#define GEOS_ERROR(msg)
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