CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Doxygen documentation (https://www.cfd-online.com/Forums/openfoam-installation/89246-doxygen-documentation.html)

Tanay June 8, 2011 06:33

Doxygen documentation
 
Hello Foamers,
I'm using OpenFOAM-1.7.1 on Ubuntu 10.04.
I'm kinda new to Linux and OpenFOAM and I've got a problem in making Doxygen work.
What exactly does Doxygen do if it works in the command line? Like does it produce inheritance and grep-like graphs of where all the classes, variables and functions are used? Where does it store these tree/graph drawings? Can it make a nice PDF with hyperlinks describing all the functions?
I've read its online documentation but I've never seen it work.
In the /doc/Doxygen directory, when I type

tanay@tanay-laptop:/opt/openfoam171/doc/Doxygen$ sudo doxygen

I get-

Warning: Tag `DETAILS_AT_TOP' at line 162 of file Doxyfile has become obsolete.
To avoid this warning please update your configuration file using "doxygen -u"
Warning: tag INPUT: input source `/src' does not exist
Warning: tag INPUT: input source `/applications/utilities' does not exist
Warning: tag INPUT: input source `/applications/solvers' does not exist
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for files to exclude
Searching for files to process...
Warning: source /src is not a readable file or directory... skipping.
Warning: source /applications/utilities is not a readable file or directory... skipping.
Warning: source /applications/solvers is not a readable file or directory... skipping.
Reading and parsing tag files
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Associating documentation with classes...
Computing nesting relations for classes...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Creating members for template instances...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Freeing entry tree
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Computing dependencies between directories...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Combining using relations...
Adding members to index pages...
Generating style sheet...
Generating index page...
Generating page index...
Generating example documentation...
Generating file sources...
Generating file documentation...
Generating page documentation...
Generating group documentation...
Generating group index...
Generating class documentation...
Generating annotated compound index...
Generating alphabetical compound index...
Generating hierarchical class index...
Generating member index...
Generating graphical class hierarchy...
Generating namespace index...
Generating namespace member index...
Generating graph info page...
sh: dot: not found
Problems running dot: exit code=127, command='dot', arguments='"/opt/openfoam171/doc/Doxygen/html/graph_legend.dot" -Tpng -o "/opt/openfoam171/doc/Doxygen/html/graph_legend.png"'
Generating directory documentation...
Generating file index...
Generating directory index...
Generating example index...
Generating file member index...
tanay@tanay-laptop:/opt/openfoam171/doc/Doxygen$ sudo doxygen -w rtf
Error: option "-w rtf" is missing a style sheet file name
tanay@tanay-laptop:/opt/openfoam171/doc/Doxygen$ sudo doxygen
Warning: Tag `DETAILS_AT_TOP' at line 162 of file Doxyfile has become obsolete.
To avoid this warning please update your configuration file using "doxygen -u"
Warning: tag INPUT: input source `/src' does not exist
Warning: tag INPUT: input source `/applications/utilities' does not exist
Warning: tag INPUT: input source `/applications/solvers' does not exist
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for files to exclude
Searching for files to process...
Warning: source /src is not a readable file or directory... skipping.
Warning: source /applications/utilities is not a readable file or directory... skipping.
Warning: source /applications/solvers is not a readable file or directory... skipping.
Reading and parsing tag files
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Associating documentation with classes...
Computing nesting relations for classes...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Creating members for template instances...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Freeing entry tree
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Computing dependencies between directories...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Combining using relations...
Adding members to index pages...
Generating style sheet...
Generating index page...
Generating page index...
Generating example documentation...
Generating file sources...
Generating file documentation...
Generating page documentation...
Generating group documentation...
Generating group index...
Generating class documentation...
Generating annotated compound index...
Generating alphabetical compound index...
Generating hierarchical class index...
Generating member index...
Generating graphical class hierarchy...
Generating namespace index...
Generating namespace member index...
Generating graph info page...
sh: dot: not found
Problems running dot: exit code=127, command='dot', arguments='"/opt/openfoam171/doc/Doxygen/html/graph_legend.dot" -Tpng -o "/opt/openfoam171/doc/Doxygen/html/graph_legend.png"'
Generating directory documentation...
Generating file index...
Generating directory index...
Generating example index...
Generating file member index...

And the process ends there. Am I typing the command incorrectly or have I skipped some fields?
Thanks. :-)
And sorry if the questions are a bit lame. :P

olesen June 9, 2011 02:52

Quote:

