Skip to content

Run LaplacePetsc tests with 3D metric + various fixes#3283

Open
ZedThree wants to merge 12 commits intonextfrom
laplacepetsc-metric3d-zguard-fixes
Open

Run LaplacePetsc tests with 3D metric + various fixes#3283
ZedThree wants to merge 12 commits intonextfrom
laplacepetsc-metric3d-zguard-fixes

Conversation

@ZedThree
Copy link
Member

test-petsc_laplace was disabled for 3D metric builds because it relied on cyclic as a preconditioner. This PR instead uses the PETSc mumps or lu preconditioners for 3D metrics instead.

I did try hypre, but that fails with NXPE > 1 -- I didn't investigate too closely and just tried mumps. Not sure if lu is a sensible fallback, but it does seem to work.

Also remove the tests of the default Laplacian solver from test-petsc_laplace: we could just make them conditional on not using 3D metrics, but that complicates the runtest script somewhat, and besides, cyclic is more thoroughly tested in test-laplace.

Plus a bunch of related fixes:

  • mark LaplaceXYHypre as unavailable and disable its test for 3D metrics as they don't work together
  • mark all the Laplace implementations that don't work with 3D metrics as unavailable
    • this stops suggesting them as available
  • remove the CI build of 3D metrics that also builds PETSc
    • the "new PETSc" build should catch all the PETSc issues
  • general tidy up of the LaplacePetsc constructor
    • including preparing it for Z guards

This test has significant overlap with other tests, it doesn't really give us
any useful information
@ZedThree ZedThree requested a review from dschwoerer February 24, 2026 14:24
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

- Remove comparison to default solver
  - The default is cyclic which doesn't work with 3D metrics
  - Also we don't actually do any comparison, so it doesn't help us test
    anything
- Use one of PETSc's preconditioners instead of one of our solvers
  - Prefer MUMPS but fall back to LU, which should always be available
- use field factory, rather than explicit loops
@ZedThree ZedThree force-pushed the laplacepetsc-metric3d-zguard-fixes branch from 5bd5198 to 3ca3e68 Compare February 24, 2026 15:03
@mikekryjak
Copy link
Contributor

Out of interest, what was wrong with cyclic?

@ZedThree
Copy link
Member Author

It doesn't work with 3D metrics because it uses FFTs. It's still used as the preconditioner in this test for non-3D metric builds though.

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.

2 participants