20 #ifndef GEOS_FINITEVOLUME_MIMETICINNERPRODUCTS_MIMETICINNERPRODUCTDISPATCH_HPP_
21 #define GEOS_FINITEVOLUME_MIMETICINNERPRODUCTS_MIMETICINNERPRODUCTDISPATCH_HPP_
29 #include "LvArray/src/system.hpp"
33 namespace mimeticInnerProduct
43 static constexpr
auto TPFA =
"TPFA";
47 static constexpr
auto QuasiRT =
"quasiRT";
49 static constexpr
auto Simple =
"simple";
51 static constexpr
auto BdVLM =
"beiraoDaVeigaLipnikovManzini";
60 template<
typename LAMBDA >
65 if(
auto const *
const ptr1 =
dynamic_cast< TPFAInnerProduct const *
>(&input) )
77 else if(
auto const *
const ptr4 =
dynamic_cast< SimpleInnerProduct const *
>(&input) )
81 else if(
auto const *
const ptr5 =
dynamic_cast< BdVLMInnerProduct const *
>(&input) )
87 GEOS_ERROR(
"mimeticInnerProductDispatch() is not implemented for input of " << LvArray::system::demangleType( input ) );
97 template<
typename LAMBDA >
124 GEOS_ERROR(
"mimeticInnerProductDispatch() is not implemented for input of " << LvArray::system::demangleType( input ) );
136 template<
typename LAMBDA >
141 if(
auto const *
const ptr1 =
dynamic_cast< TPFAInnerProduct const *
>(&input) )
145 else if(
auto const *
const ptr2 =
dynamic_cast< BdVLMInnerProduct const *
>(&input) )
151 GEOS_ERROR(
"mimeticInnerProductReducedDispatch() is not implemented for input of " << LvArray::system::demangleType( input ) );
163 template<
typename LAMBDA >
178 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