Repository navigation
Public handle types and small API consistency fixes - #314
Merged
Merged
Conversation
The abstract handle types used in nearly every signature (AbstractPetscVec, AbstractKSP, ...) and the handles PetscDM, PC, IS, AO, PF and Tao were reachable but not declared public, and had no docstrings. IS, AO, PF and Tao weren't reachable as PETSc.X at all. They're now public, documented, and listed on the utilities page. PETSc.scalartype and PETSc.inttype were separate copies of the LibPETSc functions, so a method added to one was missing from the other. PETSc now uses the LibPETSc functions, and realtype is public alongside them.
Products and solves (mul!, ldiv!, ksp \ b, solve!(x, ksp, b)) now take any vector handle, so a borrowed VecPtr works where it gave a MethodError. A LibPETSc call whose arguments match no generated method throws a MethodError naming the argument types instead of a bare "no generated method" error. library_info() prints as the NamedTuple it returns, without a show method that also changed how any NamedTuple with the same field names printed. Every destroy! shares one implementation. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two behaviour changes are listed in the CHANGELOG: the error type of a mismatched LibPETSc call, and how library_info() prints.
Full test suite passes locally.