ryujin 2.1.1 revision 2062b43aae59b7ee510dec4ae666e29d56c4f0be
initial_state_library.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 <compile_time_options.h>
9
10#include "convenience_macros.h"
11
12#include <deal.II/base/parameter_acceptor.h>
13#include <deal.II/base/tensor.h>
14
15#include <set>
16#include <string>
17
18namespace ryujin
19{
32 template <typename Description, int dim, typename Number = double>
33 class InitialState : public dealii::ParameterAcceptor
34 {
35 public:
39 using View =
40 typename Description::template HyperbolicSystemView<dim, Number>;
41
42 using state_type = typename View::state_type;
43 using precomputed_state_type = typename View::precomputed_state_type;
44
50 InitialState(const std::string &name, const std::string &subsection)
51 : ParameterAcceptor(subsection + "/" + name)
52 , name_(name)
53 {
54 }
55
63 virtual state_type compute(const dealii::Point<dim> &point, Number t) = 0;
64
75 initial_precomputations(const dealii::Point<dim> & /*point*/)
76 {
78 }
79
84
85 private:
86 const std::string name_;
87 };
88
89
99 template <typename Description, int dim, typename Number>
101 {
102 public:
107
112 std::set<std::unique_ptr<InitialState<Description, dim, Number>>>;
113
120 static void
122 const HyperbolicSystem &h,
123 const std::string &s);
124 };
125} // namespace ryujin
typename Description::HyperbolicSystem HyperbolicSystem
std::set< std::unique_ptr< InitialState< Description, dim, Number > > > initial_state_list_type
static void populate_initial_state_list(initial_state_list_type &initial_state_list, const HyperbolicSystem &h, const std::string &s)
InitialState(const std::string &name, const std::string &subsection)
virtual precomputed_state_type initial_precomputations(const dealii::Point< dim > &)
typename Description::template HyperbolicSystemView< dim, Number > View
typename View::precomputed_state_type precomputed_state_type
virtual state_type compute(const dealii::Point< dim > &point, Number t)=0
typename View::state_type state_type
#define ACCESSOR_READ_ONLY(member)
Euler::HyperbolicSystem HyperbolicSystem
Definition: description.h:32