|
Peano
|
Functions | |
| create_solver (adaptive, dynamic=False, gradient=False) | |
| The tutorial's solver over a regular, an adaptive or a dynamically adaptive mesh. | |
| build_and_run (directory, adaptive=False, dynamic=False, gradient=False) | |
| Generate, compile and run the tutorial setup within directory. | |
| build_and_run_fd4 (directory, init_point_wisely) | |
| Generate, compile and run the fourth-order Finite Differences over the regular mesh within directory. | |
| read_snapshot (directory, snapshot, patch_file=PatchFile) | |
| Return the time stamp and all patches (offset, size, values) of a snapshot. | |
| number_of_snapshots (directory, patch_file=PatchFile) | |
| density_along_x_axis (directory, snapshot, patch_file=PatchFile) | |
| Return time stamp plus volume centres and densities along y=0, x>=0. | |
| plot_mesh (directory) | |
| Initial density plus the patch boundaries. | |
| plot_snapshots (directory) | |
| Density at three time stamps side by side. | |
| plot_profile (directory) | |
| Density along the positive x-axis at a few time stamps. | |
| plot_active_patches (directory) | |
| Highlight the patches which hold steep density gradients at the end. | |
| plot_adaptive_mesh (directory) | |
| Initial density on the adaptive mesh plus the patch boundaries. | |
| plot_adaptive_snapshots (directory) | |
| Density at three time stamps on the adaptive mesh plus patch boundaries. | |
| plot_profile_comparison (regular_directory, adaptive_directory) | |
| Density along the positive x-axis: regular against adaptive mesh. | |
| print_conservation (directory) | |
| Total mass and energy of the first and the last snapshot. | |
| plot_setup_task_graph () | |
| Construct the setup task graph with the refinement criterion and draw it. | |
| patch_counts (directory) | |
| Time stamps and numbers of patches of all snapshots. | |
| plot_dynamic_patch_count (directory) | |
| Number of patches per snapshot of the dynamically adaptive run. | |
| plot_dynamic_mesh_change (directory) | |
| Density and patch boundaries right before the first mesh change and at the end. | |
| gradient_snapshots (directory) | |
| Snapshots for the comparison of the point-wise and the gradient-based criterion: t=0.1, 0.2 and 0.25. | |
| plot_gradient_profile_comparison (pointwise_directory, gradient_directory) | |
| Density along the positive x-axis: point-wise against gradient-based criterion. | |
| plot_gradient_patch_counts (pointwise_directory, gradient_directory) | |
| Number of patches per snapshot of both dynamically adaptive runs. | |
| plot_gradient_mesh (pointwise_directory, gradient_directory) | |
| Density and patch boundaries of both runs at t=0.2. | |
| create_gradient_pictures (dynamic_directory, gradient_directory, skip_run) | |
| Run the gradient-based criterion and compare it to the point-wise one. | |
| plot_fd4_explosion_time_step_sizes (directory) | |
| Time step sizes of the fourth-order Finite Differences for the point explosion. | |
| plot_fd4_snapshots (directory) | |
| Density of the Gaussian pulse at three time stamps side by side. | |
| plot_fd4_profile (directory) | |
| Density of the Gaussian pulse along the positive x-axis at a few time stamps. | |
| plot_mesh_adaptation_task_graph () | |
| Construct the mesh adaptation task graph of the dynamically adaptive setup and draw it. | |
Variables | |
| Here = os.path.dirname(os.path.abspath(__file__)) | |
| PeanoRoot = os.path.abspath(os.path.join(Here, "..", "..", "..")) | |
| str | Flux |
| str | MaxEigenvalue |
| str | InitPointWisely |
| float | VolumeSize = 0.005 |
| float | AdaptiveVolumeSize = 0.02 |
| float | AdaptiveMinVolumeSize = 0.002 |
| str | RefineErasePointwisely |
| str | DynamicRefineErasePointwisely |
| str | GradientRefinement |
| float | EndTime = 0.2 |
| float | DynamicEndTime = 0.3 |
| float | TimeInBetweenPlots = 0.01 |
| str | PatchFile = "solution-EulerFV.peano-patch-file" |
| str | FD4InitPointWisely |
| str | FD4PatchFile = "solution-EulerFD4.peano-patch-file" |
| parser | |
| default | |
| help | |
| action | |
| args = parser.parse_args() | |
| work_directory | |
| dynamic_directory = os.path.join(work_directory, "dynamic-mesh") | |
| gradient_directory = os.path.join(work_directory, "gradient-mesh") | |
| exist_ok | |
| adaptive | |
| True | |
| dynamic | |
| fd4_explosion_directory = os.path.join(work_directory, "fd4-explosion") | |
| fd4_pulse_directory = os.path.join(work_directory, "fd4-pulse") | |
| directory = os.path.join(work_directory, "regular-grid") | |
| adaptive_directory = os.path.join(work_directory, "adaptive-mesh") | |
| 13_euler-with-amr.build_and_run | ( | directory, | |
adaptive = False, |
|||
dynamic = False, |
|||
gradient = False |
|||
| ) |
Generate, compile and run the tutorial setup within directory.
Definition at line 185 of file 13_euler-with-amr.py.
References create_solver().
Referenced by create_gradient_pictures().


