Commit 76ed6de6 authored by franjo_j@hotmail.com's avatar franjo_j@hotmail.com
Browse files

Renamed labelListPMG and edgeListPMG to labelLongList and edgeLongList


git-svn-id: https://pl5.projectlocker.com/igui/meshGeneration/svn@48 fdcce57e-7e00-11e2-b579-49867b4cea03
parent ade44e7e
......@@ -46,6 +46,9 @@ int main(int argc, char *argv[])
# include "setRootCase.H"
# include "createTime.H"
//- 2d cartesian mesher cannot be run in parallel
argList::noParallel();
cartesian2DMeshGenerator omg(runTime);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s\n"
......
......@@ -85,14 +85,14 @@ void cartesianMeshExtractor::createPolyMesh()
label nFaces(0);
const VRWGraph& octreeFaces = octreeCheck_.octreeFaces();
const labelListPMG& owner = octreeCheck_.octreeFaceOwner();
const labelListPMG& neighbour = octreeCheck_.octreeFaceNeighbour();
const labelLongList& owner = octreeCheck_.octreeFaceOwner();
const labelLongList& neighbour = octreeCheck_.octreeFaceNeighbour();
//- map storing box label and a direction for each processor face
//- The map stores data in the same order on both sides of processor
//- boundaries. This is a consequence of Morton ordering of
//- leaf boxes in the octree.
std::map<label, labelListPMG> procFaces;
std::map<label, labelLongList> procFaces;
forAll(octreeFaces, faceI)
{
......@@ -156,7 +156,7 @@ void cartesianMeshExtractor::createPolyMesh()
label nProcBoundaries(nFaces), patchI(0);
//- allocate memory for processor patches
std::map<label, labelListPMG>::const_iterator iter;
std::map<label, labelLongList>::const_iterator iter;
for(iter=procFaces.begin();iter!=procFaces.end();++iter)
{
const label procI = iter->first;
......@@ -188,7 +188,7 @@ void cartesianMeshExtractor::createPolyMesh()
{
procBoundaries[patchI].patchStart() = nProcBoundaries;
const labelListPMG& patchFaces = iter->second;
const labelLongList& patchFaces = iter->second;
forAll(patchFaces, pfI)
{
......@@ -375,8 +375,8 @@ void cartesianMeshExtractor::createPolyMesh()
patchNames[2] = "unusedFacesTop";
VRWGraph boundaryFaces;
labelListPMG newFaceOwner;
labelListPMG newFacePatch;
labelLongList newFaceOwner;
labelLongList newFacePatch;
forAll(fNormals, bfI)
{
......
......@@ -66,7 +66,7 @@ class dualMeshExtractor
polyMeshGen& mesh_;
//- centre node labels
labelListPMG* centreNodeLabelPtr_;
labelLongList* centreNodeLabelPtr_;
// Private member functions
//- delete freestore data
......
......@@ -30,7 +30,7 @@ Description
#include "demandDrivenData.H"
#include "meshOctree.H"
#include "polyMeshGenModifierAddCellByCell.H"
#include "labelListPMG.H"
#include "labelLongList.H"
//#define DEBUGDual
......@@ -47,8 +47,8 @@ void dualMeshExtractor::createPoints()
const List<direction>& boxType = octreeAddressing_.boxType();
const meshOctree& octree = octreeAddressing_.octree();
centreNodeLabelPtr_ = new labelListPMG(boxType.size(), -1);
labelListPMG& centreNode = *centreNodeLabelPtr_;
centreNodeLabelPtr_ = new labelLongList(boxType.size(), -1);
labelLongList& centreNode = *centreNodeLabelPtr_;
const boundBox& rootBox = octree.rootBox();
label nPoints(0);
......@@ -74,7 +74,7 @@ void dualMeshExtractor::createPolyMesh()
Info << "Creating polyMesh from octree" << endl;
const meshOctree& octree = octreeAddressing_.octree();
const labelListPMG& centreNode = *centreNodeLabelPtr_;
const labelLongList& centreNode = *centreNodeLabelPtr_;
const FRWGraph<label, 8>& nodeLeaves = octreeAddressing_.nodeLeaves();
polyMeshGenModifierAddCellByCell meshModifier(mesh_);
......
......@@ -38,7 +38,7 @@ SourceFiles
#define dualUnfoldConcaveCells_H
#include "polyMeshGenModifier.H"
#include "labelListPMG.H"
#include "labelLongList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -69,8 +69,8 @@ class dualUnfoldConcaveCells
//- new boundary faces and owner cells
VRWGraph newBoundaryFaces_;
labelListPMG newBoundaryOwners_;
labelListPMG newBoundaryPatches_;
labelLongList newBoundaryOwners_;
labelLongList newBoundaryPatches_;
// Private member functions
//- find edges to remove
......
......@@ -62,7 +62,7 @@ void dualUnfoldConcaveCells::createNeighbouringBoundaryFaces
//- this here assumes that the original cell before edge extraction
//- has only one boundary face!! This is the case if surface preparation
//- is applied before edge extraction
labelListPMG newPatchForCell(mesh_.cells().size(), -1);
labelLongList newPatchForCell(mesh_.cells().size(), -1);
forAll(newBoundaryFaces_, faceI)
{
if( newPatchForCell[newBoundaryOwners_[faceI]] == -1 )
......@@ -83,7 +83,7 @@ void dualUnfoldConcaveCells::createNeighbouringBoundaryFaces
}
//- create a list of possible candidates to store
labelListPMG front;
labelLongList front;
forAll(bPoints, bpI)
if( typeOfVertex_[bPoints[bpI]] & REMOVE )
{
......@@ -100,7 +100,7 @@ void dualUnfoldConcaveCells::createNeighbouringBoundaryFaces
while( front.size() != 0 )
{
labelListPMG newFront;
labelLongList newFront;
forAll(front, fpI)
{
......
......@@ -61,7 +61,7 @@ class hexMeshExtractor
polyMeshGen& mesh_;
//- centre node labels
labelListPMG* centreNodeLabelPtr_;
labelLongList* centreNodeLabelPtr_;
//- subvertices generated inside octree leaves
VRWGraph* subVerticesPtr_;
......@@ -103,7 +103,7 @@ class hexMeshExtractor
const meshOctree& octree_;
//- centre node labels
const labelListPMG& centreNodeLabel_;
const labelLongList& centreNodeLabel_;
//- subvertices generated inside octree leaves
const VRWGraph& subVertices_;
......@@ -150,7 +150,7 @@ class hexMeshExtractor
(
polyMeshGen& mesh,
const meshOctree& octree,
const labelListPMG& centreNodeLabel,
const labelLongList& centreNodeLabel,
const VRWGraph& subVertices,
const List<direction>& octreeVertexType,
const VRWGraph& nodeLabels,
......
......@@ -30,7 +30,7 @@ Description
#include "demandDrivenData.H"
#include "meshOctree.H"
#include "polyMeshGenModifierAddCellByCell.H"
#include "labelListPMG.H"
#include "labelLongList.H"
//#define DEBUGHex
......@@ -224,7 +224,7 @@ void hexMeshExtractor::classifyOctreePoints()
const pointField& octreePoints = octreeAddressing_.octreePoints();
const VRWGraph& octreeFaces = octreeAddressing_.octreeFaces();
const VRWGraph& boxFaces = octreeAddressing_.leafFaces();
const labelListPMG& neighbour = octreeAddressing_.octreeFaceNeighbour();
const labelLongList& neighbour = octreeAddressing_.octreeFaceNeighbour();
pointFieldPMG& points = polyMeshGenModifier(pmg).pointsAccess();
points.setSize(octreePoints.size());
......@@ -304,8 +304,8 @@ void hexMeshExtractor::createPoints()
const meshOctree& octree = octreeAddressing_.octree();
const VRWGraph& nodeLabels = octreeAddressing_.nodeLabels();
const FRWGraph<label, 8>& nodeLeaves = octreeAddressing_.nodeLeaves();
centreNodeLabelPtr_ = new labelListPMG(boxType.size(), -1);
labelListPMG& centreNode = *centreNodeLabelPtr_;
centreNodeLabelPtr_ = new labelLongList(boxType.size(), -1);
labelLongList& centreNode = *centreNodeLabelPtr_;
subVerticesPtr_ = new VRWGraph(boxType.size());
VRWGraph& subVertices = *subVerticesPtr_;
......@@ -552,7 +552,7 @@ hexMeshExtractor::createHexCells::createHexCells
(
polyMeshGen& mesh,
const meshOctree& octree,
const labelListPMG& centreNodeLabel,
const labelLongList& centreNodeLabel,
const VRWGraph& subVertices,
const List<direction>& octreeVertexType,
const VRWGraph& nodeLabels,
......
......@@ -170,7 +170,7 @@ void tetMeshExtractorOctree::createPolyMesh()
//- remove duplicate faces
label nFaces(0);
labelListPMG newFaceLabel(faces.size(), -1);
labelLongList newFaceLabel(faces.size(), -1);
forAll(faces, faceI)
{
......
......@@ -88,8 +88,8 @@ void boundaryLayers::createLayerCells(const labelList& patchLabels)
//- create lists for new boundary faces
VRWGraph newBoundaryFaces;
labelListPMG newBoundaryOwners;
labelListPMG newBoundaryPatches;
labelLongList newBoundaryOwners;
labelLongList newBoundaryPatches;
//- create storage for new cells
VRWGraphList cellsToAdd;
......@@ -345,7 +345,7 @@ void boundaryLayers::createLayerCells(const labelList& patchLabels)
const labelList& globalPointLabel = mse.globalBoundaryPointLabel();
const Map<label>& globalToLocal = mse.globalToLocalBndPointAddressing();
std::map<label, labelListPMG> facesToSend;
std::map<label, labelLongList> facesToSend;
std::map<label, DynList<face, 8> > parPointFaces;
std::map<label, DynList<label, 3> > parPointPatches;
for
......@@ -373,7 +373,7 @@ void boundaryLayers::createLayerCells(const labelList& patchLabels)
const label prI = pProcs(bpI, i);
if( facesToSend.find(prI) == facesToSend.end() )
facesToSend.insert(std::make_pair(prI, labelListPMG()));
facesToSend.insert(std::make_pair(prI, labelLongList()));
if( prI < pMin )
pMin = prI;
......@@ -399,7 +399,7 @@ void boundaryLayers::createLayerCells(const labelList& patchLabels)
continue;
}
labelListPMG& stp = facesToSend[pMin];
labelLongList& stp = facesToSend[pMin];
//- send the data to the processor with the lowest label
//- data is flatenned as follows
......@@ -422,7 +422,7 @@ void boundaryLayers::createLayerCells(const labelList& patchLabels)
}
//- exchange data with other processors
labelListPMG receivedData;
labelLongList receivedData;
help::exchangeMap(facesToSend, receivedData);
label counter(0);
......@@ -789,7 +789,7 @@ void boundaryLayers::createNewFacesFromPointsParallel
//- store processor faces
VRWGraph newProcFaces;
labelListPMG newProc;
labelLongList newProc;
forAll(pointOfOrigin, i)
{
......
......@@ -125,7 +125,7 @@ void boundaryLayers::findPatchesToBeTreatedTogether()
const labelHashSet& invertedVertices = vertexCheck.invertedVertices();
std::map<std::pair<label, label>, Pair<label> > edgeClassification;
labelListPMG procEdges;
labelLongList procEdges;
forAll(eFaces, eI)
{
if( eFaces.sizeOfRow(eI) != 2 )
......@@ -335,7 +335,7 @@ void boundaryLayers::findPatchesToBeTreatedTogether()
if( Pstream::parRun() )
{
//- make sure that all processors have the same graph
labelListPMG flattenedPatches;
labelLongList flattenedPatches;
forAll(treatPatchesWithPatch_, patchI)
{
if( treatPatchesWithPatch_[patchI].size() <= 1 )
......
......@@ -39,7 +39,7 @@ SourceFiles
#include "polyMeshGenModifier.H"
#include "meshSurfaceEngine.H"
#include "DynList.H"
#include "labelListPMG.H"
#include "labelLongList.H"
#include "Map.H"
#include "labelPair.H"
......@@ -83,7 +83,7 @@ class boundaryLayers
List<DynList<label> > treatPatchesWithPatch_;
//- label of a new node (helper)
labelListPMG newLabelForVertex_;
labelLongList newLabelForVertex_;
//- map storing labels of new vertices created at node
//- and corner vertices
......@@ -141,7 +141,7 @@ class boundaryLayers
//- creates new vertices for vertices at parallel boundaries
void createNewPartitionVerticesParallel
(
const labelListPMG& procPoints,
const labelLongList& procPoints,
const List<direction>& pVertices,
const boolList& treatPatches
);
......@@ -150,7 +150,7 @@ class boundaryLayers
//- which are also at the border of the treated partitions
void createNewEdgeVerticesParallel
(
const labelListPMG& procPoints,
const labelLongList& procPoints,
const List<direction>& pVertices,
const boolList& treatPatches
);
......
......@@ -95,8 +95,8 @@ void boundaryLayers::checkTopologyOfBoundaryFaces(const labelList& patchLabels)
const Map<label>& otherProcPatch = mse.otherEdgeFacePatch();
VRWGraph newBoundaryFaces;
labelListPMG newBoundaryOwners;
labelListPMG newBoundaryPatches;
labelLongList newBoundaryOwners;
labelLongList newBoundaryPatches;
forAll(bFaces, bfI)
{
......
......@@ -334,7 +334,7 @@ void boundaryLayers::createNewVertices(const boolList& treatPatches)
points.setSize(points.size() + nExtrudedVertices);
labelListPMG procPoints;
labelLongList procPoints;
forAll(bPoints, bpI)
if( patchVertex[bpI] )
{
......@@ -447,7 +447,7 @@ void boundaryLayers::createNewVertices(const labelList& patchLabels)
findPatchVertices(treatPatches, patchVertex);
//- go throught the vertices and create the new ones
labelListPMG procPoints;
labelLongList procPoints;
# ifdef USE_OMP
# pragma omp parallel for if( nBndPts > 100 ) \
schedule(dynamic, Foam::max(10, nBndPts/(2*omp_get_num_threads())))
......@@ -614,7 +614,7 @@ void boundaryLayers::createNewVertices(const labelList& patchLabels)
FatalErrorIn
(
"void boundaryLayers::createNewVertices("
"const labelList& patchLabels, labelListPMG& newLabelForVertex,"
"const labelList& patchLabels, labelLongList& newLabelForVertex,"
"std::map<label, std::map<std::pair<label, label>, label> >&)"
) << "Boundary node " << bpI << " is not at an edge!"
<< abort(FatalError);
......@@ -641,7 +641,7 @@ void boundaryLayers::createNewVertices(const labelList& patchLabels)
void boundaryLayers::createNewPartitionVerticesParallel
(
const labelListPMG& procPoints,
const labelLongList& procPoints,
const List<direction>& pVertices,
const boolList& treatPatches
)
......@@ -740,7 +740,7 @@ void boundaryLayers::createNewPartitionVerticesParallel
void boundaryLayers::createNewEdgeVerticesParallel
(
const labelListPMG& procPoints,
const labelLongList& procPoints,
const List<direction>& pVertices,
const boolList& treatPatches
)
......@@ -760,7 +760,7 @@ void boundaryLayers::createNewEdgeVerticesParallel
const Map<label>& globalToLocal = mse.globalToLocalBndPointAddressing();
DynList<label> neiProcs(10);
labelListPMG edgePoints;
labelLongList edgePoints;
Map<label> bpToEdgePoint;
forAll(procPoints, pointI)
{
......@@ -868,7 +868,7 @@ void boundaryLayers::createNewEdgeVerticesParallel
FatalErrorIn
(
"void boundaryLayers::createNewEdgeVerticesParallel("
"const labelListPMG& procPoints,"
"const labelLongList& procPoints,"
"const List<direction>& pVertices,"
"const boolList& treatPatches,"
"labelList& newLabelForVertex"
......@@ -999,7 +999,7 @@ void boundaryLayers::createNewEdgeVerticesParallel
(
"void boundaryLayers::createNewEdgeVerticesParallel"
"("
"const labelListPMG& procPoints,"
"const labelLongList& procPoints,"
"const List<direction>& pVertices,"
"const boolList& treatPatches,"
"labelList& newLabelForVertex"
......
......@@ -68,8 +68,8 @@ void boundaryLayers::createNewFacesAndCells(const boolList& treatPatches)
//- create lists for new boundary faces
VRWGraph newBoundaryFaces;
labelListPMG newBoundaryOwners;
labelListPMG newBoundaryPatches;
labelLongList newBoundaryOwners;
labelLongList newBoundaryPatches;
//- create storage for new cells
VRWGraphList cellsToAdd;
......@@ -260,7 +260,7 @@ void boundaryLayers::createNewFacesParallel
//- create new processor faces
VRWGraph newProcFaces;
labelListPMG faceProcPatch;
labelLongList faceProcPatch;
FixedList<label, 4> newF;
forAll(treatedEdgeLabels, geI)
{
......
......@@ -49,7 +49,7 @@ void boundaryLayers::addWrapperLayer()
boolList treatPatches(mesh_.boundaries().size(), true);
labelListPMG newLabelForVertex(nPoints_, -1);
labelLongList newLabelForVertex(nPoints_, -1);
pointFieldPMG& points = mesh_.points();
points.setSize(points.size() + bPoints.size());
......
......@@ -239,9 +239,9 @@ void extrudeLayer::createNewVertices()
const DynList<label>& pProcs = addr.pointNeiProcs();
//- allocate the map
std::map<label, labelListPMG> exchangeData;
std::map<label, labelLongList> exchangeData;
forAll(pProcs, i)
exchangeData.insert(std::make_pair(pProcs[i], labelListPMG()));
exchangeData.insert(std::make_pair(pProcs[i], labelLongList()));
//- collect the information about markes points at processor boundaries
forAllConstIter(Map<label>, globalToLocal, it)
......@@ -299,10 +299,10 @@ void extrudeLayer::createNewVertices()
mesh_.procBoundaries();
const polyMeshGenAddressing& addr = mesh_.addressingData();
const VRWGraph& pAtProcs = addr.pointAtProcs();
const labelListPMG& globalPointLabel = addr.globalPointLabel();
const labelLongList& globalPointLabel = addr.globalPointLabel();
const Map<label>& globalToLocal = addr.globalToLocalPointAddressing();
const DynList<label>& pProcs = addr.pointNeiProcs();
const labelListPMG& globalCellLabel = addr.globalCellLabel();
const labelLongList& globalCellLabel = addr.globalCellLabel();
//- create the information which faces are attached to points
//- at parallel boundaries in dual form where each edge represents
......@@ -423,9 +423,9 @@ void extrudeLayer::createNewVertices()
returnReduce(1, sumOp<label>());
Pout << "Exchanging data with other processors" << endl;
std::map<label, labelListPMG> exchangeData;
std::map<label, labelLongList> exchangeData;
forAll(pProcs, i)
exchangeData.insert(std::make_pair(pProcs[i], labelListPMG()));
exchangeData.insert(std::make_pair(pProcs[i], labelLongList()));
//- fill in the exchangeData map
forAllConstIter(dualEdgesMap, procPointsDual, dIter)
......@@ -439,7 +439,7 @@ void extrudeLayer::createNewVertices()
if( neiProc == Pstream::myProcNo() )
continue;
labelListPMG& dts = exchangeData[neiProc];
labelLongList& dts = exchangeData[neiProc];
dts.append(globalPointLabel[pointI]);
......@@ -455,7 +455,7 @@ void extrudeLayer::createNewVertices()
}
//- exchange data with other processors
labelListPMG receivedData;
labelLongList receivedData;
help::exchangeMap(exchangeData, receivedData);
//- update local data
......@@ -925,7 +925,7 @@ void extrudeLayer::createNewFacesParallel()
return;
VRWGraph newProcFaces;
labelListPMG faceProcPatch;
labelLongList faceProcPatch;
//- add faces into the mesh
polyMeshGenModifier(mesh_).addProcessorFaces(newProcFaces, faceProcPatch);
......@@ -1226,8 +1226,8 @@ void extrudeLayer::updateBoundary()
patchNames[patchI] = mesh_.boundaries()[patchI].patchName();
VRWGraph newBoundaryFaces;
labelListPMG newBoundaryOwners;
labelListPMG newBoundaryPatches;
labelLongList newBoundaryOwners;
labelLongList newBoundaryPatches;
meshSurfaceEngine mse(mesh_);
const faceList::subList& bFaces = mse.boundaryFaces();
......
......@@ -77,7 +77,7 @@ class extrudeLayer
LongList<bool> pairOrientation_;
//- original point label
labelListPMG origPointLabel_;
labelLongList origPointLabel_;
// Private member functions
//- duplicate faces which will be extruded
......
......@@ -40,7 +40,7 @@ SourceFiles
#include "polyMeshGenModifier.H"
#include "meshSurfaceEngine.H"
#include "DynList.H"
#include "labelListPMG.H"
#include "labelLongList.H"
#include "labelPair.H"
#include <map>
......
......@@ -713,7 +713,7 @@ void refineBoundaryLayers::refineCornerHexCell::determineFacesInDirections()
# endif
//- find the position of the common point in each boundary face
const edgeListPMG& splitEdges = bndLayers_.splitEdges_;
const edgeLongList& splitEdges = bndLayers_.splitEdges_;
const VRWGraph& splitEdgesAtPoint = bndLayers_.splitEdgesAtPoint_;
const face& baseFace = faces[c[dirFace[0]]];
......@@ -934,7 +934,7 @@ void refineBoundaryLayers::refineCornerHexCell::generateNewPoints()
}
//- useful data for generating missing points
const edgeListPMG& splitEdges = bndLayers_.splitEdges_;
const edgeLongList& splitEdges = bndLayers_.splitEdges_;
const edge& seDirI = splitEdges[splitEdgeInDirection_[0]];
const edge& seDirJ = splitEdges[splitEdgeInDirection_[1]];
const edge& seDirK = splitEdges[splitEdgeInDirection_[2]];
......@@ -1643,7 +1643,7 @@ void refineBoundaryLayers::generateNewCells()
# endif
//- store internal faces originating from existing faces
labelListPMG newFaceLabel(newFaces_.size());
labelLongList newFaceLabel(newFaces_.size());
faces.setSize(newFaces_.size());
label currFace = 0;
......
......@@ -950,7 +950,7 @@ void refineBoundaryLayers::generateNewFaces()
std::map<label, DynList<labelPair, 2> > localSplits;
forAll(procBoundaries, patchI)
{
labelListPMG sendData;
labelLongList sendData;
const label start = procBoundaries[patchI].patchStart();
const label size = procBoundaries[patchI].patchSize();
......