|
Peano
|
Functions | |
| build_and_run (directory) | |
| Generate, compile and run the coupled setup within directory. | |
| read_field (file_name, snapshot, unknown=0) | |
| One unknown of one snapshot as array field[y,x] over the whole domain. | |
| read_time_series (file_name, unknown=0) | |
| Time stamps and an array series[snapshot,y,x] of one unknown. | |
| arrival_times (times, series, threshold) | |
| First time at which the surface elevation exceeds the threshold. | |
| plot_initial_conditions (first_file, second_file, prefix) | |
| plot_arrival_difference (first_file, second_file, prefix, threshold=0.002) | |
Variables | |
| Here = os.path.dirname(os.path.abspath(__file__)) | |
| PeanoRoot = os.path.abspath(os.path.join(Here, "..", "..", "..")) | |
| str | Flux |
| str | MaxEigenvalue |
| str | NonconservativeProduct |
| str | InitialSeaFloor |
| str | InitialWater |
| Bathymetry = os.path.join(Here, "..", "bathymetry") | |
| float | CentreOfFirstTsunami = 0.0 |
| float | CentreOfSecondTsunami = 0.1 |
| parser | |
| default | |
| help | |
| args = parser.parse_args() | |
| work_directory = args.work_directory or tempfile.mkdtemp(prefix="45_coupling-") | |
| first_file = os.path.join(work_directory, "solution-TsunamiA.peano-patch-file") | |
| second_file = os.path.join(work_directory, "solution-TsunamiB.peano-patch-file") | |
| 45_coupling.arrival_times | ( | times, | |
| series, | |||
| threshold ) |
First time at which the surface elevation exceeds the threshold.
The time is interpolated linearly between the two snapshots which enclose the crossing. Volumes which the wave never reaches hold NaN.
Definition at line 173 of file 45_coupling.py.
Referenced by plot_arrival_difference().

| 45_coupling.build_and_run | ( | directory | ) |
Generate, compile and run the coupled setup within directory.
Definition at line 85 of file 45_coupling.py.
| 45_coupling.plot_arrival_difference | ( | first_file, | |
| second_file, | |||
| prefix, | |||
| threshold = 0.002 ) |
Definition at line 205 of file 45_coupling.py.
References arrival_times(), and read_time_series().

| 45_coupling.plot_initial_conditions | ( | first_file, | |
| second_file, | |||
| prefix ) |
Definition at line 192 of file 45_coupling.py.
References tarch.plotter.api.notebook.plot_snapshot().

| 45_coupling.read_field | ( | file_name, | |
| snapshot, | |||
| unknown = 0 ) |
One unknown of one snapshot as array field[y,x] over the whole domain.
Definition at line 146 of file 45_coupling.py.
References tarch.plotter.api.notebook.read_patches(), and tarch.plotter.api.notebook.read_snapshots().
Referenced by read_time_series().


| 45_coupling.read_time_series | ( | file_name, | |
| unknown = 0 ) |
Time stamps and an array series[snapshot,y,x] of one unknown.
Definition at line 165 of file 45_coupling.py.
References read_field(), and tarch.plotter.api.notebook.read_snapshots().
Referenced by plot_arrival_difference().


| 45_coupling.args = parser.parse_args() |
Definition at line 238 of file 45_coupling.py.
| 45_coupling.Bathymetry = os.path.join(Here, "..", "bathymetry") |
Definition at line 78 of file 45_coupling.py.
| float 45_coupling.CentreOfFirstTsunami = 0.0 |
Definition at line 81 of file 45_coupling.py.
| float 45_coupling.CentreOfSecondTsunami = 0.1 |
Definition at line 82 of file 45_coupling.py.
| 45_coupling.default |
Definition at line 235 of file 45_coupling.py.
| 45_coupling.first_file = os.path.join(work_directory, "solution-TsunamiA.peano-patch-file") |
Definition at line 243 of file 45_coupling.py.
| str 45_coupling.Flux |
Definition at line 39 of file 45_coupling.py.
| 45_coupling.help |
Definition at line 236 of file 45_coupling.py.
| 45_coupling.Here = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 25 of file 45_coupling.py.
| str 45_coupling.InitialSeaFloor |
Definition at line 65 of file 45_coupling.py.
| str 45_coupling.InitialWater |
Definition at line 71 of file 45_coupling.py.
| str 45_coupling.MaxEigenvalue |
Definition at line 49 of file 45_coupling.py.
| str 45_coupling.NonconservativeProduct |
Definition at line 56 of file 45_coupling.py.
| 45_coupling.parser |
Definition at line 230 of file 45_coupling.py.
| 45_coupling.PeanoRoot = os.path.abspath(os.path.join(Here, "..", "..", "..")) |
Definition at line 26 of file 45_coupling.py.
| 45_coupling.second_file = os.path.join(work_directory, "solution-TsunamiB.peano-patch-file") |
Definition at line 244 of file 45_coupling.py.
| 45_coupling.work_directory = args.work_directory or tempfile.mkdtemp(prefix="45_coupling-") |
Definition at line 240 of file 45_coupling.py.