Merge branch 'master' into pairPatchAgglomeration

This commit is contained in:
sergio
2011-02-14 09:47:05 +00:00
315 changed files with 3930 additions and 10949 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -109,8 +109,7 @@ namespace Foam
//! @cond internalClass
//- Internal tracking via stat(3p) or inotify(7)
//- Internal tracking via stat(3p) or inotify(7)
class fileMonitorWatcher
{
public:
@ -140,7 +139,7 @@ namespace Foam
{
if (useInotify_)
{
#ifdef FOAM_USE_INOTIFY
#ifdef FOAM_USE_INOTIFY
inotifyFd_ = inotify_init();
dirWatches_.setCapacity(sz);
dirFiles_.setCapacity(sz);
@ -167,13 +166,13 @@ namespace Foam
<< endl;
}
}
#else
#else
FatalErrorIn("fileMonitorWatcher(const bool, const label)")
<< "You selected inotify but this file was compiled"
<< " without FOAM_USE_INOTIFY"
<< "Please select another fileModification test method"
<< exit(FatalError);
#endif
#endif
}
else
{
@ -184,7 +183,7 @@ namespace Foam
//- remove all watches
inline ~fileMonitorWatcher()
{
#ifdef FOAM_USE_INOTIFY
#ifdef FOAM_USE_INOTIFY
if (useInotify_ && inotifyFd_ >= 0)
{
forAll(dirWatches_, i)
@ -200,7 +199,7 @@ namespace Foam
}
}
}
#endif
#endif
}
inline bool addWatch(const label watchFd, const fileName& fName)
@ -212,7 +211,7 @@ namespace Foam
return false;
}
#ifdef FOAM_USE_INOTIFY
#ifdef FOAM_USE_INOTIFY
// Add/retrieve watch on directory containing file.
// Note that fName might be non-existing in special situations
// (master-only reading for IODictionaries)
@ -250,7 +249,7 @@ namespace Foam
dirWatches_(watchFd) = dirWatchID;
dirFiles_(watchFd) = fName.name();
#endif
#endif
}
else
{
@ -288,7 +287,6 @@ namespace Foam
}
};
//! @endcond
}
@ -298,7 +296,7 @@ void Foam::fileMonitor::checkFiles() const
{
if (useInotify_)
{
#ifdef FOAM_USE_INOTIFY
#ifdef FOAM_USE_INOTIFY
// Large buffer for lots of events
char buffer[EVENT_BUF_LEN];
@ -392,7 +390,7 @@ void Foam::fileMonitor::checkFiles() const
return;
}
}
#endif
#endif
}
else
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,7 +29,7 @@ Description
SeeAlso
The manpage regex(7) for more information about POSIX regular expressions.
These differ somewhat from @c Perl and @c sed regular expressions.
These differ somewhat from \c Perl and @c sed regular expressions.
SourceFiles
regExp.C

View File

