Cantera / enhancements

Repository for proposed and ongoing enhancements to Cantera
11 stars 5 forks source link

Develop Fortran interface documentation #116

Open mefuller opened 2 years ago

mefuller commented 2 years ago

Abstract

Write Fortran documentation in parallel with writing/running/testing some small example programs with emphasis placed on F90+/freeform compatibility

Motivation

There is presently no formal documentation for the Fortran interface

Description

Develop documentation following $FORMAT Question - can anyone point me to which documentation I should use as a template or where I might find guidance on how to style the documentation? My first impulse is to use the Matlab documentation as it is neither the native C++ nor the widely/heavily-used Python

Alternatives

Do nothing

References

Link to a development branch in my fork of the Cantera repository: https://github.com/mefuller/cantera/tree/fortran-doc

speth commented 2 years ago

My hope for revamping and documenting the Cantera Fortran module was to leverage the code-generation approach described in #39. I think @ssun30 is getting close to sharing a version of his implementation of this for the Matlab toolbox (discussed in https://github.com/Cantera/enhancements/discussions/102), so I might suggest waiting a bit for that to evolve before jumping into an independent project targeting just the Fortran module.

ischoegl commented 1 year ago

One potential micro-step here would be to create an "Advanced: Fortran tutorial" on Cantera/cantera-website added here that uses the existing demo programs in samples/f77 and samples/f90. Now that libcantera-devel appears to be working as a stand-alone conda package, the initial hurdle to get going should be significantly reduced (see newly added documentation).

mefuller commented 1 year ago

I'll take a look at it - shouldn't be too hard and it will likely reuse a lot of the C++ tutorial Certainly the FORTRAN 77 and Fortran 90 demo programs both compile (using make and scons) and just work right out of the box for me (as expected, but still very gratifying)

Anyone know a "good" way to reuse content so that it's linked and not just copy-paste? This is thinking about both the structure of the C++ tutorial and also the code snippets

I'll try to work on this in the coming weeks when I can put together some free time

ischoegl commented 1 year ago

I'll take a look at it - shouldn't be too hard and it will likely reuse a lot of the C++ tutorial

Thanks, @mefuller!

I think that including code snippets the way the C++ tutorial does it is ok for the time being. If we also include the same files in Cantera/cantera’s samples folder, we can start linking to them whenever Cantera 3.0 is released.