mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Test-syncTools : remove warning about transformations
This commit is contained in:
@ -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
|
||||||
@ -130,6 +130,7 @@ void testPackedList(const polyMesh& mesh, Random& rndGen)
|
|||||||
{
|
{
|
||||||
FatalErrorIn("testPackedList()")
|
FatalErrorIn("testPackedList()")
|
||||||
<< "point:" << i
|
<< "point:" << i
|
||||||
|
<< " at:" << mesh.points()[i]
|
||||||
<< " minlabel:" << pointValues[i]
|
<< " minlabel:" << pointValues[i]
|
||||||
<< " minbits:" << bits.get(i)
|
<< " minbits:" << bits.get(i)
|
||||||
<< " maxLabel:" << maxPointValues[i]
|
<< " maxLabel:" << maxPointValues[i]
|
||||||
@ -186,6 +187,10 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
|
|||||||
{
|
{
|
||||||
Info<< nl << "Testing Map synchronisation." << endl;
|
Info<< nl << "Testing Map synchronisation." << endl;
|
||||||
|
|
||||||
|
WarningIn("testSparseData()")
|
||||||
|
<< "Position test of sparse data only correct for cases without cyclics"
|
||||||
|
<< " with shared points." << endl;
|
||||||
|
|
||||||
primitivePatch allBoundary
|
primitivePatch allBoundary
|
||||||
(
|
(
|
||||||
SubList<face>
|
SubList<face>
|
||||||
@ -204,7 +209,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Create some data. Use slightly perturbed positions.
|
// Create some data. Use slightly perturbed positions.
|
||||||
Map<vector> sparseData;
|
Map<point> sparseData;
|
||||||
pointField fullData(mesh.nPoints(), point::max);
|
pointField fullData(mesh.nPoints(), point::max);
|
||||||
|
|
||||||
forAll(localPoints, i)
|
forAll(localPoints, i)
|
||||||
@ -223,14 +228,14 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
|
|||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
sparseData,
|
sparseData,
|
||||||
minEqOp<vector>()
|
minMagSqrEqOp<point>()
|
||||||
// true // apply separation
|
// true // apply separation
|
||||||
);
|
);
|
||||||
syncTools::syncPointList
|
syncTools::syncPointList
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
fullData,
|
fullData,
|
||||||
minEqOp<vector>(),
|
minMagSqrEqOp<point>(),
|
||||||
point::max
|
point::max
|
||||||
// true // apply separation
|
// true // apply separation
|
||||||
);
|
);
|
||||||
@ -257,7 +262,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. Does sparseData contain more?
|
// 2. Does sparseData contain more?
|
||||||
forAllConstIter(Map<vector>, sparseData, iter)
|
forAllConstIter(Map<point>, sparseData, iter)
|
||||||
{
|
{
|
||||||
const point& sparsePt = iter();
|
const point& sparsePt = iter();
|
||||||
label meshPointI = iter.key();
|
label meshPointI = iter.key();
|
||||||
@ -374,16 +379,12 @@ void testPointSync(const polyMesh& mesh, Random& rndGen)
|
|||||||
// Test position.
|
// Test position.
|
||||||
|
|
||||||
{
|
{
|
||||||
WarningIn("testPointSync()")
|
|
||||||
<< "Position test only correct for cases without cyclics"
|
|
||||||
<< " with shared points." << endl;
|
|
||||||
|
|
||||||
pointField syncedPoints(mesh.points());
|
pointField syncedPoints(mesh.points());
|
||||||
syncTools::syncPointList
|
syncTools::syncPointPositions
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
syncedPoints,
|
syncedPoints,
|
||||||
minEqOp<point>(),
|
minMagSqrEqOp<point>(),
|
||||||
point::max
|
point::max
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -450,20 +451,16 @@ void testEdgeSync(const polyMesh& mesh, Random& rndGen)
|
|||||||
// Test position.
|
// Test position.
|
||||||
|
|
||||||
{
|
{
|
||||||
WarningIn("testEdgeSync()")
|
|
||||||
<< "Position test only correct for cases without cyclics"
|
|
||||||
<< " with shared edges." << endl;
|
|
||||||
|
|
||||||
pointField syncedMids(edges.size());
|
pointField syncedMids(edges.size());
|
||||||
forAll(syncedMids, edgeI)
|
forAll(syncedMids, edgeI)
|
||||||
{
|
{
|
||||||
syncedMids[edgeI] = edges[edgeI].centre(mesh.points());
|
syncedMids[edgeI] = edges[edgeI].centre(mesh.points());
|
||||||
}
|
}
|
||||||
syncTools::syncEdgeList
|
syncTools::syncEdgePositions
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
syncedMids,
|
syncedMids,
|
||||||
minEqOp<point>(),
|
minMagSqrEqOp<point>(),
|
||||||
point::max
|
point::max
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -509,10 +506,11 @@ void testEdgeSync(const polyMesh& mesh, Random& rndGen)
|
|||||||
{
|
{
|
||||||
if (nMasters[edgeI] != 1)
|
if (nMasters[edgeI] != 1)
|
||||||
{
|
{
|
||||||
|
const edge& e = edges[edgeI];
|
||||||
//FatalErrorIn("testEdgeSync()")
|
//FatalErrorIn("testEdgeSync()")
|
||||||
WarningIn("testEdgeSync()")
|
WarningIn("testEdgeSync()")
|
||||||
<< "Edge " << edgeI
|
<< "Edge " << edgeI
|
||||||
<< " midpoint " << edges[edgeI].centre(mesh.points())
|
<< " at:" << mesh.points()[e[0]] << mesh.points()[e[1]]
|
||||||
<< " has " << nMasters[edgeI]
|
<< " has " << nMasters[edgeI]
|
||||||
<< " masters."
|
<< " masters."
|
||||||
//<< exit(FatalError);
|
//<< exit(FatalError);
|
||||||
@ -532,11 +530,11 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen)
|
|||||||
{
|
{
|
||||||
pointField syncedFc(mesh.faceCentres());
|
pointField syncedFc(mesh.faceCentres());
|
||||||
|
|
||||||
syncTools::syncFaceList
|
syncTools::syncFacePositions
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
syncedFc,
|
syncedFc,
|
||||||
maxEqOp<point>()
|
maxMagSqrEqOp<point>()
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(syncedFc, faceI)
|
forAll(syncedFc, faceI)
|
||||||
|
|||||||
Reference in New Issue
Block a user