@ -28,9 +28,9 @@ Description
Set up trapping for floating point exceptions (signal FPE).
Controlled by two env vars:
@param FOAM_SIGFPE \n
\param FOAM_SIGFPE \n
exception trapping
@param FOAM_SETNAN \n
\param FOAM_SETNAN \n
initialization of all malloced memory to NaN. If FOAM_SIGFPE
also set, this will cause usage of uninitialized scalars to trigger
an abort.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,7 @@ Description
Implements a timeout mechanism via sigalarm.
Example usage:
@code
\code
timer myTimer(5); // 5 sec
..
if (timedOut(myTimer))
@ -39,7 +39,7 @@ Description
{
// do something possible blocking
}
@endcode
\endcode
Constructor set signal handler on sigalarm and alarm(). Destructor
clears these.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -236,10 +236,10 @@ public:
//- Read a bracket-delimited list, or handle a single value as list of size 1.
// For example,
// @code
// \code
// wList = readList<word>(IStringStream("(patch1 patch2 patch3)")());
// wList = readList<word>(IStringStream("patch0")());
// @endcode
// \endcode
// Mostly useful for handling command-line arguments.
template<class T>
List<T> readList(Istream&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,7 +37,7 @@ Description
in one go, minimizing communication, and then picked apart and recombined.
Example:
@code
\code
// Assuming myContainer defined which holds all the data I want to
// transfer (say a pointField and a faceList). myContainer also defines
// access operators to
@ -76,7 +76,7 @@ Description
gatheredData, sizes, myContainerFaces(), offsetOp<face>()
)
);
@endcode
\endcode
SourceFiles
ListListOps.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,7 +54,7 @@ namespace Foam
// Forward declaration
class PackedBoolList;
//- @typedef A List of PackedBoolList
//- \typedef A List of PackedBoolList
typedef List<PackedBoolList> PackedBoolListList;
/*---------------------------------------------------------------------------*\

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,11 +42,11 @@ Note
Using the iteratorBase as a proxy allows assignment of values
between list elements. Thus the following bit of code works as expected:
@code
\code
list[1] = list[5]; // value assignment, not iterator position
list[2] = list[5] = 4; // propagates value
list[1] = list[5] = list[6]; // propagates value
@endcode
\endcode
Using get() or the '[]' operator are similarly fast. Looping and reading
via an iterator is approx. 15% slower, but can be more flexible.
@ -56,21 +56,21 @@ Note
advantage of also returning a bool if the value changed. This can be
useful for branching on changed values.
@code
\code
list[5] = 4;
changed = list.set(5, 8);
if (changed) ...
@endcode
\endcode
The lazy evaluation used means that reading an out-of-range element
returns zero, but does not affect the list size. Even in a non-const
context, only the assigment itself causes the element to be created.
For example,
@code
\code
list.resize(4);
Info<< list[10] << "\n"; // print zero, but doesn't adjust list
list[8] = 1;
@endcode
\endcode
Also note that all unused internal storage elements are guaranteed to
always be bit-wise zero. This property must not be violated by any
@ -79,14 +79,14 @@ Note
In addition to the normal output format, PackedList also supports a
compact ASCII format that may be convenient for user input in some
situations. The general format is a group of index/value pairs:
@verbatim
\verbatim
{ (index1 value1) (index2 value2) (index3 value3) }
@endverbatim
\endverbatim
The bool specialization just uses the indices corresponding to
non-zero entries instead of a index/value pair:
@verbatim
\verbatim
{ index1 index2 index3 }
@endverbatim
\endverbatim
In both cases, the supplied indices can be randomly ordered.
SeeAlso
@ -356,14 +356,14 @@ public:
//
// The indexed output may be convenient in some situations.
// The general format is a group of index/value pairs:
// @verbatim
// \verbatim
// { (index1 value1) (index2 value2) (index3 value3) }
// @endverbatim
// \endverbatim
// The bool specialization just uses the indices corresponding to
// non-zero entries instead of a index/value pair:
// @verbatim
// \verbatim
// { index1 index2 index3 }
// @endverbatim
// \endverbatim
//
// Note the indexed output is only supported for ASCII streams.
Ostream& write

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -367,28 +367,28 @@ inline void reverse(UList<T>&);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
/**
* @def forAll(list, i)
* Loop across all elements in @a list
* @par Usage
* @code
* \def forAll(list, i)
* Loop across all elements in \a list
* \par Usage
* \code
* forAll(anyList, i)
* {
* statements;
* }
* @endcode
* @sa forAllReverse
* \endcode
* \sa forAllReverse
*/
/**
* @def forAllReverse(list, i)
* Reverse loop across all elements in @a list
* @par Usage
* @code
* \def forAllReverse(list, i)
* Reverse loop across all elements in \a list
* \par Usage
* \code
* forAllReverse(anyList, i)
* {
* statements;
* }
* @endcode
* @sa forAll
* \endcode
* \sa forAll
*/
#define forAll(list, i) \
for (Foam::label i=0; i<(list).size(); i++)
@ -397,17 +397,17 @@ inline void reverse(UList<T>&);
for (Foam::label i=(list).size()-1; i>=0; i--)
/**
* @def forAllIter(Container, container, iter)
* Iterate across all elements in the @a container object of type
* @a Container.
* @par Usage
* @code
* \def forAllIter(Container, container, iter)
* Iterate across all elements in the \a container object of type
* \a Container.
* \par Usage
* \code
* forAll(ContainerType, container, iter)
* {
* statements;
* }
* @endcode
* @sa forAllConstIter
* \endcode
* \sa forAllConstIter
*/
#define forAllIter(Container,container,iter) \
for \
@ -418,17 +418,17 @@ inline void reverse(UList<T>&);
)
/**
* @def forAllConstIter(Container, container, iter)
* Iterate across all elements in the @a container object of type
* @a Container with const access.
* @par Usage
* @code
* \def forAllConstIter(Container, container, iter)
* Iterate across all elements in the \a container object of type
* \a Container with const access.
* \par Usage
* \code
* forAllConstIter(ContainerType, container, iter)
* {
* statements;
* }
* @endcode
* @sa forAllIter
* \endcode
* \sa forAllIter
*/
#define forAllConstIter(Container,container,iter) \
for \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,32 +33,32 @@ Description
path, a reference to a objectRegistry, and parameters determining its
storage status.
@par Read options
\par Read options
Define what is done on object construction and explicit reads:
@param MUST_READ
\param MUST_READ
Object must be read from Istream on construction. \n
Error if Istream does not exist or can't be read.
Does not check timestamp or re-read.
@param MUST_READ_IF_MODIFIED
\param MUST_READ_IF_MODIFIED
Object must be read from Istream on construction. \n
Error if Istream does not exist or can't be read. If object is
registered its timestamp will be checked every timestep and possibly
re-read.
@param READ_IF_PRESENT
\param READ_IF_PRESENT
Read object from Istream if Istream exists, otherwise don't. \n
Error only if Istream exists but can't be read.
Does not check timestamp or re-read.
@param NO_READ
\param NO_READ
Don't read
@par Write options
\par Write options
Define what is done on object destruction and explicit writes:
@param AUTO_WRITE
\param AUTO_WRITE
Object is written automatically when requested to by the
objectRegistry.
@param NO_WRITE
\param NO_WRITE
No automatic write on destruction but can be written explicitly
SourceFiles

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -393,39 +393,39 @@ public:
//- Return true if run should continue,
// also invokes the functionObjectList::end() method
// when the time goes out of range
// @note
// \note
// For correct behaviour, the following style of time-loop
// is recommended:
// @code
// \code
// while (runTime.run())
// {
// runTime++;
// solve;
// runTime.write();
// }
// @endcode
// \endcode
virtual bool run() const;
//- Return true if run should continue and if so increment time
// also invokes the functionObjectList::end() method
// when the time goes out of range
// @note
// \note
// For correct behaviour, the following style of time-loop
// is recommended:
// @code
// \code
// while (runTime.loop())
// {
// solve;
// runTime.write();
// }
// @endcode
// \endcode
virtual bool loop();
//- Return true if end of run,
// does not invoke any functionObject methods
// @note
// \note
// The rounding heuristics near endTime mean that
// @code run() @endcode and @code !end() @endcode may
// \code run() \endcode and \code !end() \endcode may
// not yield the same result
virtual bool end() const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ Description
The timeSelector provides a convenient means of selecting multiple
times. A typical use would be the following:
@verbatim
\verbatim
timeSelector::addOptions();
// add other options
#include "setRootCase.H"
@ -41,27 +41,27 @@ Description
{
...
}
@endverbatim
\endverbatim
The result program would receive @b -time, @b -latestTime, @b -constant
and @b -noZero options. The @b -constant option explicitly includes the
@c constant/ directory in the time list and the @b -noZero option
explicitly excludes the @c 0/ directory from the time list.
The result program would receive \b -time, @b -latestTime, @b -constant
and \b -noZero options. The @b -constant option explicitly includes the
\c constant/ directory in the time list and the \b -noZero option
explicitly excludes the \c 0/ directory from the time list.
There may however also be many cases in which neither the @c constant/
directory nor the @c 0/ directory contain particularly relevant
There may however also be many cases in which neither the \c constant/
directory nor the \c 0/ directory contain particularly relevant
information. This might occur, for example, when post-processing
results. In this case, addOptions is called with optional boolean
arguments.
@verbatim
\verbatim
timeSelector::addOptions(false, true);
@endverbatim
\endverbatim
The first argument avoids adding the @b -constant option. The second
argument adds an additional @b -zeroTime option and also prevents the
@c 0/ directory from being included in the default time range and in the
@b -latestTime selection.
The first argument avoids adding the \b -constant option. The second
argument adds an additional \b -zeroTime option and also prevents the
\c 0/ directory from being included in the default time range and in the
\b -latestTime selection.
SourceFiles
timeSelector.C
@ -119,15 +119,15 @@ public:
//- Add the options handled by timeSelector to argList::validOptions
//
// @param constant
// Add the @b -constant option to include the @c constant/ directory
// \param constant
// Add the \b -constant option to include the \c constant/ directory
//
// @param zeroTime
// Enable the @b -zeroTime option and alter the normal time selection
// behaviour (and @b -latestTime behaviour) to exclude the @c 0/
// directory. The @c 0/ directory will only be included when
// @b -zeroTime is specified.
// The @b -noZero option has precedence over the @b -zeroTime option.
// \param zeroTime
// Enable the \b -zeroTime option and alter the normal time selection
// behaviour (and \b -latestTime behaviour) to exclude the \c 0/
// directory. The \c 0/ directory will only be included when
// \b -zeroTime is specified.
// The \b -noZero option has precedence over the @b -zeroTime option.
static void addOptions
(
const bool constant=true,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ Description
A functionEntry causes entries to be added/manipulated on the specified
dictionary given an input stream.
In dictionaries, a @c '\#' sigil is typically used for a functionEntry.
In dictionaries, a \c '\#' sigil is typically used for a functionEntry.
SourceFiles
functionEntry.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,13 +28,13 @@ Description
Specify an include file when reading dictionaries, expects a
single string to follow.
An example of the @c \#include directive:
@verbatim
An example of the \c \#include directive:
\verbatim
#include "includeFile"
@endverbatim
\endverbatim
The usual expansion of environment variables and other constructs
(eg, the @c ~OpenFOAM/ expansion) is retained.
(eg, the \c ~OpenFOAM/ expansion) is retained.
See Also
fileName, string::expand()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ Class
Description
Specify a file to include if it exists. Expects a single string to follow.
The @c \#includeIfPresent directive is similar to the @c \#include
The \c \#includeIfPresent directive is similar to the @c \#include
directive, but does not generate an error if the file does not exist.
See Also

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,18 +28,18 @@ Description
Specify the input mode when reading dictionaries, expects
a single word to follow.
An example of @c \#inputMode directive:
@verbatim
An example of \c \#inputMode directive:
\verbatim
#inputMode merge
@endverbatim
\endverbatim
The possible input modes:
@param merge merge sub-dictionaries when possible
@param overwrite keep last entry and silently remove previous ones
@param protect keep initial entry and silently ignore subsequent ones
@param warn keep initial entry and warn about subsequent ones
@param error issue a FatalError for duplicate entries
@param default currently identical to merge
\param merge merge sub-dictionaries when possible
\param overwrite keep last entry and silently remove previous ones
\param protect keep initial entry and silently ignore subsequent ones
\param warn keep initial entry and warn about subsequent ones
\param error issue a FatalError for duplicate entries
\param default currently identical to merge
SourceFiles
inputModeEntry.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,14 +27,14 @@ Class
Description
Remove a dictionary entry.
The @c \#remove directive takes a list or a single wordRe.
The \c \#remove directive takes a list or a single wordRe.
For example,
@verbatim
\verbatim
#remove entry0
#remove ( entry1 entry2 entry3 otherEntry )
#remove "entry[1-3]"
#remove ( "entry[1-3]" otherEntry )
@endverbatim
\endverbatim
The removal only occurs in the current context.
Removing sub-entries or parent entries is not supported.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -72,7 +72,7 @@ class StaticAssertionTest {};
// external use:
// ~~~~~~~~~~~~~
/**
* @def StaticAssert(Test)
* \def StaticAssert(Test)
* Assert that some test is true at compile-time
*/
#define StaticAssert(Test) \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,10 +35,10 @@ Description
handling has beed switched on (off by default).
Usage
@code
\code
error << "message1" << "message2" << FoamDataType << exit(errNo);
error << "message1" << "message2" << FoamDataType << abort();
@endcode
\endcode
SourceFiles
error.C
@ -296,7 +296,7 @@ extern IOerror FatalIOError;
// Convenience macros to add the file name and line number to the function name
/**
* @def FatalErrorIn(functionName)
* \def FatalErrorIn(functionName)
* Report an error message using Foam::FatalError for functionName in
* file __FILE__ at line __LINE__
*/
@ -304,7 +304,7 @@ extern IOerror FatalIOError;
::Foam::FatalError((fn), __FILE__, __LINE__)
/**
* @def FatalIOErrorIn(functionName, ios)
* \def FatalIOErrorIn(functionName, ios)
* Report an error message using Foam::FatalIOError for functionName in
* file __FILE__ at line __LINE__
* for a particular IOstream
@ -313,12 +313,12 @@ extern IOerror FatalIOError;
::Foam::FatalIOError((fn), __FILE__, __LINE__, (ios))
/**
* @def notImplemented(functionName)
* \def notImplemented(functionName)
* Issue a FatalErrorIn for the functionName.
* This is used for functions that are not currently implemented.
* The functionName is printed and then abort is called.
*
* @note
* \note
* This macro can be particularly useful when methods must be defined to
* complete the interface of a derived class even if they should never be
* called for this derived class.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,10 +30,10 @@ Description
handling has been switched on (off by default).
Usage
@code
\code
error << "message1" << "message2" << FoamDataType << exit(error, errNo);
error << "message1" << "message2" << FoamDataType << abort(error);
@endcode
\endcode
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,10 +34,10 @@ Description
the messageStream class in the standard manner.
Usage
@code
\code
messageStream
<< "message1" << "message2" << FoamDataType << endl;
@endcode
\endcode
SourceFiles
messageStream.C
@ -214,7 +214,7 @@ extern messageStream Info;
// Convenience macros to add the file name and line number to the function name
/**
* @def SeriousErrorIn(functionName)
* \def SeriousErrorIn(functionName)
* Report an error message using Foam::SeriousError for functionName in
* file __FILE__ at line __LINE__
*/
@ -222,7 +222,7 @@ extern messageStream Info;
::Foam::SeriousError((fn), __FILE__, __LINE__)
/**
* @def SeriousIOErrorIn(functionName, ios)
* \def SeriousIOErrorIn(functionName, ios)
* Report an IO error message using Foam::SeriousError for functionName in
* file __FILE__ at line __LINE__
* for a particular IOstream
@ -231,7 +231,7 @@ extern messageStream Info;
::Foam::SeriousError((fn), __FILE__, __LINE__, ios)
/**
* @def WarningIn(functionName)
* \def WarningIn(functionName)
* Report a warning using Foam::Warning for functionName in
* file __FILE__ at line __LINE__
*/
@ -239,7 +239,7 @@ extern messageStream Info;
::Foam::Warning((fn), __FILE__, __LINE__)
/**
* @def IOWarningIn(functionName, ios)
* \def IOWarningIn(functionName, ios)
* Report an IO warning using Foam::Warning for functionName in
* file __FILE__ at line __LINE__
* for a particular IOstream
@ -248,7 +248,7 @@ extern messageStream Info;
::Foam::Warning((fn), __FILE__, __LINE__, (ios))
/**
* @def InfoIn(functionName)
* \def InfoIn(functionName)
* Report a information message using Foam::Info for functionName in
* file __FILE__ at line __LINE__
*/
@ -256,7 +256,7 @@ extern messageStream Info;
::Foam::Info((fn), __FILE__, __LINE__)
/**
* @def IOInfoIn(functionName, ios)
* \def IOInfoIn(functionName, ios)
* Report an IO information message using Foam::Info for functionName in
* file __FILE__ at line __LINE__
* for a particular IOstream

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,9 +30,9 @@ Description
Note
Since the timeIndex is used directly from Foam::Time, it is unaffected
by user-time conversions. For example, Foam::engineTime might cause @a
by user-time conversions. For example, Foam::engineTime might cause \a
writeInterval to be degrees crank angle, but the functionObject
execution @a interval would still be in timestep.
execution \a interval would still be in timestep.
SourceFiles
OutputFilterFunctionObject.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,7 +108,7 @@ public:
//- Construct from Time, a dictionary with "functions" entry
// and the execution setting.
// @param[in] parentDict - the parent dictionary containing
// \param[in] parentDict - the parent dictionary containing
// a "functions" entry, which can either be a list or a dictionary
// of functionObject specifications.
functionObjectList

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,7 +74,7 @@ private:
//- Type of output
outputControls outputControl_;
//- The execution interval (in time steps) when using @c timeStep mode,
//- The execution interval (in time steps) when using \c timeStep mode,
// a value <= 1 means execute at every time step
label outputInterval_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -21,7 +21,8 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
@file Foam::addToGlobalFunctionSelectionTable
Global
Foam::addToGlobalFunctionSelectionTable
Description
Macros for easy insertion into global function selection tables
@ -33,20 +34,18 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// add to hash-table of functions with 'lookup' as the key
#define addNamedToGlobalFunctionSelectionTable\
(memberFunction,argNames,lookup,functionPtr) \
\
/* Add to the table, find by lookup name */ \
add##memberFunction##argNames##GlobalMemberFunctionToTable \
add_##lookup##_##memberFunction##argNames##GlobalMemberFunctionTo##Table_\
add_##lookup##_##memberFunction##argNames##GlobalMemberFunctionTo##Table_ \
(#lookup, functionPtr)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -21,7 +21,8 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
@file Foam::globalFunctionSelectionTables
Global
Foam::globalFunctionSelectionTables
Description
Macros to enable the easy declaration of global function selection tables.
@ -35,7 +36,6 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// external use:
// ~~~~~~~~~~~~~
// declare a run-time selection:
@ -138,7 +138,6 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -21,7 +21,8 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
@file Foam::addToStaticMemberFunctionSelectionTable
Global
Foam::addToStaticMemberFunctionSelectionTable
Description
Macros for easy insertion into member function selection tables
@ -47,7 +48,6 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -21,7 +21,8 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
@file Foam::staticMemberFunctionSelectionTables
Global
Foam::staticMemberFunctionSelectionTables
Description
Macros to enable the easy declaration of member function selection tables.
@ -35,7 +36,6 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// external use:
// ~~~~~~~~~~~~~
// declare a run-time selection:
@ -140,7 +140,6 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,19 +39,19 @@ Description
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//- Add typeName information from argument @a TypeNameString to a class.
//- Add typeName information from argument \a TypeNameString to a class.
// Without debug information
#define ClassNameNoDebug(TypeNameString) \
static const char* typeName_() { return TypeNameString; } \
static const ::Foam::word typeName
//- Add typeName information from argument @a TypeNameString to a namespace.
//- Add typeName information from argument \a TypeNameString to a namespace.
// Without debug information.
#define NamespaceNameNoDebug(TypeNameString) \
inline const char* typeName_() { return TypeNameString; } \
extern const ::Foam::word typeName
//- Add typeName information from argument @a TemplateNameString to a
//- Add typeName information from argument \a TemplateNameString to a
// template class. Without debug information.
#define TemplateNameNoDebug(TemplateNameString) \
class TemplateNameString##Name \
@ -68,19 +68,19 @@ public: \
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//- Add typeName information from argument @a TypeNameString to a class.
//- Add typeName information from argument \a TypeNameString to a class.
// Also declares debug information.
#define ClassName(TypeNameString) \
ClassNameNoDebug(TypeNameString); \
static int debug
//- Add typeName information from argument @a TypeNameString to a namespace.
//- Add typeName information from argument \a TypeNameString to a namespace.
// Also declares debug information.
#define NamespaceName(TypeNameString) \
NamespaceNameNoDebug(TypeNameString); \
extern int debug
//- Add typeName information from argument @a TypeNameString to a
//- Add typeName information from argument \a TypeNameString to a
// template class. Also declares debug information.
#define TemplateName(TemplateNameString) \
class TemplateNameString##Name \
@ -97,7 +97,7 @@ public: \
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//- Define the typeName, with alternative lookup as @a Name
//- Define the typeName, with alternative lookup as \a Name
#define defineTypeNameWithName(Type, Name) \
const ::Foam::word Type::typeName(Name)
@ -106,18 +106,18 @@ public: \
defineTypeNameWithName(Type, Type::typeName_())
#ifdef __INTEL_COMPILER
//- Define the typeName as @a Name for template classes
//- Define the typeName as \a Name for template classes
# define defineTemplateTypeNameWithName(Type, Name) \
defineTypeNameWithName(Type, Name)
//- Define the typeName as @a Name for template sub-classes
//- Define the typeName as \a Name for template sub-classes
# define defineTemplate2TypeNameWithName(Type, Name) \
defineTypeNameWithName(Type, Name)
#else
//- Define the typeName as @a Name for template classes
//- Define the typeName as \a Name for template classes
# define defineTemplateTypeNameWithName(Type, Name) \
template<> \
defineTypeNameWithName(Type, Name)
//- Define the typeName as @a Name for template sub-classes
//- Define the typeName as \a Name for template sub-classes
# define defineTemplate2TypeNameWithName(Type, Name) \
template<> \
template<> \
@ -139,7 +139,7 @@ public: \
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//- Define the debug information, lookup as @a Name
//- Define the debug information, lookup as \a Name
#define defineDebugSwitchWithName(Type, Name, DebugSwitch) \
int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch))
@ -148,18 +148,18 @@ public: \
defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
#ifdef __INTEL_COMPILER
//- Define the debug information for templates, lookup as @a Name
//- Define the debug information for templates, lookup as \a Name
# define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) \
defineDebugSwitchWithName(Type, Name, DebugSwitch)
//- Define the debug information for templates sub-classes, lookup as @a Name
//- Define the debug information for templates sub-classes, lookup as \a Name
# define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) \
defineDebugSwitchWithName(Type, Name, DebugSwitch)
#else
//- Define the debug information for templates, lookup as @a Name
//- Define the debug information for templates, lookup as \a Name
# define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch) \
template<> \
defineDebugSwitchWithName(Type, Name, DebugSwitch)
//- Define the debug information for templates sub-classes, lookup as @a Name
//- Define the debug information for templates sub-classes, lookup as \a Name
# define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) \
template<> \
template<> \
@ -199,7 +199,7 @@ public: \
defineTypeName(Type); \
defineDebugSwitch(Type, DebugSwitch)
//- Define the typeName and debug information, lookup as @a Name
//- Define the typeName and debug information, lookup as \a Name
#define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch) \
defineTemplateTypeNameWithName(Type, Name); \
defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch)
@ -216,7 +216,7 @@ public: \
// for templated sub-classes
//- Define the typeName and debug information, lookup as @a Name
//- Define the typeName and debug information, lookup as \a Name
#define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch) \
defineTemplate2TypeNameWithName(Type, Name); \
defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,22 +29,22 @@ Description
Used to enhance the standard RTTI to cover I/O.
The user can get the type's type name using the type info access function
@code
\code
type()
@endcode
\endcode
The reference type cast template function:
@code
\code
refCast<T>(r)
@endcode
\endcode
wraps dynamic_cast to handle the bad_cast exception and generate a
FatalError.
The isA function:
@code
\code
isA<T>(r)
@endcode
\endcode
returns true if r is of type T or derived from type T.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,11 +46,17 @@ Foam::List<T> Foam::transform
template <class T>
void Foam::transformList
(
const tensorField& rotTensor,
UList<T>& field
)
void Foam::transformList(const tensor& rotTensor, UList<T>& field)
{
forAll(field, i)
{
field[i] = transform(rotTensor, field[i]);
}
}
template <class T>
void Foam::transformList(const tensorField& rotTensor, UList<T>& field)
{
if (rotTensor.size() == 1)
{
@ -79,11 +85,17 @@ void Foam::transformList
template <class T>
void Foam::transformList
(
const tensorField& rotTensor,
Map<T>& field
)
void Foam::transformList(const tensor& rotTensor, Map<T>& field)
{
forAllIter(typename Map<T>, field, iter)
{
iter() = transform(rotTensor[0], iter());
}
}
template <class T>
void Foam::transformList(const tensorField& rotTensor, Map<T>& field)
{
if (rotTensor.size() == 1)
{
@ -105,11 +117,17 @@ void Foam::transformList
template <class T>
void Foam::transformList
(
const tensorField& rotTensor,
EdgeMap<T>& field
)
void Foam::transformList(const tensor& rotTensor, EdgeMap<T>& field)
{
forAllIter(typename EdgeMap<T>, field, iter)
{
iter() = transform(rotTensor[0], iter());
}
}
template <class T>
void Foam::transformList(const tensorField& rotTensor, EdgeMap<T>& field)
{
if (rotTensor.size() == 1)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,33 +60,57 @@ List<T> transform
//- Apply transformation to list. Either single transformation tensor
// or one tensor per element.
template<class T>
void transformList(const tensor&, UList<T>&);
template<class T>
void transformList(const tensorField&, UList<T>&);
template<class T>
void transformList(const tensor&, Map<T>&);
template<class T>
void transformList(const tensorField&, Map<T>&);
template<class T>
void transformList(const tensor&, EdgeMap<T>&);
template<class T>
void transformList(const tensorField&, EdgeMap<T>&);
template<>
inline void transformList(const tensor&, labelUList&)
{}
template<>
inline void transformList(const tensorField&, labelUList&)
{}
template<>
inline void transformList(const tensor&, Map<label>&)
{}
template<>
inline void transformList(const tensorField&, Map<label>&)
{}
template<>
inline void transformList(const tensor&, EdgeMap<label>&)
{}
template<>
inline void transformList(const tensorField&, EdgeMap<label>&)
{}
template<>
inline void transformList(const tensor&, UList<scalar>&)
{}
template<>
inline void transformList(const tensorField&, UList<scalar>&)
{}
template<>
inline void transformList(const tensor&, Map<scalar>&)
{}
template<>
inline void transformList(const tensorField&, Map<scalar>&)
{}
template<>
inline void transformList(const tensor&, EdgeMap<scalar>&)
{}
template<>
inline void transformList(const tensorField&, EdgeMap<scalar>&)
{}

View File

@ -26,38 +26,38 @@ Class
Description
Extract command arguments and options from the supplied
@a argc and @a argv parameters.
\a argc and @a argv parameters.
Sequences with "(" ... ")" are transformed into a stringList.
For example,
@verbatim
\verbatim
program -listFiles \( *.txt \)
@endverbatim
\endverbatim
would create a stringList:
@verbatim
\verbatim
( "file1.txt" "file2.txt" ... "fileN.txt" )
@endverbatim
\endverbatim
The backslash-escaping is required to avoid interpretation by the shell.
@par Default command-line options
@param -case \<dir\> \n
\par Default command-line options
\param -case \<dir\> \n
select an case directory instead of the current working directory
@param -parallel \n
\param -parallel \n
specify case as a parallel job
@param -doc \n
\param -doc \n
display the documentation in browser
@param -srcDoc \n
\param -srcDoc \n
display the source documentation in browser
@param -help \n
\param -help \n
print the usage
The environment variable @b FOAM_CASE is set to the path of the
The environment variable \b FOAM_CASE is set to the path of the
global case (same for serial and parallel jobs).
The environment variable @b FOAM_CASENAME is set to the name of the
The environment variable \b FOAM_CASENAME is set to the name of the
global case.
Note
- The document browser used is defined by the @b FOAM_DOC_BROWSER
- The document browser used is defined by the \b FOAM_DOC_BROWSER
environment variable or the <tt>Documentation/docBrowser</tt> entry
in the <tt>~OpenFOAM/controlDict</tt> file.
The \%f token is used as a placeholder for the file name.
@ -168,14 +168,14 @@ public:
//- Max screen width for displaying usage (default: 80)
static string::size_type usageMax;
//! @cond internalClass
//! \cond internalClass
class initValidTables
{
public:
initValidTables();
};
//! @endcond
//! \endcond
// Constructors
@ -230,7 +230,7 @@ public:
inline T argRead(const label index) const;
//- Return arguments that are additional to the executable
// @deprecated use operator[] directly (deprecated Feb 2010)
// \deprecated use operator[] directly (deprecated Feb 2010)
stringList::subList additionalArgs() const
{
return stringList::subList(args_, args_.size()-1, 1);
@ -292,7 +292,7 @@ public:
inline const string& operator[](const label index) const;
//- Return the argument string associated with the named option
// @sa option()
// \sa option()
inline const string& operator[](const word& opt) const;
// Edit

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,7 +38,7 @@ namespace Foam
namespace debug
{
//! @cond ignoreDocumentation - local scope
//! \cond ignoreDocumentation - local scope
dictionary* controlDictPtr_(NULL);
dictionary* debugSwitchesPtr_(NULL);
dictionary* infoSwitchesPtr_(NULL);
@ -63,7 +63,7 @@ public:
};
deleteControlDictPtr deleteControlDictPtr_;
//! @endcond
//! \endcond
} // End namespace debug

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ namespace debug
{
//- The central control dictionary.
// Located in ~/.OpenFOAM/VERSION or $WM_PROJECT_DIR/etc
// @sa Foam::findEtcFile()
// \sa Foam::findEtcFile()
dictionary& controlDict();
//- The DebugSwitches sub-dictionary in the central controlDict.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,7 +25,7 @@ Class
Foam::xmgrGraph
Description
Output and @b agr file for @em xmgrace
Output and \b agr file for \em xmgrace
(http://plasma-gate.weizmann.ac.il/Grace/)
SourceFiles

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,7 +90,8 @@ fileName cwd();
// else return false
bool chDir(const fileName& dir);
//- Search for @em name in the following hierarchy:
//- Search for \em name
// in the following hierarchy:
// -# personal settings:
// - ~/.OpenFOAM/\<VERSION\>/
// <em>for version-specific files</em>
@ -104,7 +105,7 @@ bool chDir(const fileName& dir);
// -# shipped settings:
// - $WM_PROJECT_DIR/etc/
//
// @return the full path name or fileName() if the name cannot be found
// \return the full path name or fileName() if the name cannot be found
// Optionally abort if the file cannot be found
fileName findEtcFile(const fileName&, bool mandatory=false);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,13 +25,13 @@ Class
Foam::interpolationTable
Description
An interpolation/look-up table of scalar vs <Type> values.
An interpolation/look-up table of scalar vs \<Type\> values.
The reference scalar values must be monotonically increasing.
The handling of out-of-bounds values depends on the current setting
of @a outOfBounds.
of \a outOfBounds.
If @a REPEAT is chosen for the out-of-bounds handling, the final time
If \a REPEAT is chosen for the out-of-bounds handling, the final time
value is treated as being equivalent to time=0 for the following periods.
Note

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ Description
Example usage (scalar): values specified within a dictionary:
@verbatim
\verbatim
{
x0 0; // lower limit
dx 0.2; // fixed interval
@ -43,7 +43,7 @@ Description
7870 // value at x0 + n*dx
);
}
@endverbatim
\endverbatim
SourceFiles
uniformInterpolationTable.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::DiagonalMatrix<Type>
Foam::DiagonalMatrix
Description
DiagonalMatrix<Type> is a 2D diagonal matrix of objects

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,7 +38,7 @@ Description
the same point. The neighbour labels are also ordered in ascending
order but only for groups of edges belonging to each point. An example
is given below:
@verbatim
\verbatim
owner eighbour
0 1
0 20
@ -60,7 +60,7 @@ Description
8 28
9 10
9 29
@endverbatim
\endverbatim
There exists an alternative way of addressing the owner
list: instead of repeating the same label in the owner list, it is
@ -68,9 +68,9 @@ Description
neighbour list. This reduces the size of owner addressing from a list
over all edges to a list over all points + 1:
@verbatim
\verbatim
Owner start list: 0 2 4 6 8 10 12 14 16 18
@endverbatim
\endverbatim
We shall use the second form of the addressing for fast lookup
of edge label from the known owner and neighbour, using the following

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,12 +36,12 @@ License
int Foam::solution::debug(::Foam::debug::debugSwitch("solution", 0));
// List of sub-dictionaries to rewrite
//! @cond localScope
//! \cond localScope
static const Foam::List<Foam::word> subDictNames
(
Foam::IStringStream("(preconditioner smoother)")()
);
//! @endcond
//! \endcond
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,21 +43,21 @@ Description
memory becoming inaccessible, the xferMoveTo() function should be used to
invoke the correct List\<T\>::transfer(DynamicList\<T\>&) method.
@code
\code
DynamicList<label> dynLst;
...
labelList plainLst( xferMoveTo<labelList>(dynLst) );
@endcode
\endcode
Of course, since this example is a very common operation, the
DynamicList::xfer() method transfers to a plain List anyhow.
It would thus be simpler (and clearer) just to use the following code:
@code
\code
DynamicList<label> dynLst;
...
labelList plainLst(dynLst.xfer());
@endcode
\endcode
SeeAlso
xferCopy, xferCopyTo, xferMove, xferMoveTo, xferTmp
@ -135,53 +135,53 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
/**
* Construct by copying the contents of the @a arg
* Construct by copying the contents of the \a arg
*
* @sa xferCopyTo, xferMove, xferMoveTo, xferTmp and Foam::Xfer
* \sa xferCopyTo, xferMove, xferMoveTo, xferTmp and Foam::Xfer
*/
template<class T>
inline Xfer<T> xferCopy(const T&);
/**
* Construct by transferring the contents of the @a arg
* Construct by transferring the contents of the \a arg
*
* @sa xferCopy, xferCopyTo, xferMoveTo, xferTmp and Foam::Xfer
* \sa xferCopy, xferCopyTo, xferMoveTo, xferTmp and Foam::Xfer
*/
template<class T>
inline Xfer<T> xferMove(T&);
/**
* Construct by transferring the contents of the @a arg
* Construct by transferring the contents of the \a arg
*
* @sa xferCopy, xferCopyTo, xferMove, xferMoveTo and Foam::Xfer
* \sa xferCopy, xferCopyTo, xferMove, xferMoveTo and Foam::Xfer
*/
template<class T>
inline Xfer<T> xferTmp(Foam::tmp<T>&);
/**
* Construct by copying the contents of the @a arg
* Construct by copying the contents of the \a arg
* between dissimilar types
*
* @sa xferCopy, xferMove, xferMoveTo, xferTmp and Foam::Xfer
* \sa xferCopy, xferMove, xferMoveTo, xferTmp and Foam::Xfer
*/
template<class To, class From>
inline Xfer<To> xferCopyTo(const From&);
/**
* Construct by transferring the contents of the @a arg
* Construct by transferring the contents of the \a arg
* between dissimilar types
*
* @par Example Use
* @code
* \par Example Use
* \code
* DynamicList<label> dynLst;
* ...
* labelList plainLst( xferMoveTo<labelList>(dynLst) );
* @endcode
* \endcode
*
* @sa xferCopy, xferCopyTo, xferMove, xferTmp and Foam::Xfer
* \sa xferCopy, xferCopyTo, xferMove, xferTmp and Foam::Xfer
*/
template<class To, class From>
inline Xfer<To> xferMoveTo(From&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,22 +31,22 @@ Description
cell-face to mesh-face mapping.
For example,
@verbatim
\verbatim
hexMatcher hex(mesh);
cellShape shape;
..
bool isHex = hex.match(cellI, shape);
@endverbatim
Now shape is set to the correct Hex cellShape (if @a isHex is true)
\endverbatim
Now shape is set to the correct Hex cellShape (if \a isHex is true)
Alternatively there is direct access to the vertex and face mapping:
@verbatim
\verbatim
const labelList& hexVertLabels = hex.vertLabels();
const labelList& hexFaceLabels = hex.faceLabels();
@endverbatim
\endverbatim
Now
- @c hexVertLabels[n] is vertex label of hex vertex n
- @c hexFaceLabels[n] is face label of hex vertex n
- \c hexVertLabels[n] is vertex label of hex vertex n
- \c hexFaceLabels[n] is face label of hex vertex n
Process of cellShape recognition consists of following steps:
- renumber vertices of cell to local vertex numbers

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,6 +122,7 @@ public:
inline linePointRef line(const pointField&) const;
//- compare edges
// Returns:
// - 0: different
// - +1: identical
// - -1: same edge, but different orientation

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -307,6 +307,7 @@ public:
inline edge faceEdge(const label n) const;
//- Return the edge direction on the face
// Returns:
// - 0: edge not found on the face
// - +1: forward (counter-clockwise) on the face
// - -1: reverse (clockwise) on the face

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -201,12 +201,14 @@ public:
inline edge faceEdge(const label n) const;
//- Return the edge direction on the face
// Returns:
// - +1: forward (counter-clockwise) on the face
// - -1: reverse (clockwise) on the face
// - 0: edge not found on the face
inline int edgeDirection(const edge&) const;
//- compare triFaces
// Returns:
// - 0: different
// - +1: identical
// - -1: same face, but different orientation

File diff suppressed because it is too large Load Diff

View File

@ -194,18 +194,22 @@ class globalMeshData
mutable autoPtr<mapDistribute> globalEdgeSlavesMapPtr_;
//// Coupled point to boundary faces
//
//mutable autoPtr<globalIndex> globalBoundaryFaceNumberingPtr_;
//mutable autoPtr<labelListList> globalPointBoundaryFacesPtr_;
//mutable autoPtr<mapDistribute> globalPointBoundaryFacesMapPtr_;
//
//// Coupled point to collocated boundary cells
//
//mutable autoPtr<labelList> boundaryCellsPtr_;
//mutable autoPtr<globalIndex> globalBoundaryCellNumberingPtr_;
//mutable autoPtr<labelListList> globalPointBoundaryCellsPtr_;
//mutable autoPtr<mapDistribute> globalPointBoundaryCellsMapPtr_;
// Coupled point to boundary faces
mutable autoPtr<globalIndex> globalBoundaryFaceNumberingPtr_;
mutable autoPtr<labelListList> globalPointBoundaryFacesPtr_;
mutable autoPtr<labelListList>
globalPointTransformedBoundaryFacesPtr_;
mutable autoPtr<mapDistribute> globalPointBoundaryFacesMapPtr_;
// Coupled point to collocated boundary cells
mutable autoPtr<labelList> boundaryCellsPtr_;
mutable autoPtr<globalIndex> globalBoundaryCellNumberingPtr_;
mutable autoPtr<labelListList> globalPointBoundaryCellsPtr_;
mutable autoPtr<labelListList>
globalPointTransformedBoundaryCellsPtr_;
mutable autoPtr<mapDistribute> globalPointBoundaryCellsMapPtr_;
// Globally shared point addressing
@ -288,6 +292,18 @@ class globalMeshData
void calcGlobalEdgeSlaves() const;
// Global boundary face/cell addressing
//- Calculate coupled point to uncoupled boundary faces. Local only.
void calcPointBoundaryFaces(labelListList&) const;
//- Calculate global point to global boundary face addressing.
void calcGlobalPointBoundaryFaces() const;
//- Calculate global point to global boundary cell addressing.
void calcGlobalPointBoundaryCells() const;
//- Disallow default bitwise copy construct
globalMeshData(const globalMeshData&);
@ -458,7 +474,7 @@ public:
const globalIndexAndTransform& globalTransforms() const;
//- Helper: synchronise data with transforms
template<class Type, class CombineOp>
template<class Type, class CombineOp, class TransformOp>
static void syncData
(
List<Type>& pointData,
@ -467,7 +483,7 @@ public:
const mapDistribute& slavesMap,
const globalIndexAndTransform&,
const CombineOp& cop,
const bool isPosition
const TransformOp& top
);
//- Helper: synchronise data without transforms
@ -490,13 +506,13 @@ public:
const labelListList& globalPointSlaves() const;
const labelListList& globalPointTransformedSlaves() const;
const mapDistribute& globalPointSlavesMap() const;
//- Helper to synchronise mesh point data
template<class Type, class CombineOp>
//- Helper to synchronise coupled patch point data
template<class Type, class CombineOp, class TransformOp>
void syncPointData
(
List<Type>& pointData,
const CombineOp& cop,
const bool isPosition
const TransformOp& top
) const;
// Coupled edge to coupled edges.
@ -506,10 +522,33 @@ public:
const labelListList& globalEdgeTransformedSlaves() const;
const mapDistribute& globalEdgeSlavesMap() const;
// Coupled point to boundary faces. These are uncoupled boundary
// faces only but include empty patches.
//- Numbering of boundary faces is face-mesh.nInternalFaces()
const globalIndex& globalBoundaryFaceNumbering() const;
const labelListList& globalPointBoundaryFaces() const;
const labelListList& globalPointTransformedBoundaryFaces()
const;
const mapDistribute& globalPointBoundaryFacesMap() const;
// Coupled point to boundary cell
//- From boundary cell to mesh cell
const labelList& boundaryCells() const;
//- Numbering of boundary cells is according to boundaryCells()
const globalIndex& globalBoundaryCellNumbering() const;
const labelListList& globalPointBoundaryCells() const;
const labelListList& globalPointTransformedBoundaryCells()
const;
const mapDistribute& globalPointBoundaryCellsMap() const;
// Other
//- Helper for merging mesh point data. Determines
//- Helper for merging mesh point data.
// Determines:
// - my unique indices
// - global numbering over all unique indices
// - the global number for all local points (so this will
@ -520,7 +559,8 @@ public:
labelList& uniquePoints
) const;
//- Helper for merging patch point data. Takes maps from
//- Helper for merging patch point data.
// Takes maps from:
// local points to/from mesh. Determines
// - my unique points. These are mesh points, not patch points
// since the master might not be on the patch.

View File

@ -29,7 +29,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type, class CombineOp>
template<class Type, class CombineOp, class TransformOp>
void Foam::globalMeshData::syncData
(
List<Type>& elems,
@ -38,11 +38,11 @@ void Foam::globalMeshData::syncData
const mapDistribute& slavesMap,
const globalIndexAndTransform& transforms,
const CombineOp& cop,
const bool isPosition
const TransformOp& top
)
{
// Pull slave data onto master
slavesMap.distribute(transforms, elems, isPosition);
slavesMap.distribute(transforms, elems, top);
// Combine master data with slave data
forAll(slaves, i)
@ -85,7 +85,7 @@ void Foam::globalMeshData::syncData
transforms,
elems.size(),
elems,
isPosition
top
);
}
@ -143,12 +143,12 @@ void Foam::globalMeshData::syncData
}
template<class Type, class CombineOp>
template<class Type, class CombineOp, class TransformOp>
void Foam::globalMeshData::syncPointData
(
List<Type>& pointData,
const CombineOp& cop,
const bool isPosition
const TransformOp& top
) const
{
if (pointData.size() != mesh_.nPoints())
@ -171,7 +171,7 @@ void Foam::globalMeshData::syncPointData
globalPointSlavesMap(),
globalTransforms(),
cop,
isPosition
top
);
// Extract back onto mesh

View File

@ -41,9 +41,9 @@ Description
Works by constructing equivalence lists for all the points on processor
patches. These list are in globalIndexAndTransform numbering
E.g.
@verbatim
\verbatim
((7 93)(4 731)(3 114))
@endverbatim
\endverbatim
means point 93 on proc7 is connected to point 731 on proc4 and 114 on proc3.
It then assigns the lowest numbered processor to be the local 'master' and

View File

@ -37,6 +37,99 @@ defineTypeNameAndDebug(Foam::mapDistribute, 0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<>
void Foam::mapDistribute::transform::operator()
(
const vectorTensorTransform&,
const bool,
List<label>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
UList<label>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
Map<label>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<label>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const vectorTensorTransform&,
const bool,
List<scalar>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
UList<scalar>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
Map<scalar>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<scalar>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const vectorTensorTransform&,
const bool,
List<bool>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
UList<bool>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
Map<bool>&
) const
{}
template<>
void Foam::mapDistribute::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<bool>&
) const
{}
Foam::List<Foam::labelPair> Foam::mapDistribute::schedule
(
const labelListList& subMap,
@ -535,101 +628,6 @@ void Foam::mapDistribute::exchangeAddressing
}
template<>
void Foam::mapDistribute::applyTransforms
(
const globalIndexAndTransform& globalTransforms,
List<point>& field,
const bool isPosition
) const
{
const List<vectorTensorTransform>& totalTransform =
globalTransforms.transformPermutations();
forAll(totalTransform, trafoI)
{
const vectorTensorTransform& vt = totalTransform[trafoI];
const labelList& elems = transformElements_[trafoI];
label n = transformStart_[trafoI];
// Could be optimised to avoid memory allocations
if (isPosition)
{
Field<point> transformFld
(
vt.transformPosition(Field<point>(field, elems))
);
forAll(transformFld, i)
{
//cop(field[n++], transformFld[i]);
field[n++] = transformFld[i];
}
}
else
{
Field<point> transformFld
(
transform(vt.R(), Field<point>(field, elems))
);
forAll(transformFld, i)
{
//cop(field[n++], transformFld[i]);
field[n++] = transformFld[i];
}
}
}
}
template<>
void Foam::mapDistribute::applyInverseTransforms
(
const globalIndexAndTransform& globalTransforms,
List<point>& field,
const bool isPosition
) const
{
const List<vectorTensorTransform>& totalTransform =
globalTransforms.transformPermutations();
forAll(totalTransform, trafoI)
{
const vectorTensorTransform& vt = totalTransform[trafoI];
const labelList& elems = transformElements_[trafoI];
label n = transformStart_[trafoI];
// Could be optimised to avoid memory allocations
if (isPosition)
{
Field<point> transformFld
(
vt.invTransformPosition
(
SubField<point>(field, elems.size(), n)
)
);
forAll(transformFld, i)
{
field[elems[i]] = transformFld[i];
}
}
else
{
Field<point> transformFld(SubField<point>(field, elems.size(), n));
transform(transformFld, vt.R().T(), transformFld);
forAll(transformFld, i)
{
field[elems[i]] = transformFld[i];
}
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
//- Construct null

View File

@ -127,12 +127,14 @@ SourceFiles
#ifndef mapDistribute_H
#define mapDistribute_H
#include "transformList.H"
#include "labelList.H"
#include "labelPair.H"
#include "Pstream.H"
#include "boolList.H"
#include "Map.H"
#include "point.H"
#include "vectorTensorTransform.H"
#include "coupledPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -217,31 +219,124 @@ class mapDistribute
template<class T>
void applyDummyTransforms(List<T>& field) const;
template<class T> //, class CombineOp>
template<class T, class TransformOp>
void applyTransforms
(
const globalIndexAndTransform& globalTransforms,
List<T>& field,
const bool isPosition
//const CombineOp& cop
const TransformOp& top
) const;
//- Helper function: copy transformElements without transformation
template<class T>
void applyDummyInverseTransforms(List<T>& field) const;
template<class T> //, class CombineOp>
template<class T, class TransformOp>
void applyInverseTransforms
(
const globalIndexAndTransform& globalTransforms,
List<T>& field,
const bool isPosition
//const CombineOp& cop
const TransformOp& top
) const;
public:
// Public classes
//- Default transformation behaviour
class transform
{
public:
template<class T>
void operator()
(
const vectorTensorTransform& vt,
const bool forward,
List<T>& fld
) const
{
if (forward)
{
transformList(vt.R(), fld);
}
else
{
transformList(vt.R().T(), fld);
}
}
//- Transform patch-based field
template<class T>
void operator()(const coupledPolyPatch& cpp, UList<T>& fld) const
{
if (!cpp.parallel())
{
transformList(cpp.forwardT(), fld);
}
}
//- Transform sparse field
template<class T, template<class> class Container>
void operator()(const coupledPolyPatch& cpp, Container<T>& map)
const
{
if (!cpp.parallel())
{
transformList(cpp.forwardT(), map);
}
}
};
//- Default transformation behaviour for position
class transformPosition
{
public:
void operator()
(
const vectorTensorTransform& vt,
const bool forward,
List<point>& fld
) const
{
pointField pfld(fld.xfer());
if (forward)
{
fld = vt.transformPosition(pfld);
}
else
{
fld = vt.invTransformPosition(pfld);
}
}
//- Transform patch-based field
void operator()(const coupledPolyPatch& cpp, pointField& fld) const
{
cpp.transformPosition(fld);
}
template<template<class> class Container>
void operator()(const coupledPolyPatch& cpp, Container<point>& map)
const
{
Field<point> fld(map.size());
label i = 0;
forAllConstIter(typename Container<point>, map, iter)
{
fld[i++] = iter();
}
cpp.transformPosition(fld);
i = 0;
forAllIter(typename Container<point>, map, iter)
{
iter() = fld[i++];
}
}
};
// Declare name of the class and its debug switch
ClassName("mapDistribute");
@ -456,12 +551,12 @@ public:
const;
//- Same but with transforms
template<class T>
template<class T, class TransformOp>
void distribute
(
const globalIndexAndTransform&,
List<T>& fld,
const bool isPosition
const TransformOp& top
) const;
//- Reverse distribute data using default commsType.
@ -474,13 +569,13 @@ public:
) const;
//- Same but with transforms
template<class T>
template<class T, class TransformOp>
void reverseDistribute
(
const globalIndexAndTransform&,
const label constructSize,
List<T>& fld,
const bool isPosition
const TransformOp& top
) const;
//- Reverse distribute data using default commsType.
@ -496,14 +591,14 @@ public:
) const;
//- Same but with transforms
template<class T>
template<class T, class TransformOp>
void reverseDistribute
(
const globalIndexAndTransform&,
const label constructSize,
const T& nullValue,
List<T>& fld,
const bool isPosition
const TransformOp& top
) const;
//- Do all sends using PstreamBuffers
@ -531,24 +626,85 @@ public:
};
//- Specialisation for transforms that can apply positional transform
template<>
void mapDistribute::applyTransforms
void mapDistribute::transform::operator()
(
const globalIndexAndTransform& globalTransforms,
List<point>& field,
const bool isPosition
//const CombineOp& cop
const vectorTensorTransform&,
const bool,
List<label>&
) const;
template<>
void mapDistribute::transform::operator()
(
const coupledPolyPatch&,
UList<label>&
) const;
template<>
void mapDistribute::transform::operator()
(
const coupledPolyPatch&,
Map<label>&
) const;
template<>
void mapDistribute::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<label>&
) const;
template<> //, class CombineOp>
void mapDistribute::applyInverseTransforms
template<>
void mapDistribute::transform::operator()
(
const globalIndexAndTransform& globalTransforms,
List<point>& field,
const bool isPosition
//const CombineOp& cop
const coupledPolyPatch&,
UList<scalar>&
) const;
template<>
void mapDistribute::transform::operator()
(
const vectorTensorTransform&,
const bool,
List<scalar>&
) const;
template<>
void mapDistribute::transform::operator()
(
const coupledPolyPatch&,
Map<scalar>&
) const;
template<>
void mapDistribute::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<scalar>&
) const;
template<>
void mapDistribute::transform::operator()
(
const coupledPolyPatch& cpp,
UList<bool>& fld
) const;
template<>
void mapDistribute::transform::operator()
(
const vectorTensorTransform&,
const bool,
List<bool>&
) const;
template<>
void mapDistribute::transform::operator()
(
const coupledPolyPatch&,
Map<bool>&
) const;
template<>
void mapDistribute::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<bool>&
) const;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -812,30 +812,14 @@ void Foam::mapDistribute::applyDummyInverseTransforms(List<T>& field) const
// Calculate transformed elements.
template<class T> //, class CombineOp>
template<class T, class TransformOp> //, class CombineOp>
void Foam::mapDistribute::applyTransforms
(
const globalIndexAndTransform& globalTransforms,
List<T>& field,
const bool isPosition
//const CombineOp& cop
const TransformOp& top
) const
{
if (isPosition)
{
FatalErrorIn
(
"mapDistribute::applyTransforms\n"
"(\n"
" const globalIndexAndTransform&,\n"
" List<T>&,\n"
" const bool\n"
") const\n"
) << "It does not make sense to apply position transformation"
<< " for anything else than pointFields."
<< abort(FatalError);
}
const List<vectorTensorTransform>& totalTransform =
globalTransforms.transformPermutations();
@ -846,7 +830,8 @@ void Foam::mapDistribute::applyTransforms
label n = transformStart_[trafoI];
// Could be optimised to avoid memory allocations
Field<T> transformFld(transform(vt.R(), Field<T>(field, elems)));
List<T> transformFld(UIndirectList<T>(field, elems));
top(vt, true, transformFld);
forAll(transformFld, i)
{
@ -858,30 +843,14 @@ void Foam::mapDistribute::applyTransforms
// Calculate transformed elements.
template<class T> //, class CombineOp>
template<class T, class TransformOp> //, class CombineOp>
void Foam::mapDistribute::applyInverseTransforms
(
const globalIndexAndTransform& globalTransforms,
List<T>& field,
const bool isPosition
//const CombineOp& cop
const TransformOp& top
) const
{
if (isPosition)
{
FatalErrorIn
(
"mapDistribute::applyInverseTransforms\n"
"(\n"
" const globalIndexAndTransform&,\n"
" List<T>&,\n"
" const bool\n"
") const\n"
) << "It does not make sense to apply position transformation"
<< " for anything else than pointFields."
<< abort(FatalError);
}
const List<vectorTensorTransform>& totalTransform =
globalTransforms.transformPermutations();
@ -892,8 +861,8 @@ void Foam::mapDistribute::applyInverseTransforms
label n = transformStart_[trafoI];
// Could be optimised to avoid memory allocations
Field<T> transformFld(SubField<T>(field, elems.size(), n));
transform(transformFld, vt.R().T(), transformFld);
List<T> transformFld(SubList<T>(field, elems.size(), n));
top(vt, false, transformFld);
forAll(transformFld, i)
{
@ -1073,54 +1042,54 @@ void Foam::mapDistribute::reverseDistribute
//- Distribute data using default commsType.
template<class T>
template<class T, class TransformOp>
void Foam::mapDistribute::distribute
(
const globalIndexAndTransform& git,
List<T>& fld,
const bool isPosition
const TransformOp& top
) const
{
// Distribute. Leave out dummy transforms since we're doing them ourselves
distribute(fld, false);
// Do transforms
applyTransforms(git, fld, isPosition); //, eqOp<T>());
applyTransforms(git, fld, top);
}
template<class T>
template<class T, class TransformOp>
void Foam::mapDistribute::reverseDistribute
(
const globalIndexAndTransform& git,
const label constructSize,
List<T>& fld,
const bool isPosition
const TransformOp& top
) const
{
// Fill slots with reverse-transformed data. Note that it also copies
// back into the non-remote part of fld even though these values are not
// used.
applyInverseTransforms(git, fld, isPosition); //, eqOp<T>());
applyInverseTransforms(git, fld, top);
// And send back (the remote slots). Disable dummy transformations.
reverseDistribute(constructSize, fld, false);
}
template<class T>
template<class T, class TransformOp>
void Foam::mapDistribute::reverseDistribute
(
const globalIndexAndTransform& git,
const label constructSize,
const T& nullValue,
List<T>& fld,
const bool isPosition
const TransformOp& top
) const
{
// Fill slots with reverse-transformed data Note that it also copies
// back into the non-remote part of fld even though these values are not
// used.
applyInverseTransforms(git, fld, isPosition); //, eqOp<T>());
applyInverseTransforms(git, fld, top); //, eqOp<T>());
// And send back (the remote slots) Disable dummy transformations.
reverseDistribute(constructSize, nullValue, fld, false);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ Description
All this information is nessecary to correctly map fields.
@par points
\par points
- unchanged:
- pointMap[pointI] contains old point label
@ -66,7 +66,7 @@ Description
- appended:
- pointMap[pointI] contains -1
@par faces
\par faces
- unchanged:
- faceMap[faceI] contains old face label
@ -98,7 +98,7 @@ Description
only be boundary faces; if the new face is an internal face they
will only be internal faces.
@par cells
\par cells
- unchanged:
- cellMap[cellI] contains old cell label

View File

@ -25,77 +25,6 @@ License
#include "syncTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
Field<label>&
) const
{}
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
Map<label>&
) const
{}
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<label>&
) const
{}
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
Field<scalar>&
) const
{}
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
Map<scalar>&
) const
{}
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<scalar>&
) const
{}
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
Field<bool>&
) const
{}
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
Map<bool>&
) const
{}
template<>
void Foam::syncTools::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<bool>&
) const
{}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Determines for every point whether it is coupled and if so sets only one.

