CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
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 19:06 by wyldckat
Updated August 30, 2014 at 09: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: http://www.cfd-online.com/Forums/ope...tml#post317304 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:
    Code:
    uname -m
    Then you'll have to build it from source.
  2. Unpack it in your home folder. For example:
    Code:
    tar -xzf doxygen-1.7.5.1.linux.tar.gz
  3. Add a path link to it on your "~/.bashrc" file, like this (add if after OpenFOAM's source lines):
    Code:
    export PATH=$HOME/doxygen-1.7.5.1/bin:$PATH
  4. Start a new terminal or run:
    Code:
    source ~/.bashrc
  5. And you are ready to continue following the instructions below.
________________________________________


Packages to install on Ubuntu:
Code:
sudo apt-get install doxygen graphviz
You might also need this one (thanks mirko!):
Code:
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):
    Code:
    foam
    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:
    Code:
    foam
    cd doc
    ./Allwmake > docmake.log 2>&1
When its done, open in a browser one of these links:
  • From Debian packages:
    Code:
    /opt/openfoam200/doc/Doxygen/html/index.html
  • Installed at home:
    Code:
    $HOME/OpenFOAM/OpenFOAM-2.0.0/doc/Doxygen/html/index.html
  • Or running the following command will give you the complete path to the main HTML file "index.html":
    Code:
    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

Comments

  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
    typing
    Code:
    $HOME/OpenFOAM/OpenFOAM-2.1.x/doc/Doxygen/html/index.html
    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)


    Regards
    Bobi
    permalink
    Posted April 23, 2014 at 09:31 by babakflame babakflame is offline
    Updated April 23, 2014 at 11: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?
    permalink
    Posted August 21, 2014 at 07:20 by zcarral zcarral is offline
  3. Old Comment
    Hi zcarral,

    Quote:
    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":
    Code:
    echo $WM_PROJECT_DIR/doc/Doxygen/html/index.html
    Best regards,
    Bruno
    permalink
    Posted August 30, 2014 at 09:17 by wyldckat wyldckat is offline
 

All times are GMT -4. The time now is 05:55.