libCEED: PETSc MR 6964 causes Channel fluids examples to fail

This is an already known failure (and the GitLab CI PETSc build has reverted that commit to allow tests to pass), but I’ve realized it never made it’s way to a full issue and/or discussion on what the issue is or how to possibly address it.

Starting with PETSc MR 6964, the Channel tests of the fluids example fail.

My guess is that this has something to do with DMPlex’s isoperiodicity, as that is the odd-feature-out between all the fluids tests and the Channel tests.

What’s (probably) happening

  • the MR changed PetscSectionFieldGetTensorDegree_Private to get the degree of a tensor via it’s PetscDualSpace.
  • The only place PetscSectionFieldGetTensorDegree_Private is used is in DMPlexSetClosurePermutationTensor, which changes the ordering of the PetscSection DoF ordering to a tensor-product ordering

So as I see it, there are two possible ways the code is changing behavior:

  • PetscSectionFieldGetTensorDegree_Private incorrectly reports the field as discontinuous
    • This is taken from PetscDualSpaceLagrangeGetContinuity
    • That function in turn gets it from a struct member, which is set in PetscDualSpaceSetUp_Lagrange
    • That function sets continuity based on the reported order of the dual space and whether it’s formDegree matches the physical dimension.
  • PetscSectionFieldGetTensorDegree_Private does not calculate the tensor degree correctly
    • This is based on PetscDualSpaceGetDimension, which is in turn based on the size of the section associated with the PetscDualSpace

Unfortunately, I don’t see an obvious place where isoperiodicity changes the DualSpace side of things. @jedbrown Any insight/ideas as to where to look?

Paging @rezgarshakeri since you made the PETSc MR.

Edit: The issue is not isoperiodicity per-say, but that periodicity requires using the Cell Coordinate DM, which then registers as discontinuous.

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 84 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@rezgarshakeri I looked. It is consistent.

Yeah, that’s right.

The second question should be easy to answer. Make a simple test in ex8 that shows the problem. This is how we tracked down everything Rezgar was asking about. It should be as simple as a 1 or 2 cell mesh and certain degree coordinates. The reason I want to do this is that Rezgar and I looked at it, and those coordinates were in tensor ordering, so I want to see what you are seeing.