View File

@ -47,7 +47,7 @@ SourceFiles
#include "PackedBoolList.H"
#include "polyMesh.H"
#include "coupledPolyPatch.H"
#include "transformList.H"
#include "mapDistribute.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -87,59 +87,6 @@ class syncTools
public:
// Public classes
class transform
{
public:
//- Transform patch-based field
template<class T>
void operator()(const coupledPolyPatch& cpp, Field<T>& fld) const
{
if (!cpp.parallel())
{
transformList(cpp.forwardT(), fld);
}
}
//- Transform sparse field
template<class T, template<class> class Container>
void operator()(const coupledPolyPatch& cpp, Container<T>& map)
const
{
if (!cpp.parallel())
{
transformList(cpp.forwardT(), map);
}
}
};
class transformPosition
{
public:
void operator()(const coupledPolyPatch& cpp, pointField& fld) const
{
cpp.transformPosition(fld);
}
template<template<class> class Container>
void operator()(const coupledPolyPatch& cpp, Container<point>& map)
const
{
Field<point> fld(map.size());
label i = 0;
forAllConstIter(typename Container<point>, map, iter)
{
fld[i++] = iter();
}
cpp.transformPosition(fld);
i = 0;
forAllIter(typename Container<point>, map, iter)
{
iter() = fld[i++];
}
}
};
// Basic routines with user-supplied transformation. Preferably
// use specialisations below.
@ -163,41 +110,41 @@ public:
const CombineOp& cop,
const TransformOp& top
);
//
// //- Synchronize values on all mesh points.
// template <class T, class CombineOp, class TransformOp>
// static void syncPointList
// (
// const polyMesh&,
// UList<T>&,
// const CombineOp& cop,
// const T& nullValue,
// const TransformOp& top
// );
//
// //- Synchronize values on selected mesh points.
// template <class T, class CombineOp, class TransformOp>
// static void syncPointList
// (
// const polyMesh&,
// const labelList& meshPoints,
// UList<T>&,
// const CombineOp& cop,
// const T& nullValue,
// const TransformOp& top
// );
//
// //- Synchronize values on all mesh edges.
// template <class T, class CombineOp, class TransformOp>
// static void syncEdgeList
// (
// const polyMesh&,
// UList<T>&,
// const CombineOp& cop,
// const T& nullValue,
// const TransformOp& top
// );
//
//- Synchronize values on all mesh points.
template <class T, class CombineOp, class TransformOp>
static void syncPointList
(
const polyMesh&,
List<T>&,
const CombineOp& cop,
const T& nullValue,
const TransformOp& top
);
//- Synchronize values on selected mesh points.
template <class T, class CombineOp, class TransformOp>
static void syncPointList
(
const polyMesh&,
const labelList& meshPoints,
List<T>&,
const CombineOp& cop,
const T& nullValue,
const TransformOp& top
);
//- Synchronize values on all mesh edges.
template <class T, class CombineOp, class TransformOp>
static void syncEdgeList
(
const polyMesh&,
List<T>&,
const CombineOp& cop,
const T& nullValue,
const TransformOp& top
);
//- Synchronize values on boundary faces only.
template <class T, class CombineOp, class TransformOp>
static void syncBoundaryFaceList
@ -219,7 +166,17 @@ public:
List<T>& l,
const CombineOp& cop,
const T& nullValue
);
)
{
syncPointList
(
mesh,
l,
cop,
nullValue,
mapDistribute::transform()
);
}
//- Synchronize locations on all mesh points.
template <class CombineOp>
@ -229,7 +186,17 @@ public:
List<point>& l,
const CombineOp& cop,
const point& nullValue
);
)
{
syncPointList
(
mesh,
l,
cop,
nullValue,
mapDistribute::transformPosition()
);
}
//- Synchronize values on selected mesh points.
template <class T, class CombineOp>
@ -237,10 +204,21 @@ public:
(
const polyMesh& mesh,
const labelList& meshPoints,
UList<T>& l,
List<T>& l,
const CombineOp& cop,
const T& nullValue
);
)
{
syncPointList
(
mesh,
meshPoints,
l,
cop,
nullValue,
mapDistribute::transform()
);
}
//- Synchronize locations on selected mesh points.
template <class CombineOp>
@ -248,10 +226,21 @@ public:
(
const polyMesh& mesh,
const labelList& meshPoints,
UList<point>& l,
List<point>& l,
const CombineOp& cop,
const point& nullValue
);
)
{
syncPointList
(
mesh,
meshPoints,
l,
cop,
nullValue,
mapDistribute::transformPosition()
);
}
// Synchronise edge-wise data
@ -261,20 +250,40 @@ public:
static void syncEdgeList
(
const polyMesh& mesh,
UList<T>& l,
List<T>& l,
const CombineOp& cop,
const T& nullValue
);
)
{
syncEdgeList
(
mesh,
l,
cop,
nullValue,
mapDistribute::transform()
);
}
//- Synchronize values on all mesh edges.
template <class CombineOp>
static void syncEdgePositions
(
const polyMesh& mesh,
UList<point>& l,
List<point>& l,
const CombineOp& cop,
const point& nullValue
);
)
{
syncEdgeList
(
mesh,
l,
cop,
nullValue,
mapDistribute::transformPosition()
);
}
// Synchronise face-wise data
@ -288,7 +297,7 @@ public:
const CombineOp& cop
)
{
syncBoundaryFaceList(mesh, l, cop, transform());
syncBoundaryFaceList(mesh, l, cop, mapDistribute::transform());
}
//- Synchronize locations on boundary faces only.
@ -300,7 +309,13 @@ public:
const CombineOp& cop
)
{
syncBoundaryFaceList(mesh, l, cop, transformPosition());
syncBoundaryFaceList
(
mesh,
l,
cop,
mapDistribute::transformPosition()
);
}
//- Synchronize values on all mesh faces.
@ -319,7 +334,13 @@ public:
mesh.nInternalFaces()
);
syncBoundaryFaceList(mesh, bndValues, cop, transform());
syncBoundaryFaceList
(
mesh,
bndValues,
cop,
mapDistribute::transform()
);
}
//- Synchronize locations on all mesh faces.
@ -337,7 +358,13 @@ public:
mesh.nFaces()-mesh.nInternalFaces(),
mesh.nInternalFaces()
);
syncBoundaryFaceList(mesh, bndValues, cop, transformPosition());
syncBoundaryFaceList
(
mesh,
bndValues,
cop,
mapDistribute::transformPosition()
);
}
//- Swap coupled boundary face values.
@ -348,7 +375,13 @@ public:
UList<T>& l
)
{
syncBoundaryFaceList(mesh, l, eqOp<T>(), transform());
syncBoundaryFaceList
(
mesh,
l,
eqOp<T>(),
mapDistribute::transform()
);
}
//- Swap coupled positions.
@ -359,7 +392,13 @@ public:
UList<T>& l
)
{
syncBoundaryFaceList(mesh, l, eqOp<T>(), transformPosition());
syncBoundaryFaceList
(
mesh,
l,
eqOp<T>(),
mapDistribute::transformPosition()
);
}
//- Swap coupled face values.
@ -376,7 +415,13 @@ public:
mesh.nFaces()-mesh.nInternalFaces(),
mesh.nInternalFaces()
);
syncBoundaryFaceList(mesh, bndValues, eqOp<T>(), transform());
syncBoundaryFaceList
(
mesh,
bndValues,
eqOp<T>(),
mapDistribute::transform()
);
}
// Sparse versions
@ -390,7 +435,7 @@ public:
const CombineOp& cop
)
{
syncPointMap(mesh, l, cop, transform());
syncPointMap(mesh, l, cop, mapDistribute::transform());
}
//- Synchronize locations on selected points.
@ -402,7 +447,7 @@ public:
const CombineOp& cop
)
{
syncPointMap(mesh, l, cop, transformPosition());
syncPointMap(mesh, l, cop, mapDistribute::transformPosition());
}
//- Synchronize values on selected edges. Edges are represented
@ -416,7 +461,7 @@ public:
const CombineOp& cop
)
{
syncEdgeMap(mesh, l, cop, transform());
syncEdgeMap(mesh, l, cop, mapDistribute::transform());
}
//- Synchronize locations on selected edges.
@ -428,7 +473,7 @@ public:
const CombineOp& cop
)
{
syncEdgeMap(mesh, l, cop, transformPosition());
syncEdgeMap(mesh, l, cop, mapDistribute::transformPosition());
}
// PackedList versions
@ -480,65 +525,6 @@ public:
};
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch&,
Field<label>&
) const;
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch&,
Map<label>&
) const;
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<label>&
) const;
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch&,
Field<scalar>&
) const;
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch&,
Map<scalar>&
) const;
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<scalar>&
) const;
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch& cpp,
Field<bool>& fld
) const;
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch&,
Map<bool>&
) const;
template<>
void syncTools::transform::operator()
(
const coupledPolyPatch&,
EdgeMap<bool>&
) const;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -764,7 +764,7 @@ void Foam::syncTools::syncEdgeMap
//void Foam::syncTools::syncPointList
//(
// const polyMesh& mesh,
// UList<T>& pointValues,
// List<T>& pointValues,
// const CombineOp& cop,
// const T& nullValue,
// const TransformOp& top
@ -775,7 +775,7 @@ void Foam::syncTools::syncEdgeMap
// FatalErrorIn
// (
// "syncTools<class T, class CombineOp>::syncPointList"
// "(const polyMesh&, UList<T>&, const CombineOp&, const T&"
// "(const polyMesh&, List<T>&, const CombineOp&, const T&"
// ", const bool)"
// ) << "Number of values " << pointValues.size()
// << " is not equal to the number of points in the mesh "
@ -941,7 +941,7 @@ void Foam::syncTools::syncEdgeMap
//(
// const polyMesh& mesh,
// const labelList& meshPoints,
// UList<T>& pointValues,
// List<T>& pointValues,
// const CombineOp& cop,
// const T& nullValue,
// const TransformOp& top
@ -952,7 +952,7 @@ void Foam::syncTools::syncEdgeMap
// FatalErrorIn
// (
// "syncTools<class T, class CombineOp>::syncPointList"
// "(const polyMesh&, const labelList&, UList<T>&, const CombineOp&"
// "(const polyMesh&, const labelList&, List<T>&, const CombineOp&"
// ", const T&, const bool)"
// ) << "Number of values " << pointValues.size()
// << " is not equal to the number of points "
@ -986,13 +986,14 @@ void Foam::syncTools::syncEdgeMap
// }
//}
template <class T, class CombineOp>
template <class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncPointList
(
const polyMesh& mesh,
List<T>& pointValues,
const CombineOp& cop,
const T& nullValue
const T& nullValue,
const TransformOp& top
)
{
if (pointValues.size() != mesh.nPoints())
@ -1000,48 +1001,50 @@ void Foam::syncTools::syncPointList
FatalErrorIn
(
"syncTools<class T, class CombineOp>::syncPointList"
"(const polyMesh&, UList<T>&, const CombineOp&, const T&)"
"(const polyMesh&, List<T>&, const CombineOp&, const T&"
", const bool)"
) << "Number of values " << pointValues.size()
<< " is not equal to the number of points in the mesh "
<< mesh.nPoints() << abort(FatalError);
}
mesh.globalData().syncPointData(pointValues, cop, false);
mesh.globalData().syncPointData(pointValues, cop, top);
}
template <class CombineOp>
void Foam::syncTools::syncPointPositions
(
const polyMesh& mesh,
List<point>& pointValues,
const CombineOp& cop,
const point& nullValue
)
{
if (pointValues.size() != mesh.nPoints())
{
FatalErrorIn
(
"syncTools<class CombineOp>::syncPointPositions"
"(const polyMesh&, List<point>&, const CombineOp&, const point&)"
) << "Number of values " << pointValues.size()
<< " is not equal to the number of points in the mesh "
<< mesh.nPoints() << abort(FatalError);
}
mesh.globalData().syncPointData(pointValues, cop, true);
}
//template <class CombineOp>
//void Foam::syncTools::syncPointPositions
//(
// const polyMesh& mesh,
// List<point>& pointValues,
// const CombineOp& cop,
// const point& nullValue
//)
//{
// if (pointValues.size() != mesh.nPoints())
// {
// FatalErrorIn
// (
// "syncTools<class CombineOp>::syncPointPositions"
// "(const polyMesh&, List<point>&, const CombineOp&, const point&)"
// ) << "Number of values " << pointValues.size()
// << " is not equal to the number of points in the mesh "
// << mesh.nPoints() << abort(FatalError);
// }
//
// mesh.globalData().syncPointData(pointValues, cop, true);
//}
template <class T, class CombineOp>
template <class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncPointList
(
const polyMesh& mesh,
const labelList& meshPoints,
UList<T>& pointValues,
List<T>& pointValues,
const CombineOp& cop,
const T& nullValue
const T& nullValue,
const TransformOp& top
)
{
if (pointValues.size() != meshPoints.size())
@ -1049,7 +1052,7 @@ void Foam::syncTools::syncPointList
FatalErrorIn
(
"syncTools<class T, class CombineOp>::syncPointList"
"(const polyMesh&, UList<T>&, const CombineOp&, const T&)"
"(const polyMesh&, List<T>&, const CombineOp&, const T&)"
) << "Number of values " << pointValues.size()
<< " is not equal to the number of meshPoints "
<< meshPoints.size() << abort(FatalError);
@ -1078,7 +1081,7 @@ void Foam::syncTools::syncPointList
gd.globalPointSlavesMap(),
gd.globalTransforms(),
cop,
false //position?
top
);
forAll(meshPoints, i)
@ -1093,72 +1096,74 @@ void Foam::syncTools::syncPointList
}
template <class CombineOp>
void Foam::syncTools::syncPointPositions
(
const polyMesh& mesh,
const labelList& meshPoints,
UList<point>& pointValues,
const CombineOp& cop,
const point& nullValue
)
{
if (pointValues.size() != meshPoints.size())
{
FatalErrorIn
(
"syncTools<class CombineOp>::syncPointList"
"(const polyMesh&, UList<point>&, const CombineOp&, const point&)"
) << "Number of values " << pointValues.size()
<< " is not equal to the number of meshPoints "
<< meshPoints.size() << abort(FatalError);
}
const globalMeshData& gd = mesh.globalData();
const indirectPrimitivePatch& cpp = gd.coupledPatch();
const Map<label>& mpm = cpp.meshPointMap();
List<point> cppFld(cpp.nPoints(), nullValue);
forAll(meshPoints, i)
{
label pointI = meshPoints[i];
Map<label>::const_iterator iter = mpm.find(pointI);
if (iter != mpm.end())
{
cppFld[iter()] = pointValues[i];
}
}
globalMeshData::syncData
(
cppFld,
gd.globalPointSlaves(),
gd.globalPointTransformedSlaves(),
gd.globalPointSlavesMap(),
gd.globalTransforms(),
cop,
true //position?
);
forAll(meshPoints, i)
{
label pointI = meshPoints[i];
Map<label>::const_iterator iter = mpm.find(pointI);
if (iter != mpm.end())
{
pointValues[i] = cppFld[iter()];
}
}
}
//template <class CombineOp>
//void Foam::syncTools::syncPointPositions
//(
// const polyMesh& mesh,
// const labelList& meshPoints,
// List<point>& pointValues,
// const CombineOp& cop,
// const point& nullValue
//)
//{
// if (pointValues.size() != meshPoints.size())
// {
// FatalErrorIn
// (
// "syncTools<class CombineOp>::syncPointList"
// "(const polyMesh&, List<point>&, const CombineOp&, const point&)"
// ) << "Number of values " << pointValues.size()
// << " is not equal to the number of meshPoints "
// << meshPoints.size() << abort(FatalError);
// }
// const globalMeshData& gd = mesh.globalData();
// const indirectPrimitivePatch& cpp = gd.coupledPatch();
// const Map<label>& mpm = cpp.meshPointMap();
//
// List<point> cppFld(cpp.nPoints(), nullValue);
//
// forAll(meshPoints, i)
// {
// label pointI = meshPoints[i];
// Map<label>::const_iterator iter = mpm.find(pointI);
// if (iter != mpm.end())
// {
// cppFld[iter()] = pointValues[i];
// }
// }
//
// globalMeshData::syncData
// (
// cppFld,
// gd.globalPointSlaves(),
// gd.globalPointTransformedSlaves(),
// gd.globalPointSlavesMap(),
// gd.globalTransforms(),
// cop,
// true, //position?
// mapDistribute::transform() // not used
// );
//
// forAll(meshPoints, i)
// {
// label pointI = meshPoints[i];
// Map<label>::const_iterator iter = mpm.find(pointI);
// if (iter != mpm.end())
// {
// pointValues[i] = cppFld[iter()];
// }
// }
//}
template <class T, class CombineOp>
template <class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncEdgeList
(
const polyMesh& mesh,
UList<T>& edgeValues,
List<T>& edgeValues,
const CombineOp& cop,
const T& nullValue
const T& nullValue,
const TransformOp& top
)
{
if (edgeValues.size() != mesh.nEdges())
@ -1166,7 +1171,7 @@ void Foam::syncTools::syncEdgeList
FatalErrorIn
(
"syncTools<class T, class CombineOp>::syncEdgeList"
"(const polyMesh&, UList<T>&, const CombineOp&, const T&)"
"(const polyMesh&, List<T>&, const CombineOp&, const T&)"
) << "Number of values " << edgeValues.size()
<< " is not equal to the number of edges in the mesh "
<< mesh.nEdges() << abort(FatalError);
@ -1187,7 +1192,7 @@ void Foam::syncTools::syncEdgeList
edgeMap,
git,
cop,
false //position?
top
);
// Extract back onto mesh
@ -1198,50 +1203,51 @@ void Foam::syncTools::syncEdgeList
}
template <class CombineOp>
void Foam::syncTools::syncEdgePositions
(
const polyMesh& mesh,
UList<point>& edgeValues,
const CombineOp& cop,
const point& nullValue
)
{
if (edgeValues.size() != mesh.nEdges())
{
FatalErrorIn
(
"syncTools<class CombineOp>::syncEdgePositions"
"(const polyMesh&, UList<point>&, const CombineOp&, const point&)"
) << "Number of values " << edgeValues.size()
<< " is not equal to the number of edges in the mesh "
<< mesh.nEdges() << abort(FatalError);
}
const globalMeshData& gd = mesh.globalData();
const labelList& meshEdges = gd.coupledPatchMeshEdges();
const globalIndexAndTransform& git = gd.globalTransforms();
const mapDistribute& map = gd.globalEdgeSlavesMap();
List<point> cppFld(UIndirectList<point>(edgeValues, meshEdges));
globalMeshData::syncData
(
cppFld,
gd.globalEdgeSlaves(),
gd.globalEdgeTransformedSlaves(),
map,
git,
cop,
true //position?
);
// Extract back onto mesh
forAll(meshEdges, i)
{
edgeValues[meshEdges[i]] = cppFld[i];
}
}
//template <class CombineOp>
//void Foam::syncTools::syncEdgePositions
//(
// const polyMesh& mesh,
// List<point>& edgeValues,
// const CombineOp& cop,
// const point& nullValue
//)
//{
// if (edgeValues.size() != mesh.nEdges())
// {
// FatalErrorIn
// (
// "syncTools<class CombineOp>::syncEdgePositions"
// "(const polyMesh&, List<point>&, const CombineOp&, const point&)"
// ) << "Number of values " << edgeValues.size()
// << " is not equal to the number of edges in the mesh "
// << mesh.nEdges() << abort(FatalError);
// }
//
// const globalMeshData& gd = mesh.globalData();
// const labelList& meshEdges = gd.coupledPatchMeshEdges();
// const globalIndexAndTransform& git = gd.globalTransforms();
// const mapDistribute& map = gd.globalEdgeSlavesMap();
//
// List<point> cppFld(UIndirectList<point>(edgeValues, meshEdges));
//
// globalMeshData::syncData
// (
// cppFld,
// gd.globalEdgeSlaves(),
// gd.globalEdgeTransformedSlaves(),
// map,
// git,
// cop,
// true, //position?
// mapDistribute::transform() // not used
// );
//
// // Extract back onto mesh
// forAll(meshEdges, i)
// {
// edgeValues[meshEdges[i]] = cppFld[i];
// }
//}
template <class T, class CombineOp, class TransformOp>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,6 +29,7 @@ License
#include "PatchToolsEdgeOwner.C"
#include "PatchToolsSearch.C"
#include "PatchToolsSortEdges.C"
#include "PatchToolsNormals.C"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,6 +35,7 @@ SourceFiles
PatchToolsEdgeOwner.C
PatchToolsSearch.C
PatchToolsSortEdges.C
PatchToolsNormals.C
\*---------------------------------------------------------------------------*/
@ -49,6 +50,8 @@ SourceFiles
namespace Foam
{
class polyMesh;
/*---------------------------------------------------------------------------*\
Class PatchTools Declaration
\*---------------------------------------------------------------------------*/
@ -115,9 +118,9 @@ public:
//- Determine the mapping for a sub-patch.
// Only include faces for which bool-list entry is true.
// @param[in] includeFaces faces to include
// @param[out] pointMap mapping new to old localPoints
// @param[out] faceMap mapping new to old faces
// \param[in] includeFaces faces to include
// \param[out] pointMap mapping new to old localPoints
// \param[out] faceMap mapping new to old faces
template
<
class BoolListType,
@ -166,6 +169,22 @@ public:
);
//- Return parallel consistent point normals for patches (on boundary faces)
// using mesh points.
template
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
static tmp<pointField> pointNormals
(
const polyMesh&,
const PrimitivePatch<Face, FaceList, PointField, PointType>&,
const labelList& meshFaces
);
};

