-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'remove_jupyter_notebooks' into 'master'
Remove remaining jupyter notebooks See merge request ogs/ogs!5168
- Loading branch information
Showing
17 changed files
with
1,058 additions
and
2,283 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
118 changes: 0 additions & 118 deletions
118
Tests/Data/Elliptic/cube_1x1x1_SteadyStateDiffusion/ssd-cube.ipynb
This file was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
Tests/Data/Elliptic/cube_1x1x1_SteadyStateDiffusion/ssd-cube.py
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,60 @@ | ||
# --- | ||
# jupyter: | ||
# jupytext: | ||
# text_representation: | ||
# extension: .py | ||
# format_name: percent | ||
# format_version: '1.3' | ||
# jupytext_version: 1.14.5 | ||
# kernelspec: | ||
# display_name: Python 3 (ipykernel) | ||
# language: python | ||
# name: python3 | ||
# --- | ||
|
||
# %% [raw] | ||
# +++ | ||
# title = "SteadyStateDiffusion Cube Test" | ||
# date = "2021-11-09" | ||
# author = "Lars Bilke" | ||
# web_subsection = "elliptic" | ||
# draft = true | ||
# +++ | ||
# | ||
|
||
# %% [markdown] | ||
# This notebook is just for testing and does not show up on the web page because `draft = true` in the metadata. | ||
|
||
# %% | ||
import os | ||
from pathlib import Path | ||
|
||
import pyvista as pv | ||
|
||
# %% | ||
# On CI out_dir is set to the notebooks directory inside the build directory | ||
# similar to regular benchmark tests. On local testing it will output to the | ||
# notebooks source directory under a _out-subdirectory. | ||
out_dir = Path(os.environ.get("OGS_TESTRUNNER_OUT_DIR", "_out")) | ||
if not out_dir.exists(): | ||
out_dir.mkdir(parents=True) | ||
|
||
if "CI" in os.environ: | ||
pv.set_jupyter_backend("static") | ||
else: | ||
pv.set_jupyter_backend("client") | ||
|
||
|
||
# %% | ||
resolution = "2e4" | ||
# ! ogs cube_{resolution}.prj -o {out_dir} > {out_dir}/log.txt | ||
|
||
|
||
# %% | ||
reader = pv.get_reader(f"{out_dir}/cube_{resolution}.pvd") | ||
reader.set_active_time_value(1.0) # go to 1 s | ||
mesh = reader.read()[0] | ||
|
||
plotter = pv.Plotter(notebook=True) | ||
plotter.add_mesh(mesh, scalars="v") # pressure | ||
plotter.show() |
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
Oops, something went wrong.