Documenting your simulators

The scientific documentation of simulators is very important to clearly understand the scientific concepts and methods applied in source code of simulators. In order to facilitate the writing and maintenance of these documentation, OpenFLUID provides the Sim2Doc system for simulators designers and developers.

The Sim2Doc system uses the simulator signature and an optional LaTeX -formatted text to build a PDF or HTML document. If present, the LaTeX -formatted text must be placed in the main file of the simulator source code, into a single C++ comment block, and between the <sim2doc> and </sim2doc> tags.

Example of a part of source code including sim2doc informations:

This part of the documentation will be included in the 
It can be formatted using \LaTeX and is fully compatible with all \LaTeX commands,
including tables, scientific formulae, figures, and many more.


  DECLARE_NAME("Example simulator");
  DECLARE_DESCRIPTION("This simulator is an example");
  DECLARE_SIMULATOR_PARAM("meanspeed","mean speed to use","m/s")
  DECLARE_REQUIRED_ATTRIBUTE("area","TU","area of the Test Units","m")
  DECLARE_USED_ATTRIBUTE("landuse","OU","landuse of the Other Units","")
  DECLARE_USED_VAR("varB","OU","simple var on Other Units","kg")
  DECLARE_PRODUCED_VAR("VarB[vector]","TU","vectorized var on Test Units","kg")

The final document can be generated using the OpenFLUID Sim2Doc buddy, included in the OpenFLUID command line program. See also Command line options for available options.

Example of generation of the PDF document using Sim2Doc tool:

openfluid --buddy sim2doc --buddyopts inputcpp=MySimFile.cpp,pdf=1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines