diff --git a/examples/show_gmsh.py b/examples/show_gmsh.py index 0a30d6aa8..66ea1d2f1 100644 --- a/examples/show_gmsh.py +++ b/examples/show_gmsh.py @@ -13,10 +13,9 @@ mesh_file_tri = pathlib.Path("faces/tri/2DChannelTria.msh") mesh_file_quad = pathlib.Path("faces/quad/2DChannelQuad.msh") - base_samples_path = pathlib.Path("samples") - if not base_samples_path.exists(): - load_sample_file.load_sample_file(str(mesh_file_tri)) - load_sample_file.load_sample_file(str(mesh_file_quad)) + base_samples_path = pathlib.Path(__file__).parent / "samples" + load_sample_file.load_sample_file(str(mesh_file_tri)) + load_sample_file.load_sample_file(str(mesh_file_quad)) # load the .msh file directly with the correct io module (meshio) loaded_mesh_tri = io.meshio.load(base_samples_path / mesh_file_tri)