diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C index 93046b3307..58b4011418 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 b2f02e37be..4f95e5e43c 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 f57aed27b3..240c8af157 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 aa4b8ab357..09f5c69d00 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 32b99fc7bf..d3b235cab0 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 dd8718a30c..a48b7458cc 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 911a01db25..cae492efa3 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 af815d5873..804f9ee4d4 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 97512ad427..ee29cae328 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 ); }