Merge branch 'master' of /home/noisy2/OpenFOAM/OpenFOAM-dev/
This commit is contained in:
commit
c3d293de7a
@ -47,7 +47,7 @@ Description
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef READLINE
|
#if READLINE != 0
|
||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
#include <readline/history.h>
|
#include <readline/history.h>
|
||||||
#endif
|
#endif
|
||||||
@ -57,7 +57,7 @@ using namespace Foam;
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
#ifdef READLINE
|
#if READLINE != 0
|
||||||
static const char* historyFile = ".setSet";
|
static const char* historyFile = ".setSet";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -739,7 +739,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
fileStreamPtr = new std::ifstream(batchFile.c_str());
|
fileStreamPtr = new std::ifstream(batchFile.c_str());
|
||||||
}
|
}
|
||||||
#ifdef READLINE
|
#if READLINE != 0
|
||||||
else if (!read_history(historyFile))
|
else if (!read_history(historyFile))
|
||||||
{
|
{
|
||||||
Info<< "Successfully read history from " << historyFile << endl;
|
Info<< "Successfully read history from " << historyFile << endl;
|
||||||
@ -784,7 +784,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
# ifdef READLINE
|
# if READLINE != 0
|
||||||
{
|
{
|
||||||
char* linePtr = readline("readline>");
|
char* linePtr = readline("readline>");
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!noTopology)
|
if (!noTopology)
|
||||||
{
|
{
|
||||||
noFailedChecks += checkTopology(mesh, allTopology);
|
noFailedChecks += checkTopology(mesh, allTopology, allGeometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
noFailedChecks += checkGeometry(mesh, allGeometry);
|
noFailedChecks += checkGeometry(mesh, allGeometry);
|
||||||
|
@ -7,7 +7,12 @@
|
|||||||
#include "pointSet.H"
|
#include "pointSet.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
|
|
||||||
Foam::label Foam::checkTopology(const polyMesh& mesh, const bool allTopology)
|
Foam::label Foam::checkTopology
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const bool allTopology,
|
||||||
|
const bool allGeometry
|
||||||
|
)
|
||||||
{
|
{
|
||||||
label noFailedChecks = 0;
|
label noFailedChecks = 0;
|
||||||
|
|
||||||
@ -142,39 +147,38 @@ Foam::label Foam::checkTopology(const polyMesh& mesh, const bool allTopology)
|
|||||||
<< setw(20) << "Patch"
|
<< setw(20) << "Patch"
|
||||||
<< setw(9) << "Faces"
|
<< setw(9) << "Faces"
|
||||||
<< setw(9) << "Points"
|
<< setw(9) << "Points"
|
||||||
<< " Surface" << endl;
|
<< setw(34) << "Surface topology";
|
||||||
|
if (allGeometry)
|
||||||
|
{
|
||||||
|
Pout<< " Bounding box";
|
||||||
|
}
|
||||||
|
Pout<< endl;
|
||||||
|
|
||||||
forAll(patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
const polyPatch& pp = patches[patchI];
|
const polyPatch& pp = patches[patchI];
|
||||||
|
|
||||||
|
Pout<< " "
|
||||||
|
<< setw(20) << pp.name()
|
||||||
|
<< setw(9) << pp.size()
|
||||||
|
<< setw(9) << pp.nPoints();
|
||||||
|
|
||||||
|
|
||||||
primitivePatch::surfaceTopo pTyp = pp.surfaceType();
|
primitivePatch::surfaceTopo pTyp = pp.surfaceType();
|
||||||
|
|
||||||
if (pp.size() == 0)
|
if (pp.size() == 0)
|
||||||
{
|
{
|
||||||
Pout<< " "
|
Pout<< setw(34) << "ok (empty)";
|
||||||
<< setw(20) << pp.name()
|
|
||||||
<< setw(9) << pp.size()
|
|
||||||
<< setw(9) << pp.nPoints()
|
|
||||||
<< " ok (empty)" << endl;
|
|
||||||
}
|
}
|
||||||
else if (pTyp == primitivePatch::MANIFOLD)
|
else if (pTyp == primitivePatch::MANIFOLD)
|
||||||
{
|
{
|
||||||
if (pp.checkPointManifold(true, &points))
|
if (pp.checkPointManifold(true, &points))
|
||||||
{
|
{
|
||||||
Pout<< " "
|
Pout<< setw(34) << "multiply connected (shared point)";
|
||||||
<< setw(20) << pp.name()
|
|
||||||
<< setw(9) << pp.size()
|
|
||||||
<< setw(9) << pp.nPoints()
|
|
||||||
<< " multiply connected (shared point)" << endl;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< " "
|
Pout<< setw(34) << "ok (closed singly connected)";
|
||||||
<< setw(20) << pp.name()
|
|
||||||
<< setw(9) << pp.size()
|
|
||||||
<< setw(9) << pp.nPoints()
|
|
||||||
<< " ok (closed singly connected surface)" << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add points on non-manifold edges to make set complete
|
// Add points on non-manifold edges to make set complete
|
||||||
@ -186,22 +190,35 @@ Foam::label Foam::checkTopology(const polyMesh& mesh, const bool allTopology)
|
|||||||
|
|
||||||
if (pTyp == primitivePatch::OPEN)
|
if (pTyp == primitivePatch::OPEN)
|
||||||
{
|
{
|
||||||
Pout<< " "
|
Pout<< setw(34) << "ok (non-closed singly connected)";
|
||||||
<< setw(20) << pp.name()
|
|
||||||
<< setw(9) << pp.size()
|
|
||||||
<< setw(9) << pp.nPoints()
|
|
||||||
<< " ok (not multiply connected)" << endl;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Pout<< " "
|
Pout<< setw(34) << "multiply connected (shared edge)";
|
||||||
<< setw(20) << pp.name()
|
|
||||||
<< setw(9) << pp.size()
|
|
||||||
<< setw(9) << pp.nPoints()
|
|
||||||
<< " multiply connected surface (shared edge)"
|
|
||||||
<< endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (allGeometry)
|
||||||
|
{
|
||||||
|
const pointField& pts = pp.points();
|
||||||
|
const labelList& mp = pp.meshPoints();
|
||||||
|
|
||||||
|
boundBox bb(vector::zero, vector::zero);
|
||||||
|
if (returnReduce(mp.size(), sumOp<label>()) > 0)
|
||||||
|
{
|
||||||
|
bb.min() = pts[mp[0]];
|
||||||
|
bb.max() = pts[mp[0]];
|
||||||
|
for (label i = 1; i < mp.size(); i++)
|
||||||
|
{
|
||||||
|
bb.min() = min(bb.min(), pts[mp[i]]);
|
||||||
|
bb.max() = max(bb.max(), pts[mp[i]]);
|
||||||
|
}
|
||||||
|
reduce(bb.min(), minOp<vector>());
|
||||||
|
reduce(bb.max(), maxOp<vector>());
|
||||||
|
}
|
||||||
|
Pout<< ' ' << bb;
|
||||||
|
}
|
||||||
|
Pout<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (points.size() > 0)
|
if (points.size() > 0)
|
||||||
|
@ -4,5 +4,5 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
|
|
||||||
label checkTopology(const polyMesh& mesh, const bool allTopology);
|
label checkTopology(const polyMesh&, const bool, const bool);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------* \
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
@ -1050,7 +1050,7 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster
|
|||||||
point fc(f1.centre(mesh1.points()));
|
point fc(f1.centre(mesh1.points()));
|
||||||
|
|
||||||
// Search in bounding box of face only.
|
// Search in bounding box of face only.
|
||||||
treeBoundBox tightest(f1.points(mesh1.points()));
|
treeBoundBox tightest(static_cast<const pointField&>(f1.points(mesh1.points())));
|
||||||
|
|
||||||
scalar tightestDist = GREAT;
|
scalar tightestDist = GREAT;
|
||||||
|
|
||||||
|
@ -145,9 +145,6 @@ colourIndex=0
|
|||||||
|
|
||||||
while :
|
while :
|
||||||
do
|
do
|
||||||
# 0.5 sec
|
|
||||||
usleep 500000
|
|
||||||
|
|
||||||
for slotGroup in $WM_HOSTS
|
for slotGroup in $WM_HOSTS
|
||||||
do
|
do
|
||||||
# split 'host:N', but catch 'host:' and 'host' too
|
# split 'host:N', but catch 'host:' and 'host' too
|
||||||
@ -159,11 +156,8 @@ do
|
|||||||
i=0
|
i=0
|
||||||
while [ "$i" -lt "$n" ]
|
while [ "$i" -lt "$n" ]
|
||||||
do
|
do
|
||||||
lock="$host:$i"
|
lockFile="$lockDir/$host:$i"
|
||||||
if [ ! -f "$lockDir/$lock" ]; then
|
if lockfile -r0 "$lockFile" 2>/dev/null; then
|
||||||
# Set lock
|
|
||||||
touch "$lockDir/$lock"
|
|
||||||
|
|
||||||
# Set colour
|
# Set colour
|
||||||
colour=${colours[$colourIndex]}
|
colour=${colours[$colourIndex]}
|
||||||
#echo "** host=$host colourIndex=$colourIndex colour=$colour"
|
#echo "** host=$host colourIndex=$colourIndex colour=$colour"
|
||||||
@ -186,7 +180,7 @@ do
|
|||||||
retval=$?
|
retval=$?
|
||||||
|
|
||||||
# Release lock
|
# Release lock
|
||||||
rm -f "$lockDir/$lock" 2>/dev/null
|
rm -f "$lockFile" 2>/dev/null
|
||||||
exit $retval
|
exit $retval
|
||||||
fi
|
fi
|
||||||
i=$(expr $i + 1)
|
i=$(expr $i + 1)
|
||||||
@ -198,6 +192,8 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
# Not found any free slots. Rest a bit.
|
||||||
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$WM_COLOURS" ]; then
|
if [ "$WM_COLOURS" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user