Skip to content

Commit

Permalink
Woops, reading mesh twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed Oct 16, 2023
1 parent 31c7029 commit 4887dd6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion meshmode/mesh/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,18 @@ def read_gmsh(
"""
from gmsh_interop.reader import read_gmsh
import time
print(f"Reading gmsh mesh from disk file...")
recv = GmshMeshReceiver(mesh_construction_kwargs=mesh_construction_kwargs)
read_start = time.time()
read_gmsh(recv, filename, force_dimension=force_ambient_dim)
read_finish = time.time()
print(f"Done. Populating meshmode data structures...")
retval = recv.get_mesh(return_tag_to_elements_map=return_tag_to_elements_map)
get_mesh_finish = time.time()
print(f"Done.")
print(f"Read GMSH: {read_finish - read_start}\n"
f"MeshData: {get_mesh_finish - read_finish}")
return recv.get_mesh(return_tag_to_elements_map=return_tag_to_elements_map)
return retval


def generate_gmsh(source, dimensions=None, order=None, other_options=None,
Expand Down

0 comments on commit 4887dd6

Please sign in to comment.