integrate doxygen with sphinx using breathe

This commit is contained in:
James McClure 2021-09-21 19:32:35 -04:00
parent ceccc0d65a
commit 62e619f583
18 changed files with 101 additions and 9 deletions

View File

@ -15,7 +15,6 @@
/**
* \class FlowAdaptor
*
* @brief
* The FlowAdaptor class operates on a lattice Boltzmann model to alter the flow conditions
*

View File

@ -6,14 +6,20 @@ pip install Sphinx
# foamatting requires sphinx read-the-docs-theme
pip install sphinx-rtd-theme
# support for doxygen requires breathe
pip install breathe
# equation rendering requires latex and dvipng command
sudo apt-get install dvipng
sudo apt-get install texlive texstudio
sudo apt-get install texlive-latex-recommended texlive-pictures texlive-latex-extra
# To build the docs
Step 1) install dependencies listed above
Step 2) type 'make html' from the docs/ directory
Step 3) point your browser at ~/local/doc/build/html/index.html
Step 2) build LBPM with doxygen support enabled in CMake
Step 3) From the build directory run the command 'make doc' to build html and xml from doxygen
Step 4) modify source/conf.py so that the breathe directory specifies the full path to the xml
documentation built in Step 3
Step 5) type 'make html' from the docs/ directory (the same directory that contains this README file)
Step 6) point your browser at ~/local/doc/build/html/index.html
#

View File

@ -31,7 +31,8 @@ release = '1.0'
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.imgmath'
'sphinx.ext.imgmath',
'breathe'
]
# Add any paths that contain templates here, relative to this directory.
@ -55,7 +56,6 @@ html_theme = 'alabaster'
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
## Read the docs style:
if os.environ.get('READTHEDOCS') != 'True':
try:
@ -68,3 +68,12 @@ if os.environ.get('READTHEDOCS') != 'True':
#def setup(app):
# app.add_stylesheet("fix_rtd.css")
# -- Breathe configuration -------------------------------------------------
breathe_projects = {
"LBPM Doxygen": "/home/mcclurej/local/dev/LBPM/doc/xml/"
}
breathe_default_project = "LBPM Doxygen"
breathe_default_members = ('members', 'undoc-members')

View File

@ -0,0 +1,9 @@
###############################################################################
Analysis methods
###############################################################################
.. toctree::
:glob:
:maxdepth: 2
analysis/*

View File

@ -0,0 +1,10 @@
###############################################################################
Models
###############################################################################
.. toctree::
:glob:
:maxdepth: 2
models/*

View File

@ -0,0 +1,5 @@
============================================
Scalable Lattice Boltzmann Library (ScalBL)
============================================
.. doxygenfile:: ScaLBL.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
DCEL
============================================
.. doxygenfile:: dcel.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
FlowAdaptor
============================================
.. doxygenfile:: FlowAdaptor.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
Minkowski
============================================
.. doxygenfile:: Minkowski.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
SubPhase analysis
============================================
.. doxygenfile:: SubPhase.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
Color Model
============================================
.. doxygenfile:: ColorModel.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
Free Energy Model
============================================
.. doxygenfile:: FreeLeeModel.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
Greyscale Model
============================================
.. doxygenfile:: GreyscaleModel.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
Multi-relaxation time (MRT) Model
============================================
.. doxygenfile:: MRTModel.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
Ion Model
============================================
.. doxygenfile:: IonModel.h
:project: LBPM Doxygen

View File

@ -0,0 +1,5 @@
============================================
Poisson Model
============================================
.. doxygenfile:: PoissonSolver.h
:project: LBPM Doxygen

View File

@ -15,4 +15,8 @@ into the framework.
testingModels/*
doxygen/ScaLBL.rst
doxygen/Models.rst
doxygen/Analysis.rst

View File

@ -25,13 +25,13 @@ DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = "@PROJECT_NAME@"
PROJECT_NAME = "LBPM Doxygen"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = "@PROJECT_VERSION@"
PROJECT_NUMBER = "9.12.2021"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer