|
Peano
|
Functions | |
| exact_density (x, t) | |
| Density of the entropy wave advected with u=1 over [-0.1,0.1]. | |
| solver_name (rk_order) | |
| Name of the solver: EulerFV for rk_order None, EulerFD4 otherwise. | |
| patch_file (directory, rk_order) | |
| build_and_run (rk_order, volume_size, end_time, time_in_between_plots, directory, peano_root) | |
| Generate, compile and run one setup within directory. | |
| snap (offset, size) | |
| Snap a patch's offset and size onto the regular mesh over the domain. | |
| errors (directory, rk_order) | |
| Return a list of (time stamp, max error, rms error) of the density per snapshot. | |
| density_along_x_axis (directory, rk_order, snapshot) | |
| Return time stamp plus grid cell centres and densities along y=0. | |
| label (rk_order) | |
| plot_convergence (runs) | |
| Max error at t=ConvergenceEndTime over the grid cells per axis. | |
| plot_profile (runs) | |
| Density along y=0 after one period on the coarsest mesh. | |
| plot_instability (runs) | |
| Max error over time for the explicit Euler time stepping vs the others. | |
| directory (name) | |
Variables | |
| Here = os.path.dirname(os.path.abspath(__file__)) | |
| PeanoRoot = os.path.abspath(os.path.join(Here, "..", "..", "..")) | |
| str | Flux |
| str | MaxEigenvalue |
| str | InitPointWisely |
| float | DomainOffset = -0.1 |
| float | DomainWidth = 0.2 |
| list | VolumeSizes = [(0.0075, 27), (0.0025, 81), (0.00083, 243)] |
| float | ConvergenceEndTime = 0.05 |
| float | PeriodEndTime = 0.2 |
| dict | RungeKuttaColours = {1: "C3", 2: "C1", 3: "C2", 4: "C0"} |
| parser | |
| default | |
| help | |
| nargs | |
| choices | |
| args = parser.parse_args() | |
| work_directory | |
| dict | runs = {} |
| d | |
| 12_higher-order-solvers.build_and_run | ( | rk_order, | |
| volume_size, | |||
| end_time, | |||
| time_in_between_plots, | |||
| directory, | |||
| peano_root | |||
| ) |
Generate, compile and run one setup within directory.
| rk_order | int or None None selects the Finite Volumes of the tutorial 10_euler, an integer the fourth-order Finite Differences with the Runge-Kutta scheme of this order. |
| peano_root | str Configured and built Peano directory the executable links against. |
Definition at line 123 of file 12_higher-order-solvers.py.
References solver_name().

| 12_higher-order-solvers.density_along_x_axis | ( | directory, | |
| rk_order, | |||
| snapshot | |||
| ) |
Return time stamp plus grid cell centres and densities along y=0.
Definition at line 245 of file 12_higher-order-solvers.py.
References tarch.plotter.api.notebook.read_patches(), tarch.plotter.api.notebook.read_snapshots(), and snap().
Referenced by plot_instability(), and plot_profile().


| 12_higher-order-solvers.directory | ( | name | ) |
Definition at line 443 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.errors | ( | directory, | |
| rk_order | |||
| ) |
Return a list of (time stamp, max error, rms error) of the density per snapshot.
Definition at line 217 of file 12_higher-order-solvers.py.
References exact_density(), tarch.plotter.api.notebook.read_patches(), tarch.plotter.api.notebook.read_snapshots(), and snap().
Referenced by plot_convergence(), and plot_instability().


| 12_higher-order-solvers.exact_density | ( | x, | |
| t | |||
| ) |
Density of the entropy wave advected with u=1 over [-0.1,0.1].
Definition at line 105 of file 12_higher-order-solvers.py.
Referenced by errors(), plot_instability(), and plot_profile().

| 12_higher-order-solvers.label | ( | rk_order | ) |
Definition at line 263 of file 12_higher-order-solvers.py.
Referenced by plot_convergence(), plot_instability(), and plot_profile().

