Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (28 sloc) 1.44 KB

The writing of a simulator documentation is an important part of the development process.
In order to help simulators designers and developers, the sim2doc tool can interpret the source code of the main .cpp file to generate documentation. This documentation is built using the simulator signature and free text located as comments in the text.

The sim2doc tool generates a LaTeX file that can be transformed on-the-fly as a PDF file or HTML content. The free text part can contain LaTeX commands, especially for maths formulas. Using the default template, the generated document will be structured as follows:

  1. title with author(s)
  2. brief description
  3. handled data (variables, properties, simulator parameters, events, extrafiles, ...)
  4. the free text

The free text part must be placed into comments, between the <sim2doc> and </sim2doc> tags.

/*
<sim2doc>
This is the free text part of my simulator. I can write \latex commands and formulas like $f(x)=1/x$
</sim2doc>
*/

To know how to use the sim2doc tool, just type the following command in your terminal : ```sh openfluid buddy --buddy-help sim2doc ```
The standard usage to build documentation from a .cpp file and build the PDF on-the-fly is : ```sh openfluid buddy sim2doc --options=inputcpp=MySimulator.cpp,outputdir=/path/to/output/directory,pdf=1 ```
You can’t perform that action at this time.