| 13_euler-with-amr.build_and_run_fd4 | ( | directory, | |
| init_point_wisely | |||
| ) |
Generate, compile and run the fourth-order Finite Differences over the regular mesh within directory.
The run writes its output into directory/run.log, so we can parse the time step sizes afterwards. A run of the point explosion breaks down early, so we do not check its exit code.
Definition at line 211 of file 13_euler-with-amr.py.
| 13_euler-with-amr.create_gradient_pictures | ( | dynamic_directory, | |
| gradient_directory, | |||
| skip_run | |||
| ) |
Run the gradient-based criterion and compare it to the point-wise one.
Expects the point-wise dynamically adaptive run within dynamic_directory.
Definition at line 755 of file 13_euler-with-amr.py.
References build_and_run(), plot_gradient_mesh(), plot_gradient_patch_counts(), plot_gradient_profile_comparison(), and print_conservation().

| 13_euler-with-amr.create_solver | ( | adaptive, | |
dynamic = False, |
|||
gradient = False |
|||
| ) |
The tutorial's solver over a regular, an adaptive or a dynamically adaptive mesh.
With gradient, the solver refines and erases with the gradient-based criterion instead of the point-wise one. The flag implies a dynamically adaptive mesh.
Definition at line 126 of file 13_euler-with-amr.py.
Referenced by build_and_run(), plot_mesh_adaptation_task_graph(), and plot_setup_task_graph().

| 13_euler-with-amr.density_along_x_axis | ( | directory, | |
| snapshot, | |||
patch_file = PatchFile |
|||
| ) |
Return time stamp plus volume centres and densities along y=0, x>=0.
Definition at line 281 of file 13_euler-with-amr.py.
References read_snapshot().
Referenced by plot_fd4_profile(), plot_gradient_profile_comparison(), plot_profile(), and plot_profile_comparison().


| 13_euler-with-amr.gradient_snapshots | ( | directory | ) |
Snapshots for the comparison of the point-wise and the gradient-based criterion: t=0.1, 0.2 and 0.25.
We stop before t=0.3, as the shock then reaches the periodic boundary.
Definition at line 632 of file 13_euler-with-amr.py.
References patch_counts().
Referenced by plot_gradient_mesh(), and plot_gradient_profile_comparison().


| 13_euler-with-amr.number_of_snapshots | ( | directory, | |
patch_file = PatchFile |
|||
| ) |
Definition at line 275 of file 13_euler-with-amr.py.
References tarch.plotter.api.notebook.read_snapshots().
Referenced by patch_counts(), plot_active_patches(), plot_adaptive_snapshots(), plot_fd4_profile(), plot_fd4_snapshots(), plot_profile(), plot_profile_comparison(), plot_snapshots(), and print_conservation().


| 13_euler-with-amr.patch_counts | ( | directory | ) |
Time stamps and numbers of patches of all snapshots.
Definition at line 565 of file 13_euler-with-amr.py.
References number_of_snapshots(), and read_snapshot().
Referenced by gradient_snapshots(), plot_dynamic_mesh_change(), plot_dynamic_patch_count(), and plot_gradient_patch_counts().


| 13_euler-with-amr.plot_active_patches | ( | directory | ) |
Highlight the patches which hold steep density gradients at the end.
A patch counts as active if the largest density jump between two neighbouring volumes within the patch exceeds 20% of the largest such jump in the whole domain. This is the kind of quantity a refinement criterion would look at.
Definition at line 371 of file 13_euler-with-amr.py.
References number_of_snapshots(), tarch.plotter.api.notebook.plot_snapshot(), and read_snapshot().

| 13_euler-with-amr.plot_adaptive_mesh | ( | directory | ) |
Initial density on the adaptive mesh plus the patch boundaries.
Definition at line 425 of file 13_euler-with-amr.py.
References tarch.plotter.api.notebook.plot_snapshot(), and read_snapshot().

