fix minor typos

This commit is contained in:
Mark Olesen
2008-06-11 15:08:13 +02:00
parent 79475c871e
commit 52c2bfc519
4 changed files with 58 additions and 63 deletions

63
README
View File

@ -29,8 +29,8 @@
2. System requirements 2. System requirements
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
OpenFOAM is developed and tested on Linux, but should work with other OpenFOAM is developed and tested on Linux, but should work with other
Unix style system. To check your system setup, execute the foamSystemCheck Unix style systems. To check your system setup, execute the foamSystemCheck
script in the bin directory of the OpenFOAM installation. If no problems script in the bin/ directory of the OpenFOAM installation. If no problems
are reported, proceed to "3. Installation"; otherwise contact your are reported, proceed to "3. Installation"; otherwise contact your
system administrator. system administrator.
@ -40,7 +40,6 @@
3. Installation 3. Installation
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
Download and unpack the files in the $HOME/OpenFOAM directory as described Download and unpack the files in the $HOME/OpenFOAM directory as described
in: http://www.OpenFOAM.org/download.html in: http://www.OpenFOAM.org/download.html
@ -77,10 +76,9 @@
3.1. Installation in alternative locations 3.1. Installation in alternative locations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OpenFOAM may also be installed in alternative locations. However, the
OpenFOAM may also be installed in an alternative location. installation directory should be network available (e.g., NFS) if
However, the installation directory must be network available parallel calculations are planned.
(eg, NFS) if parallel calculations are planned.
The environment variable 'FOAM_INST_DIR' can be used to find and source The environment variable 'FOAM_INST_DIR' can be used to find and source
the appropriate resource file. Here is a bash/ksh/sh example: the appropriate resource file. Here is a bash/ksh/sh example:
@ -89,7 +87,7 @@
foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
[ -f $foamDotFile ] && . $foamDotFile [ -f $foamDotFile ] && . $foamDotFile
and a csh example: and a csh/tcsh example:
setenv FOAM_INST_DIR /data/app/OpenFOAM setenv FOAM_INST_DIR /data/app/OpenFOAM
foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc foamDotFile=$FOAM_INST_DIR/OpenFOAM-<VERSION>/etc/bashrc
@ -102,9 +100,8 @@
4. Building from Sources (Optional) 4. Building from Sources (Optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you cannot find an appropriate binary pack for your platform, you can If you cannot find an appropriate binary pack for your platform, you can
build the complete OpenFOAM from the source-pack. First you will need to build the complete OpenFOAM from the source-pack. You will first need to
compile or obtain a recent version of gcc (we recomend gcc-4.2.?) for compile or obtain a recent version of gcc (we recomend gcc-4.2.?) for
your platform, which may be obtained from http://gcc.gnu.org/. your platform, which may be obtained from http://gcc.gnu.org/.
@ -114,29 +111,27 @@
$WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the $WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the
environment variables as in section 3. environment variables as in section 3.
Now go to the top-level source directory $WM_PROJECT_DIR and type Now go to the top-level source directory $WM_PROJECT_DIR and execute the
./Allwmake, which is the name of the top-level build script for building top-level build script './Allwmake'. In principle this will build
the whole of OpenFOAM. In principle this will build everything, but everything, but if problems occur with the build order it may be necessary
sometimes problems occur with the build order and it is necessary to to update the environment variables and re-execute 'Allwmake'. If you
update the environment variables and re-execute Allwmake. If you experience difficulties with building the source-pack, or your platform is
experience difficulties with building the source-pack or your platform is not currently supported, please contact <enquiries@OpenCFD.co.uk> to
not currently supported please contact <enquiries@OpenCFD.co.uk> to negotiate a support contract and we will do the port and maintain it for
negotiate a support contract and we will do the port and maintain it in
future releases. future releases.
5. Testing the installation 5. Testing the installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
To check your installation setup, execute the 'foamInstallationTest' To check your installation setup, execute the 'foamInstallationTest'
script (in the bin directory of the OpenFOAM installation). If no problems script (in the bin/ directory of the OpenFOAM installation). If no
are reported, proceed to getting started with OpenFOAM; otherwise, go back problems are reported, proceed to getting started with OpenFOAM;
and check you have installed the software correctly and/or contact your otherwise, go back and check you have installed the software correctly
system administrator. and/or contact your system administrator.
6. Getting Started 6. Getting Started
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
Create a project directory within the $HOME/OpenFOAM directory named Create a project directory within the $HOME/OpenFOAM directory named
<USER>-<VERSION> (e.g. 'chris-1.5' for user chris and OpenFOAM version 1.5) <USER>-<VERSION> (e.g. 'chris-1.5' for user chris and OpenFOAM version 1.5)
and create a directory named 'run' within it, e.g. by typing: and create a directory named 'run' within it, e.g. by typing:
@ -144,7 +139,7 @@
mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
Copy the 'tutorial' examples directory in the OpenFOAM distribution to the Copy the 'tutorial' examples directory in the OpenFOAM distribution to the
'run' directory. If OpenFOAM environment variables are set correctly, 'run' directory. If the OpenFOAM environment variables are set correctly,
then the following command will be correct: then the following command will be correct:
cp -r $WM_PROJECT_DIR/tutorials $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run cp -r $WM_PROJECT_DIR/tutorials $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
@ -158,27 +153,27 @@
7. Documentation 7. Documentation
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
http://www.OpenFOAM.org/doc http://www.OpenFOAM.org/doc
8. Help 8. Help
~~~~~~~ ~~~~~~~
http://www.OpenFOAM.org http://www.OpenFOAM.org
http://www.OpenFOAM.org/discussion.html http://www.OpenFOAM.org/discussion.html
9. Reporting Bugs in OpenFOAM 9. Reporting Bugs in OpenFOAM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.OpenFOAM.org/bugs.html http://www.OpenFOAM.org/bugs.html
A. Running OpenFOAM in 32-bit mode on 64-bit machines A. Running OpenFOAM in 32-bit mode on 64-bit machines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Those users with an installation of Linux on a 64-bit machine may install Linux users with a 64-bit machine may install either the OpenFOAM 32-bit
either or both of the 32-bit version of OpenFOAM (linux) or the 64-bit version (linux) or the OpenFOAM 64-bit version (linux64), or both.
version of FOAM (linux64) with 64-bit being the default mode. In order to The 64-bit is the default mode on a 64-bit machine. To use an installed
set up the user to run in 32-bit mode, the user must set the environment 32-bit version, the user must set the environment variable $WM_32 (to
variable $WM_32 (to anything, e.g. "on") before sourcing the etc/bashrc anything, e.g. "on") before sourcing the etc/bashrc (or etc/cshrc) file.
(or etc/cshrc) file. Unsetting $WM_32 and sourcing the bashrc file will Unsetting WM_32 and re-sourcing the etc/bashrc (or etc/cshrc) file will
set up the user to run in 64-bit mode. set up the user to run in 64-bit mode.

View File

@ -195,15 +195,15 @@ Foam::label Foam::dictionary::endLineNumber() const
} }
bool Foam::dictionary::found(const word& keyword, bool recusive) const bool Foam::dictionary::found(const word& keyword, bool recursive) const
{ {
if (hashedEntries_.found(keyword)) if (hashedEntries_.found(keyword))
{ {
return true; return true;
} }
else if (recusive && &parent_ != &dictionary::null) else if (recursive && &parent_ != &dictionary::null)
{ {
return parent_.found(keyword, recusive); return parent_.found(keyword, recursive);
} }
else else
{ {
@ -215,16 +215,16 @@ bool Foam::dictionary::found(const word& keyword, bool recusive) const
const Foam::entry* Foam::dictionary::lookupEntryPtr const Foam::entry* Foam::dictionary::lookupEntryPtr
( (
const word& keyword, const word& keyword,
bool recusive bool recursive
) const ) const
{ {
HashTable<entry*>::const_iterator iter = hashedEntries_.find(keyword); HashTable<entry*>::const_iterator iter = hashedEntries_.find(keyword);
if (iter == hashedEntries_.end()) if (iter == hashedEntries_.end())
{ {
if (recusive && &parent_ != &dictionary::null) if (recursive && &parent_ != &dictionary::null)
{ {
return parent_.lookupEntryPtr(keyword, recusive); return parent_.lookupEntryPtr(keyword, recursive);
} }
else else
{ {
@ -239,19 +239,19 @@ const Foam::entry* Foam::dictionary::lookupEntryPtr
Foam::entry* Foam::dictionary::lookupEntryPtr Foam::entry* Foam::dictionary::lookupEntryPtr
( (
const word& keyword, const word& keyword,
bool recusive bool recursive
) )
{ {
HashTable<entry*>::iterator iter = hashedEntries_.find(keyword); HashTable<entry*>::iterator iter = hashedEntries_.find(keyword);
if (iter == hashedEntries_.end()) if (iter == hashedEntries_.end())
{ {
if (recusive && &parent_ != &dictionary::null) if (recursive && &parent_ != &dictionary::null)
{ {
return const_cast<dictionary&>(parent_).lookupEntryPtr return const_cast<dictionary&>(parent_).lookupEntryPtr
( (
keyword, keyword,
recusive recursive
); );
} }
else else
@ -267,10 +267,10 @@ Foam::entry* Foam::dictionary::lookupEntryPtr
const Foam::entry& Foam::dictionary::lookupEntry const Foam::entry& Foam::dictionary::lookupEntry
( (
const word& keyword, const word& keyword,
bool recusive bool recursive
) const ) const
{ {
const entry* ePtr = lookupEntryPtr(keyword, recusive); const entry* ePtr = lookupEntryPtr(keyword, recursive);
if (ePtr == NULL) if (ePtr == NULL)
{ {
@ -291,10 +291,10 @@ const Foam::entry& Foam::dictionary::lookupEntry
Foam::ITstream& Foam::dictionary::lookup Foam::ITstream& Foam::dictionary::lookup
( (
const word& keyword, const word& keyword,
bool recusive bool recursive
) const ) const
{ {
return lookupEntry(keyword, recusive).stream(); return lookupEntry(keyword, recursive).stream();
} }

View File

@ -31,8 +31,8 @@ Description
The dictionary class is the base class for IOdictionary. The dictionary class is the base class for IOdictionary.
It serves the purpose of a bootstrap dictionary for the objectRegistry It serves the purpose of a bootstrap dictionary for the objectRegistry
data dictionaries, since unlike the IOdictionary class, it does not use a data dictionaries, since unlike the IOdictionary class, it does not use
objectRegistry itself to work. a objectRegistry itself to work.
SourceFiles SourceFiles
dictionary.C dictionary.C
@ -171,31 +171,31 @@ public:
// Search and lookup // Search and lookup
//- Search dictionary for given keyword //- Search dictionary for given keyword
// If recusive search parent dictionaries // If recursive search parent dictionaries
bool found(const word& keyword, bool recusive=false) const; bool found(const word& keyword, bool recursive=false) const;
//- Find and return an entry data stream pointer if present //- Find and return an entry data stream pointer if present
// otherwise return NULL. // otherwise return NULL.
// If recusive search parent dictionaries // If recursive search parent dictionaries
const entry* lookupEntryPtr(const word&, bool recusive=false) const; const entry* lookupEntryPtr(const word&, bool recursive=false) const;
//- Find and return an entry data stream pointer for manipulation //- Find and return an entry data stream pointer for manipulation
// if present otherwise return NULL. // if present otherwise return NULL.
// If recusive search parent dictionaries // If recursive search parent dictionaries
entry* lookupEntryPtr(const word&, bool recusive=false); entry* lookupEntryPtr(const word&, bool recursive=false);
//- Find and return an entry data stream if present otherwise error. //- Find and return an entry data stream if present otherwise error.
// If recusive search parent dictionaries // If recursive search parent dictionaries
const entry& lookupEntry(const word&, bool recusive=false) const; const entry& lookupEntry(const word&, bool recursive=false) const;
//- Find and return an entry data stream //- Find and return an entry data stream
// If recusive search parent dictionaries // If recursive search parent dictionaries
ITstream& lookup(const word&, bool recusive=false) const; ITstream& lookup(const word&, bool recursive=false) const;
//- Find and return a T, if not found return the given default value //- Find and return a T, if not found return the given default value
// If recusive search parent dictionaries // If recursive search parent dictionaries
template<class T> template<class T>
T lookupOrDefault(const word&, const T&, bool recusive=false) const; T lookupOrDefault(const word&, const T&, bool recursive=false) const;
//- Check if entry is a sub-dictionary //- Check if entry is a sub-dictionary
bool isDict(const word&) const; bool isDict(const word&) const;

View File

@ -34,10 +34,10 @@ T Foam::dictionary::lookupOrDefault
( (
const word& keyword, const word& keyword,
const T& deft, const T& deft,
bool recusive bool recursive
) const ) const
{ {
const entry* ePtr = lookupEntryPtr(keyword, recusive); const entry* ePtr = lookupEntryPtr(keyword, recursive);
if (ePtr == NULL) if (ePtr == NULL)
{ {