diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C index 93046b330794c8c8ed6b984ee4699029b4c965f3..58b4011418b73d86e6796dfb8ebee26194eb3998 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C @@ -32,24 +32,11 @@ Description #include "Map.H" #include "faceList.H" #include "labelList.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -Foam::labelList Foam::cellMatcher::makeIdentity(const label nElems) -{ - labelList result(nElems); - - forAll(result, elemI) - { - result[elemI] = elemI; - } - return result; -} +#include "ListOps.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::cellMatcher::cellMatcher ( const label vertPerCell, @@ -177,7 +164,7 @@ void Foam::cellMatcher::calcEdgeAddressing(const label numVert) { label start = f[prevVertI]; label end = f[fp]; - + label key1 = edgeKey(numVert, start, end); label key2 = edgeKey(numVert, end, start); diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H index b2f02e37beb6df4a60b8faa7e5ca38237e702633..4f95e5e43cae1228b3f108d5fc995f10506b0cfc 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H @@ -185,12 +185,6 @@ private: public: - // Static functions - - //- Create list with incrementing labels - static labelList makeIdentity(const label nElems); - - // Constructors //- Construct given mesh and shape factors diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C index f57aed27b307fe255b4bac8807a6429468d7d450..240c8af157f68f99e76851397e51c424361b1a15 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C @@ -25,6 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "degenerateMatcher.H" +#include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -83,11 +84,10 @@ Foam::cellShape Foam::degenerateMatcher::match(const faceList& faces) return match ( - faces, - labelList(faces.size(), 0), // Cell 0 is owner of all faces - 0, // cell 0 - labelList(cellMatcher::makeIdentity(faces.size())) // cell 0 consists - // of all faces + faces, + labelList(faces.size(), 0), // cell 0 is owner of all faces + 0, // cell 0 + identity(faces.size()) // cell 0 consists of all faces ); } @@ -106,7 +106,7 @@ Foam::cellShape Foam::degenerateMatcher::match { return match ( - mesh.faces(), + mesh.faces(), mesh.faceOwner(), cellI, mesh.cells()[cellI] diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C index aa4b8ab357579858366e40831cd164cccf25e694..09f5c69d000d24bb08f252fd74e78affecc6fcf3 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C @@ -26,6 +26,7 @@ License #include "hexMatcher.H" #include "primitiveMesh.H" +#include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -36,7 +37,6 @@ const Foam::label Foam::hexMatcher::maxVertPerFace = 4; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct null Foam::hexMatcher::hexMatcher() : cellMatcher @@ -97,7 +97,7 @@ bool Foam::hexMatcher::matchShape faceLabels_.setSize(facePerCell); // - // Try bottom face (face 4). + // Try bottom face (face 4). // Only need to try one orientation of this face since hex is // rotation symmetric // @@ -298,7 +298,7 @@ bool Foam::hexMatcher::isA(const faceList& faces) faces, // all faces in mesh labelList(faces.size(), 0), // cell 0 is owner of all faces 0, // cell label - makeIdentity(faces.size()) // faces of cell 0 + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C index 32b99fc7bfee8a89da3512960a1427f38dfc3856..d3b235cab03adee8703fb271da65c0b74acc177a 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C @@ -26,6 +26,7 @@ License #include "prismMatcher.H" #include "primitiveMesh.H" +#include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -363,7 +364,7 @@ bool Foam::prismMatcher::isA(const faceList& faces) faces, // all faces in mesh labelList(faces.size(), 0), // cell 0 is owner of all faces 0, // cell label - makeIdentity(faces.size()) // faces of cell 0 + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C index dd8718a30cbc4c034edb1a5dbde854fed1d30fce..a48b7458cc69d5d8c71b2507f48b4e222abaec3f 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C @@ -29,6 +29,7 @@ License #include "primitiveMesh.H" #include "primitiveMesh.H" #include "cellModeller.H" +#include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -286,7 +287,7 @@ bool Foam::pyrMatcher::isA(const faceList& faces) faces, // all faces in mesh labelList(faces.size(), 0), // cell 0 is owner of all faces 0, // cell label - makeIdentity(faces.size()) // faces of cell 0 + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C index 911a01db2588aabaf2de68d1309aa0d962152c89..cae492efa3e85c86efc13596afb5ef0ed909200e 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C @@ -29,6 +29,7 @@ License #include "primitiveMesh.H" #include "primitiveMesh.H" #include "cellModeller.H" +#include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -39,7 +40,6 @@ const Foam::label Foam::tetMatcher::maxVertPerFace = 3; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct null Foam::tetMatcher::tetMatcher() : cellMatcher @@ -238,7 +238,7 @@ bool Foam::tetMatcher::isA(const faceList& faces) faces, // all faces in mesh labelList(faces.size(), 0), // cell 0 is owner of all faces 0, // cell label - makeIdentity(faces.size()) // faces of cell 0 + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C index af815d5873636a49a1b20202c602e361efc22a82..804f9ee4d471257bb60d9e0aa792c41812d7484e 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C @@ -29,6 +29,7 @@ License #include "primitiveMesh.H" #include "primitiveMesh.H" #include "cellModeller.H" +#include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -291,7 +292,7 @@ bool Foam::tetWedgeMatcher::isA(const faceList& faces) faces, // all faces in mesh labelList(faces.size(), 0), // cell 0 is owner of all faces 0, // cell label - makeIdentity(faces.size()) // faces of cell 0 + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C index 97512ad427ebfe72cec5174558e1e72ec067e0e0..ee29cae32883f42866934c98a940b42dcdb2de8b 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C @@ -26,7 +26,7 @@ License #include "wedgeMatcher.H" #include "primitiveMesh.H" - +#include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -391,7 +391,7 @@ bool Foam::wedgeMatcher::isA(const faceList& faces) faces, // all faces in mesh labelList(faces.size(), 0), // cell 0 is owner of all faces 0, // cell label - makeIdentity(faces.size()) // faces of cell 0 + identity(faces.size()) // faces of cell 0 ); }