HasSlopeLimiter Concept Reference#

DiFfRG: DiFfRG::def::HasSlopeLimiter Concept Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::def::HasSlopeLimiter Concept Reference

Concept that any slope-limiter mixin must satisfy. More...

#include <abstract_limiter.hh>

Concept definition

template<typename T>
concept DiFfRG::def::HasSlopeLimiter = requires(double a, double b) {
{ T::slope_limit(a, b) } -> std::convertible_to<double>;
}
Concept that any slope-limiter mixin must satisfy.
Definition abstract_limiter.hh:34

Detailed Description

Concept that any slope-limiter mixin must satisfy.

A limiter class must provide a static slope_limit method accepting two slopes and returning a limited slope value. The assembler uses this concept to produce clear compile errors when a model does not provide a limiter.

New limiters only need to satisfy this concept:

class MyLimiter
{
public:
template <typename NumberType>
static NumberType slope_limit(const NumberType &du_1,
const NumberType &du_2)
{
// …
}
};
static_assert(HasSlopeLimiter<MyLimiter>);