Peano
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
3 from .equation import Equation
4 
5 
7  def __init__(self, dimensions, adv_speed=1.0):
8  self.dimensionsdimensionsdimensions = dimensions
9  self.num_unknownsnum_unknownsnum_unknowns = 2 if dimensions == 2 else 3
10  self.num_auxiliary_variablesnum_auxiliary_variablesnum_auxiliary_variables = 0
11  self.adv_speedadv_speed = adv_speed
12  self.is_linearis_linearis_linear = True
13 
14  def eigenvalues(self):
15  return (
16  """
17  constexpr double v = """
18  + str(self.adv_speedadv_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_speedadv_speed)
35  + """ * Q[normal];
36 """
37  )
def __init__(self, dimensions, adv_speed=1.0)
Definition: advection.py:7
str
Definition: ccz4.py:55