Creation of OpenFOAM-dev repository 15/04/2008

This commit is contained in:
OpenFOAM-admin
2008-04-15 18:56:58 +01:00
commit 3170c7c0c9
9896 changed files with 4016171 additions and 0 deletions

8
doc/Allwmake Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
set -x
chmod a+rX $WM_PROJECT_DIR
chmod a+rX $WM_PROJECT_DIR/doc
chmod -R a+rX Doxygen
( cd Doxygen && ./Allwmake )

9
doc/Doxygen/Allwmake Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
set -x
umask 22
rm -rf html latex man
doxygen
# fix permissions (NB: '-X' and not '-x'!)
chmod -R a+rX ./

1333
doc/Doxygen/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

76
doc/Doxygen/Doxygen.css Normal file
View File

@ -0,0 +1,76 @@
body { color: #000000 ; background: #ffffff; margin: 0px; font-family: verdana, arial, helvetica, sans-serif; text-decoration: none; font-size: 12px; }
a:link { text-decoration: none; color: #0000ff ; }
a:link:hover { text-decoration: none; color: #0000ff ; }
a:visited { text-decoration: none; color: #0000ff ; }
a:visited:hover { text-decoration: none; color: #0000ff ; }
a:link img { border: 0; }
a:visited img { border: 0; }
a:active img { border: 0; }
a.menuLefton { color: #0000ff; font-size: 12px; font-weight: bold; }
td.leftmenu { font-family: verdana, arial, helvetica, sans-serif; text-decoration: none; background: #ddddff; text-align: left; font-size: 14px; height: 20px; width: 200px; }
a.menuTopoff { color: #000000; font-size: 14px; }
a.menuTopoff:visited { color: #000000; font-size: 14px; }
a.menuTopoff:hover { color: #0000ff; font-size: 14px; }
td.topmenu { font-family: verdana, arial, helvetica, sans-serif; background: #ddddff; text-align: center; font-size: 16px; width: 150px; font-weight: bold; }
h1 { font-size: 18px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
/* formatting for member functions:
* Since the OpenFOAM code already has nice line-breaks, wrapping the lines
* just looks terrible.
* Give a slightly different background to make it easier to find.
*/
.memitem {
padding: 4px;
background-color: #eef3f5;
border-width: 1px;
border-style: solid;
border-color: #dedeee;
}
.memproto {
background-color: #d5e1e8;
width: 100%;
border-width: 1px;
border-style: solid;
border-color: #84b0c7;
font-weight: bold;
}
table.memname {
width: 100%;
background: #f7f7ff;
white-space: nowrap;
}
.indexkey {
vertical-align: top;
background: #f7f7ff;
}
.indexvalue {
vertical-align: top;
background: #f7f7ff;
}
.paramkey {
width: 5%;
}
.memItemLeft {
background: #f7f7ff;
}
.memItemRight {
background: #f7f7ff;
}
.mdescLeft {
margin: 0px;
}
.mdescRight {
font-style: italic;
}

View File

@ -0,0 +1,57 @@
body { color: #000000 ; background: #ffffff; margin: 0px; font-family: verdana, arial, helvetica, sans-serif; text-decoration: none; font-size: 12px; }
a:link { text-decoration: none; color: #0000ff ; }
a:link:hover { text-decoration: none; color: #0000ff ; }
a:visited { text-decoration: none; color: #0000ff ; }
a:visited:hover { text-decoration: none; color: #0000ff ; }
a:link img { border: 0; }
a:visited img { border: 0; }
a:active img { border: 0; }
a.menuLefton { color: #0000ff; font-size: 12px; font-weight: bold; }
td.leftmenu { font-family: verdana, arial, helvetica, sans-serif; text-decoration: none; background: #ddddff; text-align: left; font-size: 14px; height: 20px; width: 200px; }
a.menuTopoff { color: #000000; font-size: 14px; }
a.menuTopoff:visited { color: #000000; font-size: 14px; }
a.menuTopoff:hover { color: #0000ff; font-size: 14px; }
td.topmenu { font-family: verdana, arial, helvetica, sans-serif; background: #ddddff; text-align: center; font-size: 16px; width: 150px; font-weight: bold; }
h1 { font-size: 18px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
/* formatting for member functions:
* Since the OpenFOAM code already has nice line-breaks, wrapping the lines
* just looks terrible.
* Give a slightly different background to make it easier to find.
*/
.memitem {
padding: 4px;
background-color: #eef3f5;
border-width: 1px;
border-style: solid;
border-color: #dedeee;
}
.memproto {
background-color: #d5e1e8;
width: 100%;
border-width: 1px;
border-style: solid;
border-color: #84b0c7;
font-weight: bold;
}
table.memname {
width: 100%;
background: #f7f7ff;
white-space: nowrap;
}
.mdescLeft {
margin: 0px;
}
.mdescRight {
font-style: italic;
}
.paramkey {
width: 5%;
}

View File

@ -0,0 +1,5 @@
Copyright © 2000-2008 OpenCFD Ltd
</td></tr>
</table>
</body>
</html>

View File

@ -0,0 +1,74 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head>
<title> OpenFOAM programmer's C++ documentation
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn.html)">
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn.html)">
<!-- html,info -->
<meta name="src" content="index.tex">
<meta name="date" content="2007-04-12 00:02:00">
<link rel="stylesheet" type="text/css" href="../Doxygen.css">
<link rel="stylesheet" type="text/css" href="../tabs.css">
<meta name="keywords" content="computational fluid dynamics, CFD, OpenCFD, OpenFOAM, open source CFD, open source">
<meta name="description" content="OpenCFD Ltd, leaders in open source Computational Fluid Dynamics (CFD), the developers and maintainers of OpenFOAM: the open source CFD toolbox. We supply support and contracted developments for OpenFOAM">
</head>
<body>
<a id="openfoam"> </a>
<!-- Top banner -->
<table style="border-width: 0px; width: 800px; background: #ddddff;" cellspacing=0 cellpadding=0>
<tr>
<td style="width: 9px; height:54px"></td>
<td style="width: 250px; height:54px; vertical-align:middle;
horizontal-align: left; ">
<img alt="OpenFOAM logo" src="../OpenFOAMlogo.jpg"> </td>
<td style="width:350px; height:54px; vertical-align:middle;
horizontal-align: left; ">
<table>
<tr>
<td><img alt="The Open Source CFD Toolbox" src="../OpenSourceToolbox.jpg"></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Button banner -->
<table style="border-width: 0px; width: 800px; background: #ffffff;" cellspacing=0 cellpadding=0>
<tr>
<td valign=top>
<table width=801 border=0 cellspacing=1 cellpadding=0 bgcolor="#ffffff">
<tr>
<td class=leftmenu>&nbsp;
<a href="http://foam.sourceforge.net/doc/Doxygen/html"
class=menuLefton >Source Guide</a>
</td>
<td class=topmenu>
<a href="http://www.opencfd.co.uk/index.html"
class=menuTopoff >OpenCFD</a>
</td>
<td class=topmenu>
<a href="http://www.opencfd.co.uk/solutions/index.html"
class=menuTopoff >Solutions</a>
</td>
<td class=topmenu>
<a href="http://www.opencfd.co.uk/contact/index.html"
class=menuTopoff >Contact</a>
</td>
<td class=topmenu>
<a href="http://www.opencfd.co.uk/openfoam/index.html"
class=menuTopoff >OpenFOAM</a>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table style="border-width: 0px; width: 800px; background: #ffffff;" cellspacing=5 cellpadding=0>
<tr>
<td>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

101
doc/Doxygen/tabs.css Normal file
View File

@ -0,0 +1,101 @@
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
DIV.tabs
{
float : left;
width : 100%;
margin-bottom : 2px;
padding-bottom : 6px;
}
DIV.tabs UL
{
margin : 0px;
padding-left : 0px;
border-right : 1px solid #84B0C7;
list-style : none;
}
DIV.tabs LI, DIV.tabs FORM
{
display : inline;
margin : 0px;
padding : 0px;
}
DIV.tabs FORM
{
float : left;
padding : 0px 9px;
}
DIV.tabs A
{
float : left;
font-size : 12px;
font-weight : bold;
text-decoration : none;
border-right : 1px solid #000000;
}
DIV.tabs A:hover
{
background-position: 100% -150px;
}
DIV.tabs A:link, DIV.tabs A:visited,
DIV.tabs A:active, DIV.tabs A:hover
{
color: #000000;
}
DIV.tabs SPAN
{
float : left;
display : block;
padding : 0px 9px;
white-space : nowrap;
}
DIV.tabs INPUT
{
float : right;
display : inline;
font-size : 12px;
}
DIV.tabs TD
{
font-size : 12px;
font-weight : bold;
text-decoration : none;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
DIV.tabs SPAN {float : none;}
/* End IE5-Mac hack */
DIV.tabs A:hover SPAN
{
background-position: 0% -150px;
}
DIV.tabs LI#current A
{
border-width : 0px;
border-right : 1px solid #000000;
color: #0000ff;
}
DIV.tabs LI#current SPAN
{
padding-bottom : 0px;
}
DIV.nav
{
background : none;
border : none;
border-bottom : 1px solid #000000;
}

13
doc/Doxygen/tools/README Normal file
View File

@ -0,0 +1,13 @@
Misc. tools for finding and/or repairing common documentation problems
See the comments in the scripts.
1. find-suspiciousTags
2. fix-Class
3. find-tinyDescription
4. find-placeholderDescription
Misc Tools
1. find-templateInComments
2. find-its
3. find-junkFiles

49
doc/Doxygen/tools/find-its Executable file
View File

@ -0,0 +1,49 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-its
#
# Description
# Search for *.[CH] files with "it's"
# This contraction (== "it is") looks too much like "its" (possesive)
# and confuses non-native (and some native) English speakers.
#
# - print filename and lineNumber
#
# -----------------------------------------------------------------------------
my $re_filespec = qr{^.+\.[CH]$};
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
local @ARGV = $_;
while (<>) {
if (m{it\'s}) {
print "$File::Find::name line=$.\n";
}
}
close ARGV;
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

View File

@ -0,0 +1,37 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-junkFiles
#
# Description
# Search for "junk" files left over from editor, core, CVS, etc.
#
# - print filename only
#
# -----------------------------------------------------------------------------
sub wanted {
return unless -f $_;
if (
m{^\.?.+~$} ## editor backup
or m{^\#.+\#$} ## editor autosave
or m{^\.\#.+$} ## cvs replace update (eg, ".#test.c.1.3")
or m{^core(\.\d+)?$} ## core dump
) {
print "$File::Find::name\n";
}
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

View File

@ -0,0 +1,73 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-placeholderDescription
#
# Description
# Search for *.[H] files with a Description that looks like it is
# a placeholder
# eg, Foam::className
#
# - print filename '#' and the description
#
# -----------------------------------------------------------------------------
my $minLength = 16;
my $re_filespec = qr{^.+\.[H]$};
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
my ( $currentClass, $description );
local @ARGV = $_;
while (<>) {
my $name;
## examine the class name
if (/^Class\s*$/) {
$_ = <>;
($currentClass) = split;
}
if (/^Description\s*$/) {
$_ = <>;
( $description = $_ ) =~ s{^\s+|\s+$}{}g;
# remove trailing punctuation as being noise
$description =~ s{\s*[.,:]+$}{};
last;
}
}
$description ||= '';
## we have 'Class' tag
if ( defined $currentClass ) {
# description looks like a class name
if (
$description =~ m{^\w+(::\w+)+$}
) {
print "$File::Find::name # $description\n";
}
}
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

View File

@ -0,0 +1,124 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-suspiciousTags
#
# Description
# Search for *.[CH] files with 'Class' or 'Namespace' starting in the
# first column but without a class being defined anywhere in the file.
# These are probably incorrect or should be at least be
# changed to 'In Class' / 'In Namespace' for now.
# - print filename and 'InClass' or 'InNamespace'
#
# Find the namespaces used in the files and compare these to what is
# given on the 'Class' information
# - print filename and corrected Class
#
# Check for trailing garbage in the 'Class' information
# - print filename and 'ClassWithTrailingInformation'
#
# -----------------------------------------------------------------------------
my $re_filespec = qr{^.+\.[CH]$};
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
# potential className
( my $fileClass = $_ ) =~ s{\.[A-Za-z]$}{};
my ( $namespace, $currentClass, %classes, %found ) = ('');
local @ARGV = $_;
while (<>) {
my $name;
## look for (class|namespace), deal with repeats
if ( ($name) = /^\s*class\s+(\w+)\s*/ ) {
$classes{$name}++;
}
elsif ( ($name) = /^\s*namespace\s+(\w+)\s*/ ) {
## reset if 'Foam' namespace appears again
$namespace = '' if $name eq "Foam";
$namespace .= $name . "::";
}
elsif (/^(Class|Namespace)\s*/) {
$found{$1}++;
## examine the class name
if (/^Class\s*$/) {
$_ = <>;
my @trailing;
( $currentClass, @trailing ) = split;
if (@trailing) {
$found{-trailing}++;
}
# the next line should be blank
$_ = <>;
$_ ||= '';
if (not /^\s*$/) {
$found{-spacing}++;
}
}
}
}
# always report if the Class has trailing information
if ( delete $found{-trailing} ) {
print "$File::Find::name ClassWithTrailingInformation\n";
}
# always report if the Class has spacing problem
if ( delete $found{-spacing} ) {
print "$File::Find::name ClassWithSpacingIssue\n";
}
if (%classes) {
## we have 'Class' tag
if ( defined $currentClass ) {
if ($namespace) {
my ($currentNamespace) = $currentClass =~ m{^(.+::)};
$currentNamespace ||= '';
if ( $namespace ne $currentNamespace ) {
$currentClass =~ s{^(.+::)}{};
$currentClass ||= $fileClass;
print "$File::Find::name $namespace$currentClass\n";
}
}
elsif ( not $currentClass ) {
## supply a class name
print "$File::Find::name $fileClass\n";
}
}
}
else {
## no classes, all tags are deemed suspicious
for ( sort keys %found ) {
print "$File::Find::name In$_\n";
}
}
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

View File

@ -0,0 +1,54 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-templateInComments
#
# Description
# Search for *.[CH] files with '<xxx>' tags within the first comment block
# These likely need to be quoted as '\<xxx\>' for Doxygen.
# - print filename and lineNumber
#
# -----------------------------------------------------------------------------
my $re_filespec = qr{^.+\.[CH]$};
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
local @ARGV = $_;
while (<>) {
if (m{^\s*/\*} ... m{\*/})
{
if (m{\<\s*\w+\s*\>}) {
print "$File::Find::name line=$.\n";
}
if (m{\*/}) {
last;
}
}
}
close ARGV;
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

View File

@ -0,0 +1,77 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-tinyDescription
#
# Description
# Search for *.[H] files with 'Class' starting in the first column
# and a missing Description, or a tiny Description.
# A tiny Description is less than XX letters and does not resemble
# the class name. We'll look for descriptions matching the class name
# in a later pass.
#
# - print filename '#' and the description
#
# -----------------------------------------------------------------------------
my $minLength = 16;
my $re_filespec = qr{^.+\.[H]$};
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
my ( $currentClass, $description );
local @ARGV = $_;
while (<>) {
my $name;
## examine the class name
if (/^Class\s*$/) {
$_ = <>;
($currentClass) = split;
}
if (/^Description\s*$/) {
$_ = <>;
( $description = $_ ) =~ s{^\s+|\s+$}{}g;
# remove trailing punctuation as being noise
$description =~ s{\s*[.,:]+$}{};
last;
}
}
$description ||= '';
## we have 'Class' tag
if ( defined $currentClass ) {
# description doesnt looks like a class name
if (
$description !~ m{^\w+(::\w+)+$}
and
(length $description < $minLength or $description =~ m{^\S+$})
) {
print "$File::Find::name # $description\n";
}
}
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

111
doc/Doxygen/tools/fix-Class Executable file
View File

@ -0,0 +1,111 @@
#!/bin/sh
# -----------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
# \\/ M anipulation |
# ------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Script
# fix-Class
#
# Description
# Process the lists given on the command line.
# Column 1 = fileName, column 2 = Class or action
# See find-suspiciousTags for details.
#
# 1. fix ClassWithTrailingInformation by hand
# 2. InClass and InNamespace fixup
# 3. change
# |Class
# | anything
# ->
# |Class
# | className
#
# -----------------------------------------------------------------------------
# stop if trailing junk has been detected
for fileList
do
[ -f $fileList -a -r $fileList ] || {
echo "cannot read file list: $fileList"
exit 1
}
grep ClassWithTrailingInformation $fileList
if [ $? = 0 ]
then
echo "#"
echo "# fix ClassWithTrailingInformation by hand"
echo "#"
exit 99
fi
done
for fileList
do
# repair InClass, InNamespace
for tag in Class Namespace
do
backup=".repair-In$tag"
for file in $(sed -n -e "s/In$tag *$//p" $fileList)
do
echo "repair In$tag: $file"
perl -i$backup -pe "s/^$tag/In$tag/" $file
done
done
# repair the class names (with namespace)
backup=".repair-reclassify"
cat $fileList | while read fileName className
do
# use classes with '::' separator to avoid too
# many false positives
perl -i$backup -x $0 $fileName $className
done
done
exit 0
# ---------------------------------------------------------------- end-of-file
# embedded Perl program
#!/usr/bin/perl -w
use strict;
# args: fileName className
# - className must contain '::'
my $className = pop;
@ARGV == 1 and ($className ||= '') =~ /::/ or exit 1;
warn "repair: @ARGV $className\n";
while (<>)
{
if (/^Class\s*$/) {
print;
$_ = <>; # get and discard the next line
$_ = " $className\n";
}
print;
}
# ---------------------------------------------------------------- end-of-file

226
doc/GUIDELINES Normal file
View File

@ -0,0 +1,226 @@
The guidelines document the current style or a recommended style for
documenting OpenFOAM source code (.C and .H) files.
General
~~~~~~~
- For readability in the comment blocks, certain tags are used that are
translated by pre-filtering the file before sending it to doxygen.
- The tags start in column 1, the contents follow on the next lines and
indented by 4 spaces. The filter removes the leading 4 spaces from the
following lines until the next tag that starts in column 1.
- The 'Class' and 'Description' tags are the most important ones.
- The first paragraph following the 'Description' will be used for the brief
description, the remaining paragraphs become the detailed description.
eg,
|-------------------------
|
|Class
| Foam::myClass
|
|Description
| A class for specifying the documentation style.
|
| The class is implemented as a set of recommendations that may
| sometimes be useful.
|
|-------------------------
- The class name must be qualified by its namespace, otherwise doxygen
will think you are documenting some other class.
- If you don't have anything to say about the class (at the moment),
use the namespace-qualified class name for the description.
This aids with finding these under-documented classes later.
eg,
|-------------------------
|
|Class
| Foam::myUnderDocumentedClass
|
|Description
| Foam::myUnderDocumentedClass
|
|-------------------------
- Use 'Class' and 'Namespace' tags in the header files.
The Description block then applies to documenting the class.
- Use 'InClass' and 'InNamespace' in the source files.
The Description block then applies to documenting the file itself.
eg,
|-------------------------
|
|InClass
| Foam::myClass
|
|Description
| Implements the read and writing of files.
|
|-------------------------
Doxygen Special Commands
~~~~~~~~~~~~~~~~~~~~~~~~
Doxygen has a large number of special commands with a '\' prefix or
a (alternatively) an '@' prefix.
The '@' prefix form is recommended for most doxygen specials, since it has
the advantage of standing out. It also happens to be what projects like gcc
and VTK are using.
The '\' prefix form, however, looks a bit better for the '\n' newline command
and when escaping single characters - eg, '\@', '\<', '\>', etc.
Since the filtering removes the leading 4 spaces within the blocks,
the doxygen commmands can be inserted within the block without problems.
eg,
|-------------------------
|
|InClass
| Foam::myClass
|
|Description
| Implements the read and writing of files.
|
| An example input file:
| @verbatim
| patchName
| {
| type myPatchType;
| refValue 100;
| value uniform 1;
| }
| @endverbatim
|
| Within the implementation, a loop over all patches is done:
| @code
| forAll (patches, patchI)
| {
| ... // some operation
| }
| @endcode
|
|-------------------------
HTML Special Commands
~~~~~~~~~~~~~~~~~~~~~
Since Doxygen also handles HTML tags to a certain extent, the angle brackets
need quoting in the documentation blocks. Non-HTML tags cause doxygen to
complain, but seem to work anyhow.
eg,
The template with type <HR> is a bad example.
The template with type \<HR\> is a better example.
The template with type <Type> causes doxygen to complain about
an unknown html type, but it seems to work okay anyhow.
Documenting Namespaces
~~~~~~~~~~~~~~~~~~~~~~
- If namespaces are explictly declared with the Namespace() macro,
they should be documented there.
- If the namespaces is used to hold sub-models, the namespace can be
documented in the same file as the class with the model selector.
eg,
documented namespace 'Foam::functionEntries' within the
class 'Foam::functionEntry'
- If nothing else helps, find some sensible header.
eg,
namespace 'Foam' is documented in the foamVersion.H file
Documenting Typedefs and classes defined via macros
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... not yet properly resolved
Documenting Applications
~~~~~~~~~~~~~~~~~~~~~~~~
Any number of classes might be defined by a particular application, but
these classes will not, however, be available to other parts of OpenFOAM. At
the moment, the sole purpuse for running doxygen on the applications is to
extract program usage information for the '-doc' option.
The documentation for a particular application is normally contained within
the first comment block in a .C source file. The solution is this to invoke
a special filter for the "applications/{solver,utilities}" directories that
only allows the initial comment block for the .C files through.
The layout of the application documentation has not yet been finalized, but
foamToVTK shows an initial attempt.
Ignored files and directories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ignore directories of linked files
- */lnInclude/*
Ignore test directories
- */t/*
Ignore applications that clutter everything
- preProcessing/FoamX
Ignore application-specific classes
- */applications/utilities/*.H
- */applications/solvers/*.H
Orthography (always good for a flame-war)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Given the origins of OpenFOAM, the British spellings (eg, neighbour and not
neighbor) are generally favoured. For code sections that interact with
external libraries, it can be useful to adopt American spellings, especially
for names that constitute a significant part of the external library - eg,
'color' within graphics sub-systems.
Both '-ize' and the '-ise' variant are found in the code comments.
If used as a variable or class method name, it is probably better to use '-ize',
which is considered the main form by the Oxford University Press.
Eg,
myClass.initialize()
The word "its" (possesive) vs. "it's" (colloquial for "it is" or "it has")
seems to confuse non-native (and some native) English speakers.
It is better to donate the extra keystrokes and write "it is" or "it has".
Any remaining "it's" are likely an incorrect spelling of "its".
Housekeeping
~~~~~~~~~~~~
The doc/Doxygen/tools directory contains miscellaneous scripts for finding
and possibly repairing documentation issues.
Updated: 2008-03-17