ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
flux.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2023 - 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/function.h>
12#include <deal.II/base/parameter_acceptor.h>
13
14#include <string>
15
16namespace ryujin
17{
27 class Flux : public dealii::ParameterAcceptor
28 {
29 public:
35 Flux(const std::string &name, const std::string &subsection)
36 /* simply default to three components... */
37 : ParameterAcceptor(subsection + "/" + name)
38 , name_(name)
39 {
41 1.e4 * std::numeric_limits<double>::epsilon();
42 }
43
44
49 virtual double value(double state, unsigned int direction) const = 0;
50
51
56 virtual double gradient(double state, unsigned int direction) const = 0;
57
62
74 ACCESSOR_READ_ONLY(derivative_approximation_delta)
75
76
80 ACCESSOR_READ_ONLY(flux_formula);
81
82 protected:
84 std::string flux_formula_;
85
86 private:
87 const std::string name_;
88 };
89} // namespace ryujin
Flux(const std::string &name, const std::string &subsection)
Definition flux.h:35
virtual double gradient(double state, unsigned int direction) const =0
std::string flux_formula_
Definition flux.h:84
virtual double value(double state, unsigned int direction) const =0
double derivative_approximation_delta_
Definition flux.h:83
ACCESSOR_READ_ONLY(name)
#define ACCESSOR_READ_ONLY(member)