BigDFT - DFT over wavelets  1.7.5
 All Classes Files Functions Variables Groups Pages
Developing the BigDFT documentation and some coding rules

At the beginning of each Fortran file, it is important to add the following lines:

Then before each routine or module inside the corresponding file, you add some lines of comment as:

program bigdft

We recommend STRONGLY to use implicit none.

It is better to comment each argument of the routine in the same line of their declaration as:

character(len=1), intent(in) :: geocode !< @copydoc poisson_solver::doc::geocode
character(len=1), intent(in) :: datacode !< @copydoc poisson_solver::doc::datacode
integer, intent(in) :: iproc
integer, intent(in) :: nproc
integer, intent(in) :: n01,n02,n03
logical, intent(in) :: use_gradient
logical, intent(in) :: use_wb_corr

In order to avoid the duplication, we define dummy structure as doc in order to specify the usual name used as arguments. Then you can insert as in the following example only

@copydoc poisson_solver::doc::geocode

. This means that doxygen will insert the documentation of the member geocode of the structure doc from the module poisson_solver.

All variables and routines inside the modules should be commented.

Finally in the README file, you find the different pages related to the documentation of BigDFT.

Some tips for doxygen

  • Add
    @file 
    following by
    @brief short description
    in the second line at the beginning of each file without specifying the name in order to permit to doxygen to determine automatically the name.
  • In the same way, add in the README file of a directory the command
    @dir 
    (without name also) with a short description in the second line (as
    @brief 
    ).
  • do not use
    @param
    to comment the parameters of the subroutines but add comment before or in the same line of the argument declaration.