View File

@ -0,0 +1,227 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2011 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 3 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, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "PatchTools.H"
#include "polyMesh.H"
#include "indirectPrimitivePatch.H"
#include "globalMeshData.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
//- Transformation
class listTransform
{
public:
void operator()
(
const vectorTensorTransform& vt,
const bool forward,
List<List<point> >& fld
) const
{
const tensor T
(
forward
? vt.R()
: vt.R().T()
);
forAll(fld, i)
{
List<point>& elems = fld[i];
forAll(elems, elemI)
{
elems[elemI] = transform(T, elems[elemI]);
}
}
}
};
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
class Face,
template<class> class FaceList,
class PointField,
class PointType
>
Foam::tmp<Foam::pointField>
Foam::PatchTools::pointNormals
(
const polyMesh& mesh,
const PrimitivePatch<Face, FaceList, PointField, PointType>& p,
const labelList& meshFaces
)
{
// Assume patch is smaller than the globalData().coupledPatch() (?) so
// loop over patch meshPoints.
const globalMeshData& globalData = mesh.globalData();
const indirectPrimitivePatch& coupledPatch = globalData.coupledPatch();
const Map<label>& coupledPatchMP = coupledPatch.meshPointMap();
const mapDistribute& map = globalData.globalPointSlavesMap();
const globalIndexAndTransform& transforms =
globalData.globalTransforms();
// 1. Start off with local normals (note:without calculating pointNormals
// to avoid them being stored)
tmp<pointField> textrudeN(new pointField(p.nPoints(), vector::zero));
pointField& extrudeN = textrudeN();
{
const faceList& localFaces = p.localFaces();
const vectorField& faceNormals = p.faceNormals();
forAll(localFaces, faceI)
{
const face& f = localFaces[faceI];
const vector& n = faceNormals[faceI];
forAll(f, fp)
{
extrudeN[f[fp]] += n;
}
}
extrudeN /= mag(extrudeN)+VSMALL;
}
// Collect local pointFaces
List<List<point> > pointFaceNormals(map.constructSize());
forAll(p.meshPoints(), patchPointI)
{
label meshPointI = p.meshPoints()[patchPointI];
Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointI);
if (fnd != coupledPatchMP.end())
{
label coupledPointI = fnd();
List<point>& pNormals = pointFaceNormals[coupledPointI];
const labelList& pFaces = p.pointFaces()[patchPointI];
pNormals.setSize(pFaces.size());
forAll(pFaces, i)
{
pNormals[i] = p.faceNormals()[pFaces[i]];
}
}
}
// Pull remote data into local slots
map.distribute
(
transforms,
pointFaceNormals,
listTransform()
);
// Combine normals
const labelListList& slaves = globalData.globalPointSlaves();
const labelListList& transformedSlaves =
globalData.globalPointTransformedSlaves();
pointField coupledPointNormals(map.constructSize(), vector::zero);
forAll(p.meshPoints(), patchPointI)
{
label meshPointI = p.meshPoints()[patchPointI];
Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointI);
if (fnd != coupledPatchMP.end())
{
label coupledPointI = fnd();
const labelList& slaveSlots =
slaves[coupledPointI];
const labelList& transformedSlaveSlots =
transformedSlaves[coupledPointI];
label nFaces = slaveSlots.size()+transformedSlaveSlots.size();
if (nFaces > 0)
{
// Combine
point& n = coupledPointNormals[coupledPointI];
n += sum(pointFaceNormals[coupledPointI]);
forAll(slaveSlots, i)
{
n += sum(pointFaceNormals[slaveSlots[i]]);
}
forAll(transformedSlaveSlots, i)
{
n += sum(pointFaceNormals[transformedSlaveSlots[i]]);
}
n /= mag(n)+VSMALL;
// Put back into slave slots
forAll(slaveSlots, i)
{
coupledPointNormals[slaveSlots[i]] = n;
}
forAll(transformedSlaveSlots, i)
{
coupledPointNormals[transformedSlaveSlots[i]] = n;
}
}
}
}
// Send back
map.reverseDistribute
(
transforms,
coupledPointNormals.size(),
coupledPointNormals,
mapDistribute::transform()
);
// Override patch normals
forAll(p.meshPoints(), patchPointI)
{
label meshPointI = p.meshPoints()[patchPointI];
Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointI);
if (fnd != coupledPatchMP.end())
{
label coupledPointI = fnd();
extrudeN[patchPointI] = coupledPointNormals[coupledPointI];
}
}
return textrudeN;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -415,6 +415,7 @@ public:
// Check
//- Calculate surface type formed by patch.
// Types:
// - all edges have two neighbours (manifold)
// - some edges have more than two neighbours (illegal)
// - other (open)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,7 +134,8 @@ public:
}
//- compare Pairs
//- Compare Pairs
// Returning:
// - 0: different
// - +1: identical
// - -1: same pair, but reversed order

