You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When checkpointing an unnamed netgen mesh, the default name is not set correctly and should be "DEFAULT_MESH_NAME" per docs.
Steps to Reproduce
Running this example:
from firedrake import *
from netgen.geom2d import SplineGeometry
geo = SplineGeometry()
geo.AddRectangle(p1=(-1, -1),
p2=(1, 1),
bc="rectangle",
leftdomain=1,
rightdomain=0)
ngmsh = geo.GenerateMesh(maxh=0.1)
msh = Mesh(ngmsh)
with CheckpointFile("test.h5", 'w') as afile:
afile.save_mesh(msh)
with CheckpointFile("test.h5", 'r') as afile:
mesh = afile.load_mesh()
# mesh = afile.load_mesh('Default') <- this works
Error message
Traceback (most recent call last):
File "/home/stefano/FiredrakeAdapt/bugExamples/NetgenCheckpointing.py", line 21, in <module>
mesh = afile.load_mesh()
File "petsc4py/PETSc/Log.pyx", line 188, in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
File "petsc4py/PETSc/Log.pyx", line 189, in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
File "/home/stefano/FiredrakeAdapt/firedrake-dec24/src/firedrake/firedrake/checkpointing.py", line 1044, in load_mesh
tmesh_name = self._get_mesh_name_topology_name_map()[name]
KeyError: 'firedrake_default'
The text was updated successfully, but these errors were encountered:
Describe the bug
When checkpointing an unnamed netgen mesh, the default name is not set correctly and should be "DEFAULT_MESH_NAME" per docs.
Steps to Reproduce
Running this example:
Error message
The text was updated successfully, but these errors were encountered: