diff --git a/applications/test/Circulator/Test-Circulator.C b/applications/test/Circulator/Test-Circulator.C index c158d57626..c41d7b6544 100644 --- a/applications/test/Circulator/Test-Circulator.C +++ b/applications/test/Circulator/Test-Circulator.C @@ -37,6 +37,12 @@ Description using namespace Foam; +void printCompare(const face& a, const face& b) +{ + Info<< "Compare " << a << " and " << b + << " Match = " << face::compare(a, b) << endl; +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: @@ -96,44 +102,35 @@ int main(int argc, char *argv[]) Info<< nl << nl << "Compare two faces: " << endl; face a(identity(5)); - Info<< "Compare " << a << " and " << a << " Match = " << face::compare(a, a) - << endl; + printCompare(a, a); face b(reverseList(a)); - Info<< "Compare " << a << " and " << b << " Match = " << face::compare(a, b) - << endl; + printCompare(a, b); face c(a); c[4] = 3; - Info<< "Compare " << a << " and " << c << " Match = " << face::compare(a, c) - << endl; + printCompare(a, c); face d(rotateList(a, 2)); - Info<< "Compare " << a << " and " << d << " Match = " << face::compare(a, d) - << endl; + printCompare(a, d); face g(labelList(5, 1)); face h(g); - Info<< "Compare " << g << " and " << h << " Match = " << face::compare(g, h) - << endl; + printCompare(g, h); g[0] = 2; h[3] = 2; - Info<< "Compare " << g << " and " << h << " Match = " << face::compare(g, h) - << endl; + printCompare(g, h); g[4] = 3; h[4] = 3; - Info<< "Compare " << g << " and " << h << " Match = " << face::compare(g, h) - << endl; + printCompare(g, h); face face1(identity(1)); - Info<< "Compare " << face1 << " and " << face1 - << " Match = " << face::compare(face1, face1) << endl; + printCompare(face1, face1); - face face2(identity(1)+1); - Info<< "Compare " << face1 << " and " << face2 - << " Match = " << face::compare(face1, face2) << endl; + face face2(identity(1, 2)); + printCompare(face1, face2); Info<< nl << nl << "Zero face" << nl << endl; diff --git a/applications/test/PatchTools/Test-PatchTools.C b/applications/test/PatchTools/Test-PatchTools.C index 0af402b57e..5d4217c0e2 100644 --- a/applications/test/PatchTools/Test-PatchTools.C +++ b/applications/test/PatchTools/Test-PatchTools.C @@ -261,7 +261,7 @@ int main(int argc, char *argv[]) // ( // mesh, // pp, -// identity(pp.size())+pp.start() +// identity(pp.size(), pp.start()) // ) // ); // forAll(pn, pointi) @@ -278,7 +278,7 @@ int main(int argc, char *argv[]) // ( // mesh, // pp, -// identity(pp.size())+pp.start() +// identity(pp.size(), pp.start()) // ) // ); // forAll(pn, pointi) diff --git a/applications/utilities/surface/surfaceAdd/surfaceAdd.C b/applications/utilities/surface/surfaceAdd/surfaceAdd.C index 7bdde7d133..f3bd2b956c 100644 --- a/applications/utilities/surface/surfaceAdd/surfaceAdd.C +++ b/applications/utilities/surface/surfaceAdd/surfaceAdd.C @@ -247,7 +247,7 @@ int main(int argc, char *argv[]) << " by this amount" << nl << endl; patch1Map = identity(surface1.patches().size()); - patch2Map = identity(surface2.patches().size()) + patch1Map.size(); + patch2Map = identity(surface2.patches().size(), patch1Map.size()); nNewPatches = surface1.patches().size()+surface2.patches().size(); } diff --git a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C index 7630d0dc5d..00ef02bab7 100644 --- a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C +++ b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C @@ -165,10 +165,10 @@ void createBoundaryEdgeTrees // Boundary edges treeBoundaryEdges[surfI] = - labelList + identity ( - identity(surf.nEdges() - surf.nInternalEdges()) - + surf.nInternalEdges() + surf.nEdges() - surf.nInternalEdges(), + surf.nInternalEdges() ); Random rndGen(17301893); diff --git a/src/OpenFOAM/containers/Lists/Distribution/Distribution.C b/src/OpenFOAM/containers/Lists/Distribution/Distribution.C index 992ffd287a..8a7ae778c3 100644 --- a/src/OpenFOAM/containers/Lists/Distribution/Distribution.C +++ b/src/OpenFOAM/containers/Lists/Distribution/Distribution.C @@ -84,14 +84,7 @@ Foam::scalar Foam::Distribution::totalWeight(direction cmpt) const template Foam::List Foam::Distribution::keys(direction cmpt) const { - List