Skip to content

Simplify MeshGeometry initialisation#4583

Merged
dham merged 9 commits intomainfrom
connorjward/unify-mesh
Mar 5, 2026
Merged

Simplify MeshGeometry initialisation#4583
dham merged 9 commits intomainfrom
connorjward/unify-mesh

Conversation

@connorjward
Copy link
Copy Markdown
Contributor

@connorjward connorjward commented Sep 23, 2025

This seems tractable now that mesh.init is gone. This is part of a wider refactor that I want to do but this seems like a good start.

Key contributions:

  • Remove MeshGeometryCargo
  • Remove MeshGeometry.__new__, now we just have MeshGeometry.__init__ that we treat normally

The only really ick thing that I have had to do is to do with what happens when we have multiple cell types. The code I've written is not nice but all it is really doing is making the existing situation more explicit. I don't consider that to be something that needs fixing in this PR.

@connorjward
Copy link
Copy Markdown
Contributor Author

The only failures now are some quite inscrutable IO ones with errors like:

2	[0] DMPlexSectionLoad() at /__w/firedrake/firedrake/petsc/src/dm/impls/plex/plex.c:2660
2	[0] DMPlexSectionLoad_HDF5_Internal() at /__w/firedrake/firedrake/petsc/src/dm/impls/plex/hdf5/plexhdf5.c:2972
2	[0] ISLoad() at /__w/firedrake/firedrake/petsc/src/vec/is/is/interface/index.c:1673
2	[0] ISLoad_Default() at /__w/firedrake/firedrake/petsc/src/vec/is/utils/isio.c:113
2	[0] ISLoad_HDF5() at /__w/firedrake/firedrake/petsc/src/vec/is/utils/isio.c:50
2	[0] PetscViewerHDF5Load() at /__w/firedrake/firedrake/petsc/src/vec/is/utils/hdf5/hdf5io.c:327
2	[0] PetscViewerHDF5Load_Internal() at /__w/firedrake/firedrake/petsc/src/vec/is/utils/hdf5/hdf5io.c:246
2	[0] Unexpected data in file
2	[0] Object (dataset) "order" not stored in group /topologies/channel_topology/dms/firedrake_dm_1_0_0_False_2
2	FAILED firedrake-repo/tests/firedrake/output/test_io_timestepping.py::test_io_timestepping[P2-P1] - petsc4py.PETSc.Error: error code 79
2	[0] DMPlexSectionLoad() at /__w/firedrake/firedrake/petsc/src/dm/impls/plex/plex.c:2660
2	[0] DMPlexSectionLoad_HDF5_Internal() at /__w/firedrake/firedrake/petsc/src/dm/impls/plex/hdf5/plexhdf5.c:2972
2	[0] ISLoad() at /__w/firedrake/firedrake/petsc/src/vec/is/is/interface/index.c:1673
2	[0] ISLoad_Default() at /__w/firedrake/firedrake/petsc/src/vec/is/utils/isio.c:113
2	[0] ISLoad_HDF5() at /__w/firedrake/firedrake/petsc/src/vec/is/utils/isio.c:50
2	[0] PetscViewerHDF5Load() at /__w/firedrake/firedrake/petsc/src/vec/is/utils/hdf5/hdf5io.c:327
2	[0] PetscViewerHDF5Load_Internal() at /__w/firedrake/firedrake/petsc/src/vec/is/utils/hdf5/hdf5io.c:246
2	[0] Unexpected data in file
2	[0] Object (dataset) "order" not stored in group /topologies/channel_topology/dms/firedrake_dm_1_0_0_False_2

@ksagiyam do you know what could be causing this?

Comment thread firedrake/mesh.py Outdated
@connorjward connorjward marked this pull request as ready for review September 24, 2025 14:27
ksagiyam
ksagiyam previously approved these changes Sep 26, 2025
Copy link
Copy Markdown
Contributor

@ksagiyam ksagiyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just need ngsPETSc.

Comment thread .github/workflows/core.yml Outdated
@connorjward connorjward requested a review from JHopeCollins March 4, 2026 14:55
@dham dham merged commit caa204a into main Mar 5, 2026
13 of 14 checks passed
@dham dham deleted the connorjward/unify-mesh branch March 5, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants