-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added quick-plot capability and a documentation page.
- Loading branch information
1 parent
7b5b659
commit 56b80df
Showing
8 changed files
with
161 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Quick Plotting | ||
|
||
ASGarD does not have an objective to provide plotting capabilities but rather | ||
the capability to interpret the sparse grid storage formats and to generate | ||
plotting data for actual plotting tools. | ||
After enabling both Python and HighFive (see the installation instruction), | ||
the asgard python module can be used as an executable: | ||
|
||
Get the version, i.e., plot nothing and show only the library build information: | ||
``` | ||
python3 -m asgard | ||
``` | ||
|
||
Quick plot command of the first two dimensions of a stored solution, extra | ||
dimensions will be set to the middle of their min-max ranges: | ||
``` | ||
python3 -m asgard outfile.h5 | ||
``` | ||
The quick plot command will use matplotlib and make a basic image (or 1D curve). | ||
The installed examples show how to obtain the raw data and enable fine grained | ||
control over the plotting format or even use a matplotlib alternatives. | ||
|
||
If matplotlib plot can also be written to an image file, e.g., if the data files | ||
are stored on a remote machine that has matplotlib but no display connection: | ||
``` | ||
python3 -m asgard outfile.h5 outfile.png | ||
``` | ||
Here, `outfile.png` is any supported matplotlib format. | ||
|
||
If matplotlib is missing or we want to skip plotting, we can print only the | ||
file high-level meta data to the console: | ||
``` | ||
python3 -m asgard -s outfile.h5 | ||
``` | ||
The `-s` switch can be replaced with either `-stats` or `-summary`. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# this is just a simple input example | ||
-title : Continuity 2D | ||
-subtitle : sparse grid level 8, quadratic basis | ||
|
||
# df / dt + \div_x f = S | ||
# source chosen to manufacture an exact solution | ||
-pde : continuity_2 | ||
|
||
# disctretization in space | ||
# level 8 sparse grid and quadratic basis | ||
# the grid has 11520 degrees-of-freedom | ||
-grid : sparse | ||
-start-levels : 8 | ||
-degree : 2 | ||
|
||
# explicit time-step, 100 steps | ||
-step-method : expl | ||
-dt : 1.E-4 | ||
-num-steps : 100 | ||
|
||
# final RMSE error | ||
# absolute: 4.55829e-09 | ||
# relative: 3.51175e-05 | ||
# (tested on a random laptop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters