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( GEOS_FMT(
"mimeticInnerProductDispatch() is not implemented for input of {}",
88 LvArray::system::demangleType( input ) ) );
98 template<
typename LAMBDA >
125 GEOS_ERROR( GEOS_FMT(
"mimeticInnerProductDispatch() is not implemented for input of {}",
126 LvArray::system::demangleType( input ) ) );
138 template<
typename LAMBDA >
143 if(
auto const *
const ptr1 =
dynamic_cast< TPFAInnerProduct const *
>(&input) )
151 else if(
auto const *
const ptr3 =
dynamic_cast< BdVLMInnerProduct const *
>(&input) )
157 GEOS_ERROR( GEOS_FMT(
"mimeticInnerProductReducedDispatch() is not implemented for input of {}",
158 LvArray::system::demangleType( input ) ) );
170 template<
typename LAMBDA >
189 GEOS_ERROR( GEOS_FMT(
"mimeticInnerProductReducedDispatch() is not supported for input of {}",
190 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