View File

@ -27,10 +27,10 @@ Class
Description
Templated basic entry that holds a constant value.
Usage - for entry <entryName> having the value <value>:
@verbatim
Usage - for entry \<entryName\> having the value <value>:
\verbatim
<entryName> constant <value>
@endverbatim
\endverbatim
SourceFiles
Constant.C

View File

@ -27,15 +27,15 @@ Class
Description
Templated table container data entry. Items are stored in a list of
Tuple2's. First column is always stored as scalar entries. Data is read
in the form, e.g. for an entry <entryName> that is (scalar, vector):
in the form, e.g. for an entry \<entryName\> that is (scalar, vector):
@verbatim
\verbatim
<entryName> table
(
0.0 (1 2 3)
1.0 (4 5 6)
);
@endverbatim
\endverbatim
SourceFiles
Table.C

View File

@ -26,16 +26,16 @@ Class
Description
Polynomial container data entry for scalars. Items are stored in a list of
Tuple2's. Data is input in the form, e.g. for an entry <entryName> that
Tuple2's. Data is input in the form, e.g. for an entry \<entryName\> that
describes y = x^2 + 2x^3
@verbatim
\verbatim
<entryName> polynomial
(
(1 2)
(2 3)
);
@endverbatim
\endverbatim
SourceFiles
polynomial.C