| 12_higher-order-solvers.patch_file | ( | directory, | |
| rk_order | |||
| ) |
Definition at line 117 of file 12_higher-order-solvers.py.
References solver_name().

| 12_higher-order-solvers.plot_convergence | ( | runs | ) |
Max error at t=ConvergenceEndTime over the grid cells per axis.
| runs | dict Maps rk_order (None for Finite Volumes) onto a list of (grid cells per axis, directory). |
Definition at line 269 of file 12_higher-order-solvers.py.
References errors(), and label().

| 12_higher-order-solvers.plot_instability | ( | runs | ) |
Max error over time for the explicit Euler time stepping vs the others.
| runs | list List of (rk_order, directory) on the same mesh. |
Definition at line 372 of file 12_higher-order-solvers.py.
References density_along_x_axis(), errors(), exact_density(), and label().

| 12_higher-order-solvers.plot_profile | ( | runs | ) |
Density along y=0 after one period on the coarsest mesh.
| runs | list List of (rk_order, directory). |
Definition at line 334 of file 12_higher-order-solvers.py.
References density_along_x_axis(), exact_density(), and label().

| 12_higher-order-solvers.snap | ( | offset, | |
| size | |||
| ) |
Snap a patch's offset and size onto the regular mesh over the domain.
The patch files hold offsets and sizes with seven significant digits only. Below an error of roughly 1e-7, this would dominate the error.
Definition at line 203 of file 12_higher-order-solvers.py.
Referenced by density_along_x_axis(), and errors().

| 12_higher-order-solvers.solver_name | ( | rk_order | ) |
Name of the solver: EulerFV for rk_order None, EulerFD4 otherwise.
Definition at line 112 of file 12_higher-order-solvers.py.
Referenced by build_and_run(), and patch_file().

| 12_higher-order-solvers.args = parser.parse_args() |
Definition at line 437 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.choices |
Definition at line 434 of file 12_higher-order-solvers.py.
| float 12_higher-order-solvers.ConvergenceEndTime = 0.05 |
Definition at line 98 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.d |
Definition at line 451 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.default |
Definition at line 422 of file 12_higher-order-solvers.py.
| float 12_higher-order-solvers.DomainOffset = -0.1 |
Definition at line 91 of file 12_higher-order-solvers.py.
| float 12_higher-order-solvers.DomainWidth = 0.2 |
Definition at line 92 of file 12_higher-order-solvers.py.
| str 12_higher-order-solvers.Flux |
Definition at line 51 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.help |
Definition at line 423 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.Here = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 36 of file 12_higher-order-solvers.py.
| str 12_higher-order-solvers.InitPointWisely |
Definition at line 80 of file 12_higher-order-solvers.py.
| str 12_higher-order-solvers.MaxEigenvalue |
Definition at line 71 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.nargs |
Definition at line 432 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.parser |
Definition at line 417 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.PeanoRoot = os.path.abspath(os.path.join(Here, "..", "..", "..")) |
Definition at line 37 of file 12_higher-order-solvers.py.
| float 12_higher-order-solvers.PeriodEndTime = 0.2 |
Definition at line 99 of file 12_higher-order-solvers.py.
| dict 12_higher-order-solvers.RungeKuttaColours = {1: "C3", 2: "C1", 3: "C2", 4: "C0"} |
Definition at line 102 of file 12_higher-order-solvers.py.
| list 12_higher-order-solvers.runs = {} |
Definition at line 447 of file 12_higher-order-solvers.py.
| list 12_higher-order-solvers.VolumeSizes = [(0.0075, 27), (0.0025, 81), (0.00083, 243)] |
Definition at line 96 of file 12_higher-order-solvers.py.
| 12_higher-order-solvers.work_directory |
Definition at line 439 of file 12_higher-order-solvers.py.