I think having a link to your fortran interface page on the C/Fortran API tab 
is probably sufficient, particularly if the interfaces are similar. If 
functions have significant differences between C and Fortran, it would be 
helpful if the notes about it are on the page describing the function.

I’m the project lead for Global Arrays and we wrote our API documentation in 
LaTeX. Each function has C and Fortran-specific documentation as well as some 
generic documentation that can apply to either interface. We run the tex files 
through a preprocessor that filters out just the C or Fortran-specific text to 
build the documentation for the C or Fortran API. It sorta works, but it is a 
fair amount of effort to keep everything synched up and we have a lot fewer 
functions in our API than you do. The one advantage is that everything about a 
particular function is located in one spot, so it makes it relatively easy to 
fix everything up if you make changes.

Bruce

From: Barry Smith <bsm...@petsc.dev>
Date: Tuesday, December 12, 2023 at 9:07 AM
To: Palmer, Bruce J <bruce.pal...@pnnl.gov>
Cc: Matthew Knepley <knep...@gmail.com>, petsc-users@mcs.anl.gov 
<petsc-users@mcs.anl.gov>
Subject: Re: [petsc-users] Fortran Interface

  It is unlikely we will ever be able to maintain full manual pages for Fortran 
for all routines. But yes, the current pages are C-centric.

  Do you have any suggestions on what we could add to the current manual pages 
or how to format them etc that would make them better for Fortran users who are 
not used to C?  A Fortran synopsis as well as the C one, or a single synopsis 
that is easier for both Fortran and C users to follow?

  Barry

I am not sure it is trivial to automatically generate the Fortran synposis with 
appropriate use and include information but one could argue that we should.




On Dec 12, 2023, at 11:40 AM, Palmer, Bruce J via petsc-users 
<petsc-users@mcs.anl.gov> wrote:

Thanks! It might be useful if there were a link to this page near the top of 
the C/Fortran API page.

Bruce

From: Matthew Knepley <knep...@gmail.com<mailto:knep...@gmail.com>>
Date: Tuesday, December 12, 2023 at 8:33 AM
To: Palmer, Bruce J <bruce.pal...@pnnl.gov<mailto:bruce.pal...@pnnl.gov>>
Cc: petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> 
<petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov>>
Subject: Re: [petsc-users] Fortran Interface
Check twice before you click! This email originated from outside PNNL.

On Tue, Dec 12, 2023 at 11:27 AM Palmer, Bruce J via petsc-users 
<petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov>> wrote:
Does documentation for the PETSc fortran interface still exist? I looked at the 
web pages for 3.20 (petsc.org/release<http://petsc.org/release>) but if you go 
under the tab C/Fortran API, only descriptions for the C interface are there.

I think after the most recent changes, the interface was supposed to be very 
close to C, so we just document the differences on specific pages, and put the 
general stuff here:

  https://petsc.org/release/manual/fortran/

   Thanks,

     Matt

Bruce Palmer


--
What most experimenters take for granted before they begin their experiments is 
infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>

Reply via email to