View File

@ -65,9 +65,10 @@ public:
// Public classes
//- Less function class used in sorting encoded transforms and indices
// - minimum processor
// - minimum local index
// - minimum transform
// Minimum of:
// - processor
// - local index
// - transform
class less
{
public:

View File

@ -54,9 +54,9 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Bob Jenkins's 96-bit mixer hashing function (lookup3)
// @param[in] data - a character stream
// @param[in] len - the number of bytes
// @param[in] seed - the previous hash, or an arbitrary value
// \param[in] data - a character stream
// \param[in] len - the number of bytes
// \param[in] seed - the previous hash, or an arbitrary value
unsigned Hasher(const void* data, size_t len, unsigned seed = 0);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -48,22 +48,22 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- An optimized version of Hasher
// @param[in] data - an array of uint32_t values
// @param[in] len - the number of values (not bytes)
// @param[in] seed - the previous hash, or an arbitrary value
unsigned HasherInt(const uint32_t*, size_t length, unsigned seed = 0);
// \param[in] data - an array of uint32_t values
// \param[in] length - the number of values (not bytes)
// \param[in] seed - the previous hash, or an arbitrary value
unsigned HasherInt(const uint32_t* data, size_t length, unsigned seed = 0);
//- An optimized version of Hasher, returning dual hash values
// @param[in] data - an array of uint32_t values
// @param[in] len - the number of values (not bytes)
// @param[in] hash1 - the previous hash, or an arbitrary value
// \param[in] data - an array of uint32_t values
// \param[in] length - the number of values (not bytes)
// \param[in] hash1 - the previous hash, or an arbitrary value
// on output, the primary hash value
// @param[in] hash1 - the previous hash, or an arbitrary value
// \param[in] hash1 - the previous hash, or an arbitrary value
// on output, the secondary hash value
unsigned HasherDual
(
const uint32_t*,
size_t len,
const uint32_t* data,
size_t length,
unsigned& hash1,
unsigned& hash2
);

View File

@ -45,11 +45,11 @@ Description
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
//! @cond fileScope
//! \cond fileScope
// The bytes used to pad buffer to the next 64-byte boundary.
// (RFC 1321, 3.1: Step 1)
static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
//! @endcond
//! \endcond
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //

View File

@ -30,9 +30,9 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
//! @cond fileScope
//! \cond fileScope
static const char hexChars[] = "0123456789abcdef";
//! @endcond
//! \endcond
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -180,7 +180,7 @@ public:
// - leading "~user" : home directory for specified user
// - leading "~OpenFOAM" : site/user OpenFOAM configuration directory
//
// @sa
// \sa
// Foam::findEtcFile
string& expand(const bool recurse=false);
@ -199,14 +199,14 @@ public:
// Member Operators
//- Return the sub-string from the i-th character for @a n characters
//- Return the sub-string from the i-th character for \a n characters
inline string operator()
(
const size_type i,
const size_type n
) const;
//- Return the sub-string from the first character for @a n characters
//- Return the sub-string from the first character for \a n characters
inline string operator()
(
const size_type n

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,9 +46,9 @@ namespace Foam
// Largest message sent so far. This tracks the size of the receive
// buffer on the receiving end. Done so we only send out resize messages
// if necessary
//! @cond fileScope
//! \cond fileScope
labelList maxSendSize;
//! @endcond
//! \endcond
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,9 +33,9 @@ namespace Foam
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// Outstanding non-blocking operations.
//! @cond fileScope
//! \cond fileScope
DynamicList<MPI_Request> PstreamGlobals::outstandingRequests_;
//! @endcond
//! \endcond
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -206,7 +206,7 @@ public:
};
//- Reconstruct part characteristics on freestore from Istream
// @sa reconstruct
// \sa reconstruct
static autoPtr<ensightPart> New(Istream&);

View File

@ -138,7 +138,7 @@ public:
//- Reconstruct part characteristics (eg, element types) from Istream
// A part reconstructed in this manner can be used when writing fields,
// but cannot be used to write a new geometry
// @sa Foam::ensightPart::reconstruct
// \sa Foam::ensightPart::reconstruct
ensightPartCells(Istream&);
//- Reconstruct part characteristics on freestore from Istream

View File

@ -144,7 +144,7 @@ public:
//- Reconstruct part characteristics (eg, element types) from Istream
// A part reconstructed in this manner can be used when writing fields,
// but cannot be used to write a new geometry
// @sa Foam::ensightPart::reconstruct
// \sa Foam::ensightPart::reconstruct
ensightPartFaces(Istream&);
//- Reconstruct part characteristics on freestore from Istream

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,11 +29,11 @@ Description
The meshReader supports boundaryRegion information.
The <tt>constant/boundaryRegion</tt> file is an @c IOMap<dictionary>
The <tt>constant/boundaryRegion</tt> file is an \c IOMap<dictionary>
that is used to save the information persistently.
It contains the boundaryRegion information of the following form:
@verbatim
\verbatim
(
INT
{
@ -42,7 +42,7 @@ Description
}
...
)
@endverbatim
\endverbatim
SourceFiles
boundaryRegion.C
@ -149,9 +149,9 @@ public:
//- Rename regions
// each dictionary entry is a single word:
// @verbatim
// \verbatim
// newPatchName originalName;
// @endverbatim
// \endverbatim
void rename(const dictionary&);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,11 +29,11 @@ Description
The meshReader supports cellTable information.
The <tt>constant/cellTable</tt> file is an @c IOMap<dictionary> that is
The <tt>constant/cellTable</tt> file is an \c IOMap<dictionary> that is
used to save the information persistently. It contains the cellTable
information of the following form:
@verbatim
\verbatim
(
ID
{
@ -46,10 +46,10 @@ Description
}
...
)
@endverbatim
\endverbatim
If the @a Label is missing, a value <tt>cellTable_{ID}</tt> will be
inferred. If the @a MaterialType is missing, the value @a fluid will
If the \a Label is missing, a value <tt>cellTable_{ID}</tt> will be
inferred. If the \a MaterialType is missing, the value @a fluid will
be inferred.
SourceFiles

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,7 +39,7 @@ Description
"constant/boundaryRegion" is an IOMap<dictionary> that contains
the boundary type and names. eg,
@verbatim
\verbatim
(
0
{
@ -61,7 +61,7 @@ Description
Label outlet;
}
)
@endverbatim
\endverbatim
SourceFiles

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,7 +44,7 @@ Description
-# Start:
cell with anchor points at bottom
@verbatim
\verbatim
+-------+
| +
| +
@ -55,13 +55,13 @@ Description
| +
+-------+
anchor anchor
@endverbatim
\endverbatim
-# Topo change:
splitface introduced at bottom of cell, introducing a new
cell and splitting the side faces into two.
@verbatim
\verbatim
+-------+
| +
| +
@ -72,12 +72,12 @@ Description
+-------+ <- splitFace
+-------+ <- original cell
anchor anchor
@endverbatim
\endverbatim
-# Inflation:
splitface shifted up to middle of cell (or wherever cut was)
@verbatim
\verbatim
+-------+
| +
| + <- addedCell
@ -88,7 +88,7 @@ Description
| +
+-------+
anchor anchor
@endverbatim
\endverbatim
Anyway this was the original idea. Inflation was meant to handle
conservative properties distribution without interpolation.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,7 +33,7 @@ Description
scale back displacement.
E.g.
@verbatim
\verbatim
// Construct iterative mesh mover.
motionSmoother meshMover(mesh, labelList(1, patchI));
@ -48,7 +48,7 @@ Description
return true;
}
}
@endverbatim
\endverbatim
Note
- Shared points (parallel): a processor can have points which are part of

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,7 +43,7 @@ Description
- the cut is always the 'most connected' of the master and slave so
multiple master or slave points might point to the same cut point.
@verbatim
\verbatim
e.g. master:
+--+
@ -63,7 +63,7 @@ Description
| |
| |
+--+
@endverbatim
\endverbatim
adding both together creates a singly connected 2x2 cavity so suddenly
the duplicate master points and the duplicate slave points all become
a single cut point.
@ -81,7 +81,7 @@ Description
- slave can have extra edges/points/faces BUT all subfaces have to have
at least one point on a maste face.
@verbatim
\verbatim
So master:
+-------+
| |
@ -104,7 +104,7 @@ Description
|/ | \|
+---+---+
is ok.
@endverbatim
\endverbatim
For this kind of matching the order is:
- match cutpoint to masterpoint

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -281,7 +281,8 @@ public:
// Point merging
//- Find topologically&geometrically shared points.
//- Find topologically and geometrically shared points.
//
// - should only be called for parallel correct mesh
// (since uses mesh.globalData)
// - returns Map from point to master point (all in mesh point
@ -293,6 +294,7 @@ public:
);
//- Helper: Merge points.
//
// - Gets map from point to destination point
// - Removes all points that don't map to themselves
// - Modifies all faces that use the points to be removed.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ Description
E.g. 2 boundary faces on patches a,b. 2 layers for a, 3 for b.
@verbatim
\verbatim
Was:
a b <- patch of boundary face
@ -62,7 +62,7 @@ Description
+------+------+
| | | <- original cells
+------+------+
@endverbatim
\endverbatim
- added faces get same patchID as face they are extruded from
@ -72,7 +72,7 @@ Description
E.g. 3 boundary faces on patches a,b. b gets extruded, a doesn't.
@verbatim
\verbatim
a b b <- patch of boundary face
+------+------+------+
| | | | <- cells
@ -91,7 +91,7 @@ Description
+------+------+------+ 2. side-face gets patch a, not b.
| | | |
+------+------+------+
@endverbatim
\endverbatim
SourceFiles

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -382,6 +382,7 @@ public:
) const;
//- Like consistentRefinement but slower:
//
// - specify number of cells between consecutive refinement levels
// (consistentRefinement equivalent to 1)
// - specify max level difference between point-connected cells.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ Description
indices into splitCells.
E.g. 2 cells, cell 1 gets refined so end up with 9 cells:
@verbatim
\verbatim
// splitCells
9
(
@ -52,7 +52,7 @@ Description
// visibleCells
9(-1 1 2 3 4 5 6 7 8)
@endverbatim
\endverbatim
So cell0 (visibleCells=-1) is unrefined.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,14 +36,11 @@ License
namespace Foam
{
defineTypeNameAndDebug(removeCells, 0);
defineTypeNameAndDebug(removeCells, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Remove count of elements of f.
void Foam::removeCells::uncount
(
const labelList& f,
@ -59,7 +56,6 @@ void Foam::removeCells::uncount
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from mesh
Foam::removeCells::removeCells
(
const polyMesh& mesh,
@ -73,10 +69,6 @@ Foam::removeCells::removeCells
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
//- Get labels of exposed faces. These are
// - internal faces that become boundary faces
// - coupled faces that become uncoupled (since on of the sides
// gets deleted)
Foam::labelList Foam::removeCells::getExposedFaces
(
const labelList& cellLabels

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -94,7 +94,8 @@ public:
// Topology changes
//- Get labels of exposed faces. These are
//- Get labels of exposed faces.
// These are
// - internal faces that become boundary faces
// - coupled faces that become uncoupled (since one of the sides
// gets deleted)
@ -114,7 +115,6 @@ public:
//- Force recalculation of locally stored data on topological change
void updateMesh(const mapPolyMesh&)
{}
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -178,7 +178,8 @@ public:
// Member Functions
//- Given set of faces to pierce calculates:
//- Find faces including those with cells which have the same mastercell
// Given set of faces to pierce calculates:
// - region for connected cells
// - mastercell for each region. This is the lowest numbered cell
// of all cells that get merged.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,7 @@ Description
Read/write the lines from pro-STAR vrt/cel files.
Note
Uses the extension @a .inp (input) to denote the format.
Uses the extension \a .inp (input) to denote the format.
See Also
Foam::meshReaders::STARCD

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,18 +29,18 @@ Description
When engineTime is in effect, the userTime is reported in degrees
crank-angle instead of in seconds. The RPM to be used is specified in
@c constant/engineGeometry. If only a time conversion is required,
\c constant/engineGeometry. If only a time conversion is required,
the geometric engine parameters can be dropped or set to zero.
For example,
@verbatim
\verbatim
rpm rpm [0 0 -1 0 0] 2000;
conRodLength conRodLength [0 1 0 0 0] 0.0;
bore bore [0 1 0 0 0] 0.0;
stroke stroke [0 1 0 0 0] 0.0;
clearance clearance [0 1 0 0 0] 0.0;
@endverbatim
\endverbatim
Note
The engineTime can currently only be selected at compile-time.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2006-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -94,7 +94,7 @@ public:
//- Read points from a (.vrt) file
// The file format is as follows:
// @verbatim
// \verbatim
// Line 1:
// PROSTAR_VERTEX newline
//
@ -103,7 +103,7 @@ public:
//
// Body:
// {vertexId} {x} {y} {z} newline
// @endverbatim
// \endverbatim
static bool readPoints(IFstream&, pointField&, labelList& ids);
//- Write header and points to (.vrt) file

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::PorousZones<ZoneType>
Foam::PorousZones
Description
A centralized ZoneType collection.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,15 +40,15 @@ Description
Implemented porosity models:
powerLaw (@e C0 and @e C1 parameters)
@f[
powerLaw (\e C0 and \e C1 parameters)
\f[
S = - \rho C_0 |U|^{(C_1 - 1)/2} U
@f]
\f]
Darcy-Forchheimer (@e d and @e f parameters)
@f[
Darcy-Forchheimer (@e d and \e f parameters)
\f[
S = - (\mu \, d + \frac{\rho |U|}{2} \, f) U
@f]
\f]
Since negative Darcy/Forchheimer parameters are invalid, they can be used
@ -58,7 +58,7 @@ Description
method, but accounts for the effective volume of the cells.
An example dictionary entry:
@verbatim
\verbatim
cat1
{
note "some catalyst";
@ -74,7 +74,7 @@ Description
f f [0 -1 0 0 0] (-1000 -1000 15.83);
}
}
@endverbatim
\endverbatim
See Also
porousZones and coordinateSystems

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,7 +38,7 @@ Description
advectionSpeed() the default implementation of which requires the name of
flux field a the outlet (phi) and optionally the density (rho) if the
mass-flux rather than the volumetric-flux is given.
@verbatim
\verbatim
outlet
{
type advective;
@ -47,7 +47,7 @@ Description
// fieldInf 1e5; // Optional
// lInf 0.1; // Optional
}
@endverbatim
\endverbatim
The flow/wave speed at the outlet can be changed by deriving a specialised
BC fron this class and overriding advectionSpeed() e.g. in

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ Description
given a central axis, central point, rpm, axial and radial velocity.
Example of the boundary condition specification:
@verbatim
\verbatim
inlet
{
type cylindricalInletVelocity;
@ -40,7 +40,7 @@ Description
rpm 100;
radialVelocity -10;
}
@endverbatim
\endverbatim
SourceFiles

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,14 +29,14 @@ Description
properties.
Example of the boundary condition specification:
@verbatim
\verbatim
inlet
{
type fixedPressureCompressibleDensity;
p p; // Name of static pressure field
value uniform 1; // Initial value
}
@endverbatim
\endverbatim
SourceFiles
fixedPressureCompressibleDensityFvPatchScalarField.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2006-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2006-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,14 +34,14 @@ Description
mass basis.
Example of the boundary condition specification:
@verbatim
\verbatim
inlet
{
type flowRateInletVelocity;
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
value uniform (0 0 0); // placeholder
}
@endverbatim
\endverbatim
Note
- The value is positive inwards

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,14 +35,14 @@ Description
mass basis.
Example of the boundary condition specification:
@verbatim
\verbatim
inlet
{
type swirlFlowRateInletVelocity;
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
rpm 100;
}
@endverbatim
\endverbatim
Note
- The value is positive inwards

Some files were not shown because too many files have changed in this diff Show More