/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FV/limiter/abstract_limiter.hh Source File#

DiFfRG: /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FV/limiter/abstract_limiter.hh Source File
DiFfRG
Discretization Framework for functional Renormalization Group flows
abstract_limiter.hh
Go to the documentation of this file.
1#pragma once
2
3// standard library
4#include <concepts>
5
6namespace DiFfRG
7{
8 namespace def
9 {
33 template <typename T>
34 concept HasSlopeLimiter = requires(double a, double b) {
35 { T::slope_limit(a, b) } -> std::convertible_to<double>;
36 };
37
38 namespace limiter_utils
39 {
43 template <typename T> int sgn(T val) { return (T{} < val) - (val < T{}); }
44 } // namespace limiter_utils
45
46 } // namespace def
47} // namespace DiFfRG
Concept that any slope-limiter mixin must satisfy.
Definition abstract_limiter.hh:34
int sgn(T val)
Signum helper: returns -1, 0 or +1.
Definition abstract_limiter.hh:43
Definition complex_math.hh:10