CFD Online Logo CFD Online URL
Home > Forums

Building Code Documentation on OpenFOAM 2.0.0/x

Register Blogs Members List Search Today's Posts Mark Forums Read

Rating: 3 votes, 5.00 average.

Building Code Documentation on OpenFOAM 2.0.0/x

Posted June 24, 2011 at 18:06 by wyldckat
Updated August 30, 2014 at 08:18 by wyldckat (A note about Ubuntu 10.10 and above)

For now, these are only instructions for Ubuntu (11.04 to be exact, but they should work for 10.04 and above), and it shouldn't be all that different for OpenSuSE.

Note: I've discovered the other day, thanks to a fellow user of this forum, that Doxygen 1.7.1 on Ubuntu 10.10 does not build the code documentation for OpenFOAM 2.0. Nonetheless, a solution is already known (two actually) and is shown here: the problem of compiling source guide in ubuntu 10.10 post #4
OR instead you might want follow the following steps for using a more recent version of Doxygen:
  1. Download the latest binary version of Doxygen from here: A binary distribution for Linux x86-64 of Doxygen
    If you have a i?86 architecture:
    uname -m
    Then you'll have to build it from source.
  2. Unpack it in your home folder. For example:
    tar -xzf doxygen-
  3. Add a path link to it on your "~/.bashrc" file, like this (add if after OpenFOAM's source lines):
    export PATH=$HOME/doxygen-$PATH
  4. Start a new terminal or run:
    source ~/.bashrc
  5. And you are ready to continue following the instructions below.

Packages to install on Ubuntu:
sudo apt-get install doxygen graphviz
You might also need this one (thanks mirko!):
sudo apt-get install texlive-latex-base
Now, there are two possible scenarios:
  • To build the code documentation on a .deb install (i.e. Ubuntu/Debian Pack Installation):
    cd doc
    sudo su -c "$WM_PROJECT_DIR/bin/foamExec ./Allwmake > docmake.log 2>&1"
  • To build from your home folder, for source or git installations:
    cd doc
    ./Allwmake > docmake.log 2>&1
When its done, open in a browser one of these links:
  • From Debian packages:
  • Installed at home:
  • Or running the following command will give you the complete path to the main HTML file "index.html":
    echo $WM_PROJECT_DIR/doc/Doxygen/html/index.html
    (Thanks to zcarral for indicating that something was missing!)
And the cherry on top: unlike what happened with OpenFOAM 1.7.0/1/x, with 2.0.0/x it also has that neat JavaScript search function

Have fun!
« Prev     Main     Next »
Total Comments 3


  1. Old Comment
    greetings Bruno

    I have O.F. 2.1.x on $HOME directory and I did as exactly as You have specified on installing Doxygen. Everything seems correct . However, after
    in firefox browser, I got nothing.

    Would You PLZ hint me how can I use Doxygen documentation on O.F. 2.1.x?

    My ubuntu version is 11.10 and my linux architecture is x86_64.

    I downloaded doxygen-1.8.7 according to your link (doxygen-1.8.7.src.tar.gz)


    The problem solved. 2 errors that I made:
    1- Not putting doxygen in $HOME directory
    2-Not using binary distribution for linux x86_64. (doxygen-1.8.7.linux.bin.tar.gz)

    Posted April 23, 2014 at 08:31 by babakflame babakflame is offline
    Updated April 23, 2014 at 10:17 by babakflame
  2. Old Comment
    Dear Bruno,

    I do not understand well the procedure to obtain the OpenFOAM documentation. I did the following steps in Ubuntu:

    sudo apt-get install doxygen
    sudo su -c "$WM_PROJECT_DIR/bin/foamExec ./Allwmake > docmake.log 2>&1"

    But I do not see the OpenFOAM documentation? Where is it created?
    Posted August 21, 2014 at 06:20 by zcarral zcarral is offline
  3. Old Comment
    Hi zcarral,

    Originally Posted by zcarral View Comment
    But I do not see the OpenFOAM documentation? Where is it created?
    Mmm... back then I forgot to give the generic command that indicates the folder where it is located.
    Running the following command will give you the complete path to the main HTML file "index.html":
    echo $WM_PROJECT_DIR/doc/Doxygen/html/index.html
    Best regards,
    Posted August 30, 2014 at 08:17 by wyldckat wyldckat is offline

All times are GMT -4. The time now is 04:10.