| 13_euler-with-amr.plot_adaptive_snapshots | ( | directory | ) |
Density at three time stamps on the adaptive mesh plus patch boundaries.
Definition at line 455 of file 13_euler-with-amr.py.
References number_of_snapshots(), tarch.plotter.api.notebook.plot_snapshot(), and read_snapshot().

| 13_euler-with-amr.plot_dynamic_mesh_change | ( | directory | ) |
Density and patch boundaries right before the first mesh change and at the end.
Definition at line 592 of file 13_euler-with-amr.py.
References patch_counts(), tarch.plotter.api.notebook.plot_snapshot(), and read_snapshot().

| 13_euler-with-amr.plot_dynamic_patch_count | ( | directory | ) |
Number of patches per snapshot of the dynamically adaptive run.
Definition at line 575 of file 13_euler-with-amr.py.
References patch_counts().

| 13_euler-with-amr.plot_fd4_explosion_time_step_sizes | ( | directory | ) |
Time step sizes of the fourth-order Finite Differences for the point explosion.
Definition at line 772 of file 13_euler-with-amr.py.
| 13_euler-with-amr.plot_fd4_profile | ( | directory | ) |
Density of the Gaussian pulse along the positive x-axis at a few time stamps.
Definition at line 819 of file 13_euler-with-amr.py.
References density_along_x_axis(), and number_of_snapshots().

| 13_euler-with-amr.plot_fd4_snapshots | ( | directory | ) |
Density of the Gaussian pulse at three time stamps side by side.
Definition at line 799 of file 13_euler-with-amr.py.
References number_of_snapshots(), and tarch.plotter.api.notebook.plot_snapshot().

| 13_euler-with-amr.plot_gradient_mesh | ( | pointwise_directory, | |
| gradient_directory | |||
| ) |
Density and patch boundaries of both runs at t=0.2.
We zoom into the upper right quadrant, as the boundaries of the fine patches would otherwise hide the solution.
Definition at line 705 of file 13_euler-with-amr.py.
References gradient_snapshots(), tarch.plotter.api.notebook.plot_snapshot(), and read_snapshot().
Referenced by create_gradient_pictures().


| 13_euler-with-amr.plot_gradient_patch_counts | ( | pointwise_directory, | |
| gradient_directory | |||
| ) |
Number of patches per snapshot of both dynamically adaptive runs.
Definition at line 683 of file 13_euler-with-amr.py.
References patch_counts().
Referenced by create_gradient_pictures().


| 13_euler-with-amr.plot_gradient_profile_comparison | ( | pointwise_directory, | |
| gradient_directory | |||
| ) |
Density along the positive x-axis: point-wise against gradient-based criterion.
Definition at line 647 of file 13_euler-with-amr.py.
References density_along_x_axis(), and gradient_snapshots().
Referenced by create_gradient_pictures().


| 13_euler-with-amr.plot_mesh | ( | directory | ) |
Initial density plus the patch boundaries.
Definition at line 299 of file 13_euler-with-amr.py.
References tarch.plotter.api.notebook.plot_snapshot(), and read_snapshot().

| 13_euler-with-amr.plot_mesh_adaptation_task_graph | ( | ) |
Construct the mesh adaptation task graph of the dynamically adaptive setup and draw it.
Definition at line 854 of file 13_euler-with-amr.py.
References create_solver().

| 13_euler-with-amr.plot_profile | ( | directory | ) |
Density along the positive x-axis at a few time stamps.
Definition at line 341 of file 13_euler-with-amr.py.
References density_along_x_axis(), and number_of_snapshots().

| 13_euler-with-amr.plot_profile_comparison | ( | regular_directory, | |
| adaptive_directory | |||
| ) |
Density along the positive x-axis: regular against adaptive mesh.
Definition at line 487 of file 13_euler-with-amr.py.
References density_along_x_axis(), and number_of_snapshots().

| 13_euler-with-amr.plot_setup_task_graph | ( | ) |
Construct the setup task graph with the refinement criterion and draw it.
Definition at line 541 of file 13_euler-with-amr.py.
References create_solver().

| 13_euler-with-amr.plot_snapshots | ( | directory | ) |
Density at three time stamps side by side.
Definition at line 321 of file 13_euler-with-amr.py.
References number_of_snapshots(), and tarch.plotter.api.notebook.plot_snapshot().

