ryujin 2.1.1 revision 336b16a72e829721302c626ec7071b92032b8248
flux.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 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/function.h>
13#include <deal.II/base/parameter_acceptor.h>
14
15#include <string>
16
17namespace ryujin
18{
19 namespace FluxLibrary
20 {
30 class Flux : public dealii::ParameterAcceptor
31 {
32 public:
38 Flux(const std::string &name, const std::string &subsection)
39 /* simply default to three components... */
40 : ParameterAcceptor(subsection + "/" + name)
41 , name_(name)
42 {
44 1.e4 * std::numeric_limits<double>::epsilon();
45 }
46
47
52 virtual double value(double state, unsigned int direction) const = 0;
53
54
59 virtual double gradient(double state, unsigned int direction) const = 0;
60
65
77 ACCESSOR_READ_ONLY(derivative_approximation_delta)
78
79
83 ACCESSOR_READ_ONLY(flux_formula);
84
85 protected:
87 std::string flux_formula_;
88
89 private:
90 const std::string name_;
91 };
92
93 } // namespace FluxLibrary
94} /* namespace ryujin */
std::string flux_formula_
Definition: flux.h:87
double derivative_approximation_delta_
Definition: flux.h:86
Flux(const std::string &name, const std::string &subsection)
Definition: flux.h:38
virtual double value(double state, unsigned int direction) const =0
virtual double gradient(double state, unsigned int direction) const =0