|
TrioCFD 1.9.8
TrioCFD documentation
|
This documentation is built with Doxygen from Markdown source pages, sharing the same pipeline as the TRUST documentation. This page explains how to add or edit content.
All hand-written narrative pages live under docs/content/, organised as a tree of Doxygen pages. Each .md file declares itself with @page <ID> <Title> and is attached to the tree by a parent page using @subpage <ID>. The root is docs/main_page.md, which uses the special @mainpage directive (it is the only content page kept at docs/ rather than under docs/content/).
The top-level structure mirrors the TRUST documentation, but is thinner: TrioCFD-specific content lives here, and generic platform content is left to the TRUST documentation. New pages should be placed in the section that matches their audience and purpose:
| Location | What goes there |
|---|---|
| content/quick_start.md | Getting started: building, sourcing the environment, running a first case. |
| content/user_guide/howto/ | Task-oriented "how to write a data file" guides (define a mesh, set up a case, …). |
| content/user_guide/physical_models/ | The physics of the models (turbulence, multiphase, FSI, sensitivity): equations, closures, best practices. |
| content/user_guide/numerical_methods/ | TrioCFD-specific numerical methods; defer generic schemes to TRUST. |
| content/tutorials/ | Step-by-step user tutorials starting from an existing test case. |
| content/implementation/ | How TrioCFD is implemented: code/module architecture, discretization as coded, algorithmic details. Reference material for developers and users. |
| content/dev_corner/ | Developer workflow and contributing guidelines (git, testing, this page) — not the implementation itself. |
| content/references.md + references.bib | Bibliography (consolidated .bib; cited with @cite). |
| content/figures/ | Images referenced by the pages (IMAGE_PATH points here). |
If you are unsure whether something is "physical model", "numerical method" or "implementation": keep a coherent exposition together where its author placed it and add a cross-link (@ref) rather than splitting it across sections. The C++ class/namespace API is generated automatically from the source and appears in the C++ API sidebar tab — you do not write it by hand.
The most important rules:
These rules complement the shared TRUST authoring guide, whose full version lives in the TRUST docs tree:
Equations are written with Doxygen's formula commands, which Doxygen hands to MathJax for rendering. There is no Markdown $…$ math in this pipeline.
The LaTeX inside (\frac, \nabla, \mathbf, \begin{aligned}, \begin{cases}, …) is rendered by MathJax, so the usual amsmath constructs work.
The documentation is built independently of the TrioCFD compilation:
The resulting HTML is written to docs/build/html/. See $TRUST_ROOT/docs/README.md for the available targets.
Serve the output over HTTP — do not open the files directly via file://. Browsers treat a file:// page as a "null origin" and block the XMLHttpRequests that MathJax uses to fetch its math data, so equations do not render (you will see blocked by CORS policy errors in the browser console). The dark-mode preference (stored in localStorage) is also unreliable over file://. Start a local web server and open the http:// URL instead:
If the build is on a remote machine, forward the port first from your local machine, e.g. ssh -L 8000:127.0.0.1:8000 <host>, then open http://localhost:8000/. The deployed documentation is served over HTTP, so this only affects local previews.
The Keywords Reference Manual is generated automatically from the C++ source code by the trustify tool (run by make trustify_doc, part of make); it is not written by hand. trustify parses special // XD comments embedded in the C++ sources — at each class derived from Objet_U that can be read as a keyword in a .data file, and after each parameter added with param.ajouter — and emits the keyword reference pages. To document a keyword, edit the corresponding // XD / // XD_ADD_P comment in the .cpp source, not the generated Markdown.
The full // XD tag syntax (parameter types, flags, …) and the trustify workflow are documented on the TRUST side, since trustify is shared between TRUST and TrioCFD. The new Doxygen TRUST documentation is not online yet; in the meantime: