Peano
Loading...
Searching...
No Matches
advection.py
Go to the documentation of this file.
1# This file is part of the ExaHyPE2 project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3from .equation import Equation
4
5
7 def __init__(self, dimensions, adv_speed=1.0):
8 self.dimensionsdimensions = dimensions
9 self.num_unknownsnum_unknowns = 2 if dimensions == 2 else 3
11 self.adv_speed = adv_speed
13
14 def eigenvalues(self):
15 return (
16 """
17 constexpr double v = """
18 + str(self.adv_speed)
19 + """;
20 return v;
21"""
22 )
23
24 def flux(self):
25 return (
26 """
27 F[0] = 0.0;
28 F[1] = 0.0;
29#if Dimensions == 3
30 F[2] = 0.0;
31#endif
32
33 F[normal] = """
34 + str(self.adv_speed)
35 + """ * Q[normal];
36"""
37 )
__init__(self, dimensions, adv_speed=1.0)
Definition advection.py:7