[petsc-dev] Fortran interface definitions

Martin Diehl martin.diehl at kuleuven.be
Mon Mar 24 06:07:10 CDT 2025


Hello,

as a preparation for the Google Summer of Code, Tapashree and I started
to work on https://gitlab.com/petsc/petsc/-/issues/194 (interfaces for
PetscViewerHDF5Write/ReadAttribute()). Preliminary work is in
https://gitlab.com/petsc/petsc/-/commits/MarDiehl/194-add-f90-bindings-for-petscviewerhdf5write-readattribute

When working on it, I realized that my understanding how Fortran
interfaces are defined in PETSc faded, so I would need some
clarifications on the different components.

Is our understanding about the content of the ftn-custom folders
correct: Do they only exist in the repository, C-code for functions
that are not 1-1 translated to Fortran are defined. This includes for
example functions having arrays or strings in their arguments.

What are the purposes of the files in the ftn-mod folders? Some seem to
combine autogenerated modules (e.g. ksp/ftn-mod/petsckspmod.F90),
others make overloaded functions available under a common name (e.g.
sys/ftn-mod/petscviewer.h90). But what is "/ksp/ftn-mod/petscksp.h90"
doing?

best regards,
Martin and Tapashree

-- 
KU Leuven
Department of Computer Science
Department of Materials Engineering
Celestijnenlaan 200a
3001 Leuven, Belgium

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20250324/a93f3d77/attachment.sig>


More information about the petsc-dev mailing list