Skip to content
Snippets Groups Projects
Commit fe2d46ef authored by Florian Zill's avatar Florian Zill
Browse files

omit deletion of temporary files

parent ae3c331c
No related branches found
No related tags found
1 merge request!123[msh2vtu] fix for BHE meshes
...@@ -38,12 +38,7 @@ bhe_mesh( ...@@ -38,12 +38,7 @@ bhe_mesh(
# %% # %%
msh2vtu( msh2vtu(
msh_file, msh_file, output_path=tmp_dir, dim=[1, 3], reindex=True, log_level="ERROR"
output_path=tmp_dir,
rdcd=True,
ogs=True,
dim=[1, 3],
log_level="ERROR",
) )
# %% [markdown] # %% [markdown]
...@@ -69,11 +64,3 @@ p.add_mesh( ...@@ -69,11 +64,3 @@ p.add_mesh(
) )
p.add_mesh(bhe_line, color="r", line_width=3) p.add_mesh(bhe_line, color="r", line_width=3)
p.show() p.show()
# sphinx_gallery_start_ignore
from shutil import rmtree # noqa: E402 # pylint: disable=C0413, C0411
rmtree(tmp_dir)
# sphinx_gallery_end_ignore
...@@ -30,7 +30,6 @@ created: ...@@ -30,7 +30,6 @@ created:
# %% # %%
from pathlib import Path from pathlib import Path
from shutil import rmtree
from tempfile import mkdtemp from tempfile import mkdtemp
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
...@@ -184,11 +183,3 @@ fig = studies.convergence.plot_convergence_error_evolution( ...@@ -184,11 +183,3 @@ fig = studies.convergence.plot_convergence_error_evolution(
# %% # %%
fig = studies.convergence.plot_convergence_order_evolution(evolution_metrics) fig = studies.convergence.plot_convergence_order_evolution(evolution_metrics)
# sphinx_gallery_start_ignore
# Removing the created files to keep the code repository clean for developers.
# If you want to use the created jupyter notebook further, skip this step.
rmtree(temp_dir)
# sphinx_gallery_end_ignore
...@@ -32,7 +32,6 @@ First, the required packages are imported and an output directory is created: ...@@ -32,7 +32,6 @@ First, the required packages are imported and an output directory is created:
# %% # %%
from pathlib import Path from pathlib import Path
from shutil import rmtree
from tempfile import mkdtemp from tempfile import mkdtemp
from IPython.display import HTML from IPython.display import HTML
...@@ -63,9 +62,7 @@ for n_edge_cells in edge_cells: ...@@ -63,9 +62,7 @@ for n_edge_cells in edge_cells:
meshlib.gmsh_meshing.rect( meshlib.gmsh_meshing.rect(
n_edge_cells=n_edge_cells, structured_grid=True, out_name=msh_path n_edge_cells=n_edge_cells, structured_grid=True, out_name=msh_path
) )
msh2vtu.msh2vtu( msh2vtu.msh2vtu(filename=msh_path, output_path=temp_dir, log_level="ERROR")
input_filename=msh_path, output_path=temp_dir, log_level="ERROR"
)
model = ogs.OGS( model = ogs.OGS(
PROJECT_FILE=temp_dir / "default.prj", PROJECT_FILE=temp_dir / "default.prj",
...@@ -135,13 +132,3 @@ convergence.run_convergence_study( ...@@ -135,13 +132,3 @@ convergence.run_convergence_study(
refinement_ratio=2.0, refinement_ratio=2.0,
) )
HTML(workflow.jupyter_to_html(report_name, show_input=True)) HTML(workflow.jupyter_to_html(report_name, show_input=True))
# %%
# sphinx_gallery_start_ignore
# Removing the created files to keep the code repository clean for developers.
# If you want to use the created jupyter notebook further, skip this step.
rmtree(temp_dir)
# sphinx_gallery_end_ignore
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment