ryujin 2.1.1 revision b04fb4aba7bd97ddfa5994a6b4b6e8586eb15db2
Loading...
Searching...
No Matches
parabolic_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 <compile_time_options.h>
10
11#include <ryujin/interface/parabolic_system.h>
12
13#include <deal.II/base/function_parser.h>
14#include <deal.II/base/parameter_acceptor.h>
15#include <deal.II/base/tensor.h>
16
17
18namespace ryujin
19{
20 namespace EulerPoisson
21 {
29 class ParabolicSystem final : public Interface::ParabolicSystem
30 {
31 public:
32 ParabolicSystem(const std::string &subsection = "/ParabolicSystem");
33
37 static constexpr bool is_identity = false;
38
40
41 ACCESSOR_READ_ONLY(magnetic_drift_limit);
42
43 ACCESSOR_READ_ONLY(electrostatic_configuration);
44
45 ACCESSOR_READ_ONLY(subsection);
46
47 private:
48 double alpha_;
49 bool magnetic_drift_limit_;
50 std::string subsection_;
51
52 std::string electrostatic_configuration_;
53 };
54
55
56 inline ParabolicSystem::ParabolicSystem(const std::string &subsection)
57 : Interface::ParabolicSystem(
58 "Electrostatic force model with background magnetic field",
59 /* the electrostatic potential */
60 {{{"phi"}, {"phi"}, {"phi"}}},
61 {},
62 subsection)
63 , subsection_(subsection)
64 {
65 alpha_ = 1.0;
66 add_parameter("alpha", alpha_, "The coupling constant alpha");
67
68 magnetic_drift_limit_ = false;
69 add_parameter("set up magnetic drift limit",
70 magnetic_drift_limit_,
71 "If set to true, then the velocity field is initialized to "
72 "satisfy the magnetic drift limit.");
73
74 electrostatic_configuration_ = "constant";
75 add_parameter(
76 "electrostatic configuration",
77 electrostatic_configuration_,
78 "Valid names are given by any of the subsections defined below");
79 }
80
81 } // namespace EulerPoisson
82} // namespace ryujin
#define ACCESSOR_READ_ONLY(member)