Commit 99b293ff authored by Mark Olesen's avatar Mark Olesen
Browse files

cellMatcher - can use ListOps for identity instead of its own method

parent 00985638
......@@ -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);
......
......@@ -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
......
......@@ -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]
......
......@@ -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
);
}
......
......@@ -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
);
}
......
......@@ -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
);
}
......
......@@ -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
);
}
......
......@@ -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
);
}
......
......@@ -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
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment