ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
limiter.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2026 by the ryujin authors
4//
5
6#pragma once
7
8#include <ryujin/base/compile_time_options.h>
10
11#include <deal.II/base/tensor.h>
12
13#include <array>
14#include <concepts>
15#include <string>
16#include <tuple>
17
18namespace ryujin
19{
20 namespace Concept
21 {
27 template <typename V, int dim, typename Number>
28 concept LimiterView =
29 std::same_as<typename V::Bounds, std::array<Number, V::n_bounds>> &&
30 requires(V view,
31 const V &const_view,
32 const typename V::PrecomputedVectorView &precomputed,
33 const typename V::state_type &U,
34 const typename V::flux_contribution_type &flux,
35 const typename V::Bounds &bounds,
36 const dealii::Tensor<1, dim, Number> &scaled_c_ij,
37 const unsigned int i,
38 const unsigned int *js,
39 const Number hd_i) {
40 {
41 const_view.iterations()
42 } -> std::convertible_to<unsigned int>;
43
44 /* Used by HyperbolicModule::forward_euler_step(): */
45 view.reset(precomputed, i, U, flux);
46 view.accumulate(precomputed, js, U, flux, scaled_c_ij, U);
47 {
48 const_view.bounds(hd_i)
49 } -> std::same_as<typename V::Bounds>;
50 {
51 const_view.limit(bounds, U, U)
52 } -> std::same_as<std::tuple<Number, bool>>;
53
54 /* Used by SolutionTransfer: */
55 {
56 const_view.projection_bounds_from_state(precomputed, i, U)
57 } -> std::same_as<typename V::Bounds>;
58 {
59 const_view.combine_bounds(bounds, bounds)
60 } -> std::same_as<typename V::Bounds>;
61 {
62 const_view.fully_relax_bounds(bounds, hd_i)
63 } -> std::same_as<typename V::Bounds>;
64 };
65
66
73 template <typename T, typename System, int dim, typename Number>
74 concept Limiter =
75 std::constructible_from<T, const System &, const std::string &> &&
77 } // namespace Concept
78} // namespace ryujin