ryujin 2.1.1 revision 9dcb748690310d6a540ebb8b066d1a0834fc7604
hyperbolic_system.template.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: MIT
3// Copyright (C) 2020 - 2023 by the ryujin authors
4//
5
6#pragma once
7
8#include "hyperbolic_system.h"
9
10namespace ryujin
11{
12 namespace ShallowWater
13 {
15 const std::string &subsection /*= "HyperbolicSystem"*/)
16 : ParameterAcceptor(subsection)
17 {
18 gravity_ = 9.81;
19 add_parameter("gravity", gravity_, "Gravitational constant [m/s^2]");
20
21 mannings_ = 0.;
22 add_parameter(
23 "mannings", mannings_, "Roughness coefficient for friction source");
24
25 reference_water_depth_ = 1.;
26 add_parameter("reference water depth",
27 reference_water_depth_,
28 "Problem specific water depth reference");
29
30 dry_state_relaxation_sharp_ = 1.e2;
31 add_parameter("dry state relaxation sharp",
32 dry_state_relaxation_sharp_,
33 "Problem specific dry-state relaxation parameter");
34
35 dry_state_relaxation_mollified_ = 1.e2;
36 add_parameter("dry state relaxation mollified",
37 dry_state_relaxation_mollified_,
38 "Problem specific dry-state relaxation parameter");
39 }
40
41
42#ifndef DOXYGEN
43 template <>
44 const std::array<std::string, 2> HyperbolicSystem::component_names<1>{
45 {"h", "m"}};
46
47
48 template <>
49 const std::array<std::string, 3> HyperbolicSystem::component_names<2>{
50 {"h", "m_1", "m_2"}};
51
52
53 template <>
54 const std::array<std::string, 4> HyperbolicSystem::component_names<3>{
55 {"h", "m_1", "m_2", "m_3"}};
56
57
58 template <>
59 const std::array<std::string, 2>
60 HyperbolicSystem::primitive_component_names<1>{{"h", "v"}};
61
62
63 template <>
64 const std::array<std::string, 3>
65 HyperbolicSystem::primitive_component_names<2>{{"h", "v_1", "v_2"}};
66
67
68 template <>
69 const std::array<std::string, 4>
70 HyperbolicSystem::primitive_component_names<3>{
71 {"h", "v_1", "v_2", "v_3"}};
72
73
74 template <>
75 const std::array<std::string, 1> HyperbolicSystem::precomputed_names<1>{
76 {"eta_m"}};
77
78
79 template <>
80 const std::array<std::string, 1> HyperbolicSystem::precomputed_names<2>{
81 {"eta_m"}};
82
83
84 template <>
85 const std::array<std::string, 1> HyperbolicSystem::precomputed_names<3>{
86 {"eta_m"}};
87
88
89 template <>
90 const std::array<std::string, 1>
91 HyperbolicSystem::precomputed_initial_names<1>{{"bathymetry"}};
92
93
94 template <>
95 const std::array<std::string, 1>
96 HyperbolicSystem::precomputed_initial_names<2>{{"bathymetry"}};
97
98
99 template <>
100 const std::array<std::string, 1>
101 HyperbolicSystem::precomputed_initial_names<3>{{"bathymetry"}};
102#endif
103
104 } // namespace ShallowWater
105} // namespace ryujin
HyperbolicSystem(const std::string &subsection="/HyperbolicSystem")