Originally Posted by Tanay (Post 311017)
Hello Foamers,
I'm using OpenFOAM-1.7.1 on Ubuntu 10.04.
I'm kinda new to Linux and OpenFOAM and I've got a problem in making Doxygen work.
What exactly does Doxygen do if it works in the command line? Like does it produce inheritance and grep-like graphs of where all the classes, variables and functions are used? Where does it store these tree/graph drawings? Can it make a nice PDF with hyperlinks describing all the functions?
I've read its online documentation but I've never seen it work.
In the /doc/Doxygen directory, when I type

tanay@tanay-laptop:/opt/openfoam171/doc/Doxygen$ sudo doxygen

I get-
...
Warning: tag INPUT: input source `/src' does not exist
Warning: tag INPUT: input source `/applications/utilities' does not exist
Warning: tag INPUT: input source `/applications/solvers' does not exist
...
And the process ends there. Am I typing the command incorrectly or have I skipped some fields?
Thanks. :-)
And sorry if the questions are a bit lame. :P


The error messages indicate that you are missing some (or all?) of the OpenFOAM env variables.


Instead of
  • sudo doxygen
you should try this combination
  • sudo (ie, get a root shell)
  • source the OpenFOAM bashrc
  • cd $WM_PROJECT_DIR/doc
  • ./Allwmake
I think this should work.

Tanay June 9, 2011 03:08

Thanks a lot, Olesen. :-)
I tried ./Allwmake and it worked (at least the console showed no errors).

But can you tell me how I actually get the source code documentation? Is it a PDF or an XML file that will finally be produced by doxygen? Will this file have all the classes etc?

olesen June 9, 2011 03:10

Quote:

Originally Posted by Tanay (Post 311195)
Thanks a lot, Olesen. :-)
I tried ./Allwmake and it worked (at least the console showed no errors).

But can you tell me how I actually get the source code documentation? Is it a PDF or an XML file that will finally be produced by doxygen? Will this file have all the classes etc?

It normally builds an html.

wyldckat June 10, 2011 13:16

Greetings to you both!

@Tanay: Start reading here: http://www.cfd-online.com/Forums/ope...tml#post269231

Exporting from HTML to PDF would be... very excruciating, since it would probably lead to a 2000 page document or something like that. But I understand the upside, because it would then just be a single file. Either way, you could also use the online version: http://foam.sourceforge.net/docs/cpp/index.php

@Mark: if I'm not mistaken, the latest version in 1.7.1/x is actually in PHP, but it's possible to configure the Doxyfile to generate the documentation in HTML.

Best regards,
Bruno

gascortado September 12, 2011 10:49

Hi wyldckat,

The link to the sourceforget site is broken. I tried using the documentation from OpenFOAM.com and I don't find it very useful. I am really interested in learning about the classes available and what they do. I'm developing my own FSI solver and I need to be able to know the functionality of OF. Would the Doxygen documentation help me or should I be looking into some other resource?

I will appreciate any advise that you may have. Thanks a lot

wyldckat September 12, 2011 10:59

Hi Santiago,

They changed places: http://foam.sourceforge.net/docs/cpp/index.html
When in doubt, visit www.openfoam.com and on the menu "Documentation -> C++ Source Guide" you should always find the latest version!

If you want your personal version of the documentation, you can always find on my signature link something that explain how to build some stuff :) Latest version on this subject: Building Code Documentation on OpenFOAM 2.0.0/x

Last but not least, check this thread: http://www.cfd-online.com/Forums/ope...larfi-eld.html - There I've written about trailing code and what else can be used for trailing/tracking down code in OpenFOAM :D

One last remark, which you probably already know: with OpenFOAM, the source code is sometimes the only documentation you'll find :rolleyes:

Best regards and good luck!
Bruno

veerubiji September 23, 2011 04:44

doxygen documentation
 
Hi,
I am using doxygen tool to extract xml comments from source code. my souce is a combination of c code and xml comments. i need to extract xml comments. my input is a c file and i am extracting using using doxygen tool. doxygen extracting the hole code but i need to extract only xml comments no need to extract c code. so can any body help me how to extract only xml comments from source code. thanks in advance.

regards,
veerubiji

olesen September 23, 2011 09:50

Quote:

Originally Posted by veerubiji (Post 325331)
Hi,
I am using doxygen tool to extract xml comments from source code. my souce is a combination of c code and xml comments.

This does not look like it has anything to do with OPENFOAM. I suggest you check elsewhere for information about writing input filters for doxygen - for example using awk/sed/perl/python/ruby/whatever.

veerubiji September 23, 2011 11:40

thank you very much


All times are GMT -4. The time now is 01:53.