Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2011-03-08 15:42:06 +00:00
5 changed files with 70 additions and 39 deletions

View File

@ -1074,18 +1074,33 @@ int Foam::system(const std::string& command)
void* Foam::dlOpen(const fileName& lib) void* Foam::dlOpen(const fileName& lib)
{ {
if (POSIX::debug)
{
Info<< "dlOpen(const fileName&)"
<< " : dlopen of " << lib << endl;
}
return ::dlopen(lib.c_str(), RTLD_LAZY|RTLD_GLOBAL); return ::dlopen(lib.c_str(), RTLD_LAZY|RTLD_GLOBAL);
} }
bool Foam::dlClose(void* handle) bool Foam::dlClose(void* handle)
{ {
if (POSIX::debug)
{
Info<< "dlClose(void*)"
<< " : dlclose" << endl;
}
return ::dlclose(handle) == 0; return ::dlclose(handle) == 0;
} }
void* Foam::dlSym(void* handle, const std::string& symbol) void* Foam::dlSym(void* handle, const std::string& symbol)
{ {
if (POSIX::debug)
{
Info<< "dlSym(void*, const std::string&)"
<< " : dlsym of " << symbol << endl;
}
// clear any old errors - see manpage dlopen // clear any old errors - see manpage dlopen
(void) ::dlerror(); (void) ::dlerror();
@ -1110,6 +1125,12 @@ bool Foam::dlSymFound(void* handle, const std::string& symbol)
{ {
if (handle && !symbol.empty()) if (handle && !symbol.empty())
{ {
if (POSIX::debug)
{
Info<< "dlSymFound(void*, const std::string&)"
<< " : dlsym of " << symbol << endl;
}
// clear any old errors - see manpage dlopen // clear any old errors - see manpage dlopen
(void) ::dlerror(); (void) ::dlerror();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -97,16 +97,18 @@ struct HashTableCore
{} {}
}; };
static const iteratorEnd endIter;
//- iteratorEnd set to beyond the end of any HashTable //- iteratorEnd set to beyond the end of any HashTable
inline static iteratorEnd cend() inline static const iteratorEnd& cend()
{ {
return iteratorEnd(); return endIter;
} }
//- iteratorEnd set to beyond the end of any HashTable //- iteratorEnd set to beyond the end of any HashTable
inline static iteratorEnd end() inline static const iteratorEnd& end()
{ {
return iteratorEnd(); return endIter;
} }
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,6 +37,9 @@ const Foam::label Foam::HashTableCore::maxTableSize
) )
); );
const Foam::HashTableCore::iteratorEnd Foam::HashTableCore::endIter;
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::label Foam::HashTableCore::canonicalSize(const label size) Foam::label Foam::HashTableCore::canonicalSize(const label size)

View File

@ -25,6 +25,7 @@ License
#include "cloud.H" #include "cloud.H"
#include "Time.H" #include "Time.H"
#include "polyMesh.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -211,8 +211,6 @@ void Foam::triSurface::checkTriangles(const bool verbose)
boolList valid(size(), true); boolList valid(size(), true);
bool hasInvalid = false; bool hasInvalid = false;
const labelListList& fFaces = faceFaces();
forAll(*this, faceI) forAll(*this, faceI)
{ {
const labelledTri& f = (*this)[faceI]; const labelledTri& f = (*this)[faceI];
@ -236,19 +234,23 @@ void Foam::triSurface::checkTriangles(const bool verbose)
else else
{ {
// duplicate triangle check // duplicate triangle check
const labelList& neighbours = fFaces[faceI]; const labelList& fEdges = faceEdges()[faceI];
// Check if faceNeighbours use same points as this face. // Check if faceNeighbours use same points as this face.
// Note: discards normal information - sides of baffle are merged. // Note: discards normal information - sides of baffle are merged.
forAll(neighbours, neighbourI)
forAll(fEdges, fp)
{ {
if (neighbours[neighbourI] <= faceI) const labelList& eFaces = edgeFaces()[fEdges[fp]];
forAll(eFaces, i)
{
label neighbour = eFaces[i];
if (neighbour > faceI)
{ {
// lower numbered faces already checked // lower numbered faces already checked
continue; const labelledTri& n = (*this)[neighbour];
}
const labelledTri& n = (*this)[neighbours[neighbourI]];
if if
( (
@ -272,7 +274,7 @@ void Foam::triSurface::checkTriangles(const bool verbose)
Warning Warning
<< endl << endl
<< " face 2 :" << " face 2 :"
<< neighbours[neighbourI] << endl; << neighbour << endl;
printTriangle(Warning, " ", n, points()); printTriangle(Warning, " ", n, points());
} }
@ -281,6 +283,8 @@ void Foam::triSurface::checkTriangles(const bool verbose)
} }
} }
} }
}
}
if (hasInvalid) if (hasInvalid)
{ {