Open
Conversation
connorjward
commented
Mar 30, 2026
Comment on lines
-13
to
-24
| if interior_facets: | ||
| CHKERR(PCPatchSetComputeFunctionInteriorFacets((<PETSc.PC?>patch).pc, | ||
| <PetscPCPatchComputeFunction><uintptr_t>function, | ||
| <void *><uintptr_t>ctx)) | ||
| elif exterior_facets: | ||
| CHKERR(PCPatchSetComputeFunctionExteriorFacets((<PETSc.PC?>patch).pc, | ||
| <PetscPCPatchComputeFunction><uintptr_t>function, | ||
| <void *><uintptr_t>ctx)) | ||
| else: | ||
| CHKERR(PCPatchSetComputeFunction((<PETSc.PC?>patch).pc, | ||
| <PetscPCPatchComputeFunction><uintptr_t>function, | ||
| <void *><uintptr_t>ctx)) |
Contributor
Author
There was a problem hiding this comment.
These functions were never called
connorjward
commented
Mar 30, 2026
| PetscInt *filtdofs = NULL; | ||
|
|
||
| PetscFunctionBeginUser; | ||
| PetscCall(ISGetSize(points, &npoints)); |
Contributor
Author
There was a problem hiding this comment.
I use the modern PetscCall calling convention, replacing ierr = ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
patch.pyto not use the PyOP2 code generator and just generates C code directly instead.The reason I have done this is because I was struggling to reproduce the level of hackery done in this file for pyop3. PCPatch requires a specific interface to the wrapper kernel which is easy enough to enforce in PyOP2 but much more difficult in pyop3 where the compiler is much more advanced and hence the generated code has a less predictable call signature.
I think it would be possible to recover this behaviour, and use pyop3 for codegen, but I would like to use this as a temporary measure because: