Developers:Doxygen documentation

From OctopusWiki
Jump to: navigation, search

To generate documentation for Octopus you should insert comments or change (only a little bit) the existing comments.

Comments in the code

To add a comment to a function, subroutine, module or type, put "!>" in the first comment line. The continuing comment lines have to start with "!!".

Here is an example:

!> When running parallel in domains, stencil and np_stencil
!! are needed to compute the ghost points.
!! mpi_grp is the communicator group that will be used for
!! this mesh.
subroutine mesh_init_stage_3(mesh, stencil, mpi_grp, parent)

You should put "!<" after a variable. An example:

 integer              :: p              !< Number of partitions.

Using these comment constructs elsewhere in a function will not have any effect.

Generate documentation

Execute doxygen in the root directory of Octopus and for default it will generate HTML and LaTeX documentation. You can change the Doxyfile for your needs: it is highly documented.

You also should have dot installed to generate images.

Current documentation

This is produced by a buildbot builder called documentation_builder run nightly: