ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
hyperbolic_system.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/exceptions.h>
12#include <deal.II/base/parameter_acceptor.h>
13
14#include <array>
15#include <string>
16#include <vector>
17
18namespace ryujin
19{
20 namespace Interface
21 {
40 class HyperbolicSystem : public dealii::ParameterAcceptor
41 {
42 public:
46 ACCESSOR_READ_ONLY(problem_name)
47
48
51 using Names = std::array<std::vector<std::string>, 3>;
52
58 const std::vector<std::string> &state_names(const unsigned int dim) const
59 {
60 AssertIndexRange(dim - 1, 3);
61 return state_names_[dim - 1];
62 }
63
69 const std::vector<std::string> &
70 precomputed_names(const unsigned int dim) const
71 {
72 AssertIndexRange(dim - 1, 3);
73 return precomputed_names_[dim - 1];
74 }
75
81 const std::vector<std::string> &
82 primitive_names(const unsigned int dim) const
83 {
84 AssertIndexRange(dim - 1, 3);
85 return primitive_names_[dim - 1];
86 }
87
96 const std::vector<std::string> &
97 initial_precomputed_names(const unsigned int dim) const
98 {
99 AssertIndexRange(dim - 1, 3);
100 return initial_precomputed_names_[dim - 1];
101 }
102
103 protected:
107 HyperbolicSystem(const std::string &problem_name,
108 const Names &state_names,
109 const Names &primitive_names,
112 const std::string &subsection)
113 : ParameterAcceptor(subsection)
114 , problem_name_(problem_name)
119 {
120 }
121
128 std::string problem_name_;
129
137
145
153
161 };
162 } // namespace Interface
163} // namespace ryujin
const std::vector< std::string > & state_names(const unsigned int dim) const
const std::vector< std::string > & initial_precomputed_names(const unsigned int dim) const
HyperbolicSystem(const std::string &problem_name, const Names &state_names, const Names &primitive_names, const Names &precomputed_names, const Names &initial_precomputed_names, const std::string &subsection)
const std::vector< std::string > & precomputed_names(const unsigned int dim) const
const std::vector< std::string > & primitive_names(const unsigned int dim) const
std::array< std::vector< std::string >, 3 > Names
#define ACCESSOR_READ_ONLY(member)