Peano
Loading...
Searching...
No Matches
advection_linear.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 .scenario import Scenario
4
5import os
6import sys
7
8sys.path.insert(0, os.path.abspath("../equations"))
9from equations import Advection
10
11
13 """
14 Very simple scenario in which the initial value of x is shifted
15 in each spatial dimension.
16 """
17
18 _plot_dt = 0.1
19 _periodic_bc = False
20
21 def __init__(self, dimensions=2):
22 self._dimensions = dimensions
23 self._equation = Advection(dimensions=dimensions)
24
26 return """
27 Q[0] = x[0];
28 Q[1] = x[1];
29#if DIMENSIONS==3
30 Q[2] = x[2];
31#endif
32"""
33
35 return """
36 Qoutside[0] = x[0] - t;
37 Qoutside[1] = x[1] - t;
38#if DIMENSIONS==3
39 Qoutside[2] = x[2] - t;
40#endif
41"""
Very simple scenario in which the initial value of x is shifted in each spatial dimension.