| 13_euler-with-amr.print_conservation | ( | directory | ) |
Total mass and energy of the first and the last snapshot.
Definition at line 526 of file 13_euler-with-amr.py.
References number_of_snapshots(), and read_snapshot().
Referenced by create_gradient_pictures().


| 13_euler-with-amr.read_snapshot | ( | directory, | |
| snapshot, | |||
patch_file = PatchFile |
|||
| ) |
Return the time stamp and all patches (offset, size, values) of a snapshot.
Definition at line 263 of file 13_euler-with-amr.py.
References tarch.plotter.api.notebook.read_patches(), and tarch.plotter.api.notebook.read_snapshots().
Referenced by density_along_x_axis(), patch_counts(), plot_active_patches(), plot_adaptive_mesh(), plot_adaptive_snapshots(), plot_dynamic_mesh_change(), plot_gradient_mesh(), plot_mesh(), and print_conservation().


| 13_euler-with-amr.action |
Definition at line 894 of file 13_euler-with-amr.py.
| 13_euler-with-amr.adaptive |
Definition at line 923 of file 13_euler-with-amr.py.
| 13_euler-with-amr.adaptive_directory = os.path.join(work_directory, "adaptive-mesh") |
Definition at line 958 of file 13_euler-with-amr.py.
| float 13_euler-with-amr.AdaptiveMinVolumeSize = 0.002 |
Definition at line 94 of file 13_euler-with-amr.py.
| float 13_euler-with-amr.AdaptiveVolumeSize = 0.02 |
Definition at line 93 of file 13_euler-with-amr.py.
| 13_euler-with-amr.args = parser.parse_args() |
Definition at line 907 of file 13_euler-with-amr.py.
| 13_euler-with-amr.default |
Definition at line 889 of file 13_euler-with-amr.py.
| 13_euler-with-amr.directory = os.path.join(work_directory, "regular-grid") |
Definition at line 947 of file 13_euler-with-amr.py.
| 13_euler-with-amr.dynamic |
Definition at line 923 of file 13_euler-with-amr.py.
| 13_euler-with-amr.dynamic_directory = os.path.join(work_directory, "dynamic-mesh") |
Definition at line 912 of file 13_euler-with-amr.py.
| float 13_euler-with-amr.DynamicEndTime = 0.3 |
Definition at line 108 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.DynamicRefineErasePointwisely |
Definition at line 98 of file 13_euler-with-amr.py.
| float 13_euler-with-amr.EndTime = 0.2 |
Definition at line 107 of file 13_euler-with-amr.py.
| 13_euler-with-amr.exist_ok |
Definition at line 915 of file 13_euler-with-amr.py.
| 13_euler-with-amr.fd4_explosion_directory = os.path.join(work_directory, "fd4-explosion") |
Definition at line 928 of file 13_euler-with-amr.py.
| 13_euler-with-amr.fd4_pulse_directory = os.path.join(work_directory, "fd4-pulse") |
Definition at line 929 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.FD4InitPointWisely |
Definition at line 112 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.FD4PatchFile = "solution-EulerFD4.peano-patch-file" |
Definition at line 123 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.Flux |
Definition at line 51 of file 13_euler-with-amr.py.
| 13_euler-with-amr.gradient_directory = os.path.join(work_directory, "gradient-mesh") |
Definition at line 913 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.GradientRefinement |
Definition at line 102 of file 13_euler-with-amr.py.
| 13_euler-with-amr.help |
Definition at line 890 of file 13_euler-with-amr.py.
| 13_euler-with-amr.Here = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 35 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.InitPointWisely |
Definition at line 80 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.MaxEigenvalue |
Definition at line 71 of file 13_euler-with-amr.py.
| 13_euler-with-amr.parser |
Definition at line 884 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.PatchFile = "solution-EulerFV.peano-patch-file" |
Definition at line 110 of file 13_euler-with-amr.py.
| 13_euler-with-amr.PeanoRoot = os.path.abspath(os.path.join(Here, "..", "..", "..")) |
Definition at line 36 of file 13_euler-with-amr.py.
| str 13_euler-with-amr.RefineErasePointwisely |
Definition at line 95 of file 13_euler-with-amr.py.
| float 13_euler-with-amr.TimeInBetweenPlots = 0.01 |
Definition at line 109 of file 13_euler-with-amr.py.
| 13_euler-with-amr.True |
Definition at line 923 of file 13_euler-with-amr.py.
| float 13_euler-with-amr.VolumeSize = 0.005 |
Definition at line 92 of file 13_euler-with-amr.py.
| 13_euler-with-amr.work_directory |
Definition at line 909 of file 13_euler-with-amr.py.