ryujin 2.5.0 revision 3a6c8d57210175dea14d8116e1fe878f349f8c1c
Loading...
Searching...
No Matches
initial_state.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2020 - 2026 by the ryujin authors
4//
5
6#pragma once
7
8#include <ryujin/base/compile_time_options.h>
10#include <ryujin/base/library.h>
11
12#include <deal.II/base/parameter_acceptor.h>
13#include <deal.II/base/tensor.h>
14
15#include <string>
16
17namespace ryujin
18{
31 template <typename HyperbolicDescription, int dim, typename Number = double>
32 class InitialState : public dealii::ParameterAcceptor
33 {
34 public:
35 using HyperbolicSystem = typename HyperbolicDescription::HyperbolicSystem;
36 using View = typename HyperbolicSystem::template View<dim, Number>;
37
38 using state_type = typename View::state_type;
39
40 using initial_precomputed_type = typename View::initial_precomputed_type;
41
47 InitialState(const std::string &name, const std::string &subsection)
48 : ParameterAcceptor(subsection + "/" + name)
49 , name_(name)
50 {
51 }
52
60 virtual state_type compute(const dealii::Point<dim> &point, Number t) = 0;
61
71 initial_precomputations(const dealii::Point<dim> & /*point*/)
72 {
74 }
75
80
81 private:
82 const std::string name_;
83 };
84
85
93 template <typename HyperbolicDescription, int dim, typename Number = double>
96 const typename HyperbolicDescription::HyperbolicSystem &,
97 const std::string &>;
98} // namespace ryujin
typename HyperbolicSystem::template View< dim, Number > View
typename View::initial_precomputed_type initial_precomputed_type
typename View::state_type state_type
virtual initial_precomputed_type initial_precomputations(const dealii::Point< dim > &)
virtual state_type compute(const dealii::Point< dim > &point, Number t)=0
InitialState(const std::string &name, const std::string &subsection)
typename HyperbolicDescription::HyperbolicSystem HyperbolicSystem
#define ACCESSOR_READ_ONLY(member)