/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FV/reconstructor/advection/first_order_reconstructor.hh Source File#

DiFfRG: /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FV/reconstructor/advection/first_order_reconstructor.hh Source File
DiFfRG
Discretization Framework for functional Renormalization Group flows
first_order_reconstructor.hh
Go to the documentation of this file.
1#pragma once
2
3// DiFfRG
5
6namespace DiFfRG
7{
8 namespace def
9 {
10 template <int dim_, typename NumberType> class FirstOrderReconstructor
11 {
12 using ADNumberType = autodiff::Real<1, NumberType>;
13
14 public:
15 static constexpr int dim = dim_;
16 static constexpr int n_faces = 2 * dim;
17 static constexpr int jacobian_stencil_radius = 1;
18
19 template <int n_components>
21 compute_gradient([[maybe_unused]] const dealii::Point<dim> &center_pos,
22 [[maybe_unused]] const std::array<NumberType, n_components> &u_center,
23 [[maybe_unused]] const std::array<dealii::Point<dim>, n_faces> &x_n,
24 [[maybe_unused]] const std::array<std::array<NumberType, n_components>, n_faces> &u_n)
25 {
26 return {};
27 }
28
29 template <int n_components>
31 compute_gradient_at_point([[maybe_unused]] const dealii::Point<dim> &center_pos,
32 [[maybe_unused]] const dealii::Point<dim> &x,
33 [[maybe_unused]] const std::array<NumberType, n_components> &u_center,
34 [[maybe_unused]] const std::array<dealii::Point<dim>, n_faces> &x_n,
35 [[maybe_unused]] const std::array<std::array<NumberType, n_components>, n_faces> &u_n)
36 {
37 return {};
38 }
39
40 template <int n_components>
42 compute_gradient_derivative([[maybe_unused]] const dealii::Point<dim> &center_pos,
43 [[maybe_unused]] const std::array<ADNumberType, n_components> &u_center,
44 [[maybe_unused]] const std::array<dealii::Point<dim>, n_faces> &x_n,
45 [[maybe_unused]] const std::array<std::array<ADNumberType, n_components>, n_faces> &u_n)
46 {
47 return {};
48 }
49
50 template <int n_components>
53 [[maybe_unused]] const dealii::Point<dim> &center_pos, [[maybe_unused]] const dealii::Point<dim> &x,
54 [[maybe_unused]] const std::array<ADNumberType, n_components> &u_center,
55 [[maybe_unused]] const std::array<dealii::Point<dim>, n_faces> &x_n,
56 [[maybe_unused]] const std::array<std::array<ADNumberType, n_components>, n_faces> &u_n)
57 {
58 return {};
59 }
60
61 template <int n_components>
63 [[maybe_unused]] const std::array<dealii::Point<dim>, 4> &x_stencil,
64 [[maybe_unused]] const std::array<std::array<NumberType, n_components>, 4> &u_stencil)
65 {
66 return {};
67 }
68
69 template <int n_components>
71 [[maybe_unused]] const std::array<dealii::Point<dim>, 4> &x_stencil,
72 [[maybe_unused]] const std::array<std::array<ADNumberType, n_components>, 4> &u_stencil)
73 {
74 return {};
75 }
76 };
77
78 static_assert(HasReconstructor<FirstOrderReconstructor<1, double>>);
79 static_assert(HasReconstructor<FirstOrderReconstructor<2, double>>);
80
81 } // namespace def
82} // namespace DiFfRG
Definition first_order_reconstructor.hh:11
static constexpr int jacobian_stencil_radius
Definition first_order_reconstructor.hh:17
autodiff::Real< 1, NumberType > ADNumberType
Definition first_order_reconstructor.hh:12
static GradientType< dim, NumberType, n_components > compute_gradient_derivative(const dealii::Point< dim > &center_pos, const std::array< ADNumberType, n_components > &u_center, const std::array< dealii::Point< dim >, n_faces > &x_n, const std::array< std::array< ADNumberType, n_components >, n_faces > &u_n)
Definition first_order_reconstructor.hh:42
static ThirdDerivativeType< dim, NumberType, n_components > compute_third_derivatives_at_face_derivative(const std::array< dealii::Point< dim >, 4 > &x_stencil, const std::array< std::array< ADNumberType, n_components >, 4 > &u_stencil)
Definition first_order_reconstructor.hh:70
static GradientType< dim, NumberType, n_components > compute_gradient(const dealii::Point< dim > &center_pos, const std::array< NumberType, n_components > &u_center, const std::array< dealii::Point< dim >, n_faces > &x_n, const std::array< std::array< NumberType, n_components >, n_faces > &u_n)
Definition first_order_reconstructor.hh:21
static GradientType< dim, NumberType, n_components > compute_gradient_at_point(const dealii::Point< dim > &center_pos, const dealii::Point< dim > &x, const std::array< NumberType, n_components > &u_center, const std::array< dealii::Point< dim >, n_faces > &x_n, const std::array< std::array< NumberType, n_components >, n_faces > &u_n)
Definition first_order_reconstructor.hh:31
static GradientType< dim, NumberType, n_components > compute_gradient_at_point_derivative(const dealii::Point< dim > &center_pos, const dealii::Point< dim > &x, const std::array< ADNumberType, n_components > &u_center, const std::array< dealii::Point< dim >, n_faces > &x_n, const std::array< std::array< ADNumberType, n_components >, n_faces > &u_n)
Definition first_order_reconstructor.hh:52
static constexpr int n_faces
Definition first_order_reconstructor.hh:16
static ThirdDerivativeType< dim, NumberType, n_components > compute_third_derivatives_at_face(const std::array< dealii::Point< dim >, 4 > &x_stencil, const std::array< std::array< NumberType, n_components >, 4 > &u_stencil)
Definition first_order_reconstructor.hh:62
static constexpr int dim
Definition first_order_reconstructor.hh:15
std::array< dealii::Tensor< 1, dim, NumberType >, n_components > GradientType
Per-component gradient type: one Tensor<1,dim> per solution component.
Definition types.hh:17
std::array< dealii::Tensor< 3, dim, NumberType >, n_components > ThirdDerivativeType
Per-component third spatial derivative type.
Definition types.hh:23
Definition complex_math.hh:10