ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
riemann_solver.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2023 - 2024 by the ryujin authors
4//
5
6#pragma once
7
8#include "hyperbolic_system.h"
9
10#include <simd.h>
11
12#include <deal.II/base/point.h>
13#include <deal.II/base/tensor.h>
14
15namespace ryujin
16{
17 namespace Skeleton
18 {
19 template <typename ScalarNumber = double>
20 class RiemannSolverParameters : public dealii::ParameterAcceptor
21 {
22 public:
23 RiemannSolverParameters(const std::string &subsection = "/RiemannSolver")
24 : ParameterAcceptor(subsection)
25 {
26 }
27 };
28
29
38 template <int dim, typename Number = double>
40 {
41 public:
46
48
50
51 using state_type = typename View::state_type;
52
54
56
58
62
66 RiemannSolver(const HyperbolicSystem &hyperbolic_system,
67 const Parameters &parameters,
68 const PrecomputedVector &precomputed_values)
69 : hyperbolic_system(hyperbolic_system)
70 , parameters(parameters)
71 , precomputed_values(precomputed_values)
72 {
73 }
74
79 Number compute(const state_type & /*U_i*/,
80 const state_type & /*U_j*/,
81 const unsigned int /*i*/,
82 const unsigned int * /*js*/,
83 const dealii::Tensor<1, dim, Number> & /*n_ij*/) const
84 {
85 return Number(1.);
86 }
87
88 private:
89 const HyperbolicSystem &hyperbolic_system;
90 const Parameters &parameters;
91 const PrecomputedVector &precomputed_values;
93 };
94 } // namespace Skeleton
95} // namespace ryujin
dealii::Tensor< 1, problem_dimension, Number > state_type
typename get_value_type< Number >::type ScalarNumber
Vectors::MultiComponentVector< ScalarNumber, n_precomputed_values > PrecomputedVector
RiemannSolverParameters(const std::string &subsection="/RiemannSolver")
typename View::ScalarNumber ScalarNumber
typename View::state_type state_type
RiemannSolverParameters< ScalarNumber > Parameters
Number compute(const state_type &, const state_type &, const unsigned int, const unsigned int *, const dealii::Tensor< 1, dim, Number > &) const
typename View::PrecomputedVector PrecomputedVector
RiemannSolver(const HyperbolicSystem &hyperbolic_system, const Parameters &parameters, const PrecomputedVector &precomputed_values)