1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "ensightMesh.H"
30 #include "globalMeshData.H"
31 #include "PstreamCombineReduceOps.H"
32 #include "processorPolyPatch.H"
33 #include "cellModeller.H"
36 #include "globalIndex.H"
37 #include "mapDistribute.H"
38 #include "stringListOps.H"
40 #include "ensightBinaryStream.H"
41 #include "ensightAsciiStream.H"
45 // * * * * * * * * * * * * * Private Functions * * * * * * * * * * * * * * //
47 void Foam::ensightMesh::correct()
50 meshCellSets_ = mesh_.nCells();
51 boundaryFaceSets_.setSize(mesh_.boundary().size());
52 allPatchNames_.clear();
55 faceZoneFaceSets_.setSize(mesh_.faceZones().size());
56 faceZoneNames_.clear();
58 boundaryFaceToBeIncluded_.clear();
60 const cellShapeList& cellShapes = mesh_.cellShapes();
62 const cellModel& tet = *(cellModeller::lookup("tet"));
63 const cellModel& pyr = *(cellModeller::lookup("pyr"));
64 const cellModel& prism = *(cellModeller::lookup("prism"));
65 const cellModel& wedge = *(cellModeller::lookup("wedge"));
66 const cellModel& hex = *(cellModeller::lookup("hex"));
70 // Patches are output. Check that they're synced.
71 mesh_.boundaryMesh().checkParallelSync(true);
73 allPatchNames_ = mesh_.boundaryMesh().names();
74 if (Pstream::parRun())
76 allPatchNames_.setSize
78 mesh_.boundary().size()
79 - mesh_.globalData().processorPatches().size()
85 if (patchPatterns_.empty())
87 forAll(allPatchNames_, nameI)
89 patchNames_.insert(allPatchNames_[nameI]);
94 // Find patch names which match that requested at command-line
95 forAll(allPatchNames_, nameI)
97 const word& patchName = allPatchNames_[nameI];
98 if (findStrings(patchPatterns_, patchName))
100 patchNames_.insert(patchName);
107 if (patchNames_.size())
110 patchPartOffset_ = 1;
115 labelList& tets = meshCellSets_.tets;
116 labelList& pyrs = meshCellSets_.pyrs;
117 labelList& prisms = meshCellSets_.prisms;
118 labelList& wedges = meshCellSets_.wedges;
119 labelList& hexes = meshCellSets_.hexes;
120 labelList& polys = meshCellSets_.polys;
129 forAll(cellShapes, cellI)
131 const cellShape& cellShape = cellShapes[cellI];
132 const cellModel& cellModel = cellShape.model();
134 if (cellModel == tet)
136 tets[nTets++] = cellI;
138 else if (cellModel == pyr)
140 pyrs[nPyrs++] = cellI;
142 else if (cellModel == prism)
144 prisms[nPrisms++] = cellI;
146 else if (cellModel == wedge)
148 wedges[nWedges++] = cellI;
150 else if (cellModel == hex)
152 hexes[nHexes++] = cellI;
156 polys[nPolys++] = cellI;
162 prisms.setSize(nPrisms);
163 wedges.setSize(nWedges);
164 hexes.setSize(nHexes);
165 polys.setSize(nPolys);
167 meshCellSets_.nTets = nTets;
168 reduce(meshCellSets_.nTets, sumOp<label>());
170 meshCellSets_.nPyrs = nPyrs;
171 reduce(meshCellSets_.nPyrs, sumOp<label>());
173 meshCellSets_.nPrisms = nPrisms;
174 reduce(meshCellSets_.nPrisms, sumOp<label>());
176 meshCellSets_.nHexesWedges = nWedges+nHexes;
177 reduce(meshCellSets_.nHexesWedges, sumOp<label>());
179 meshCellSets_.nPolys = nPolys;
180 reduce(meshCellSets_.nPolys, sumOp<label>());
183 // Determine parallel shared points
184 globalPointsPtr_ = mesh_.globalData().mergePoints
193 forAll(mesh_.boundary(), patchi)
195 if (mesh_.boundary()[patchi].size())
197 const polyPatch& p = mesh_.boundaryMesh()[patchi];
199 labelList& tris = boundaryFaceSets_[patchi].tris;
200 labelList& quads = boundaryFaceSets_[patchi].quads;
201 labelList& polys = boundaryFaceSets_[patchi].polys;
203 tris.setSize(p.size());
204 quads.setSize(p.size());
205 polys.setSize(p.size());
213 const face& f = p[faceI];
217 tris[nTris++] = faceI;
219 else if (f.size() == 4)
221 quads[nQuads++] = faceI;
225 polys[nPolys++] = faceI;
230 quads.setSize(nQuads);
231 polys.setSize(nPolys);
236 forAll(allPatchNames_, patchi)
238 const word& patchName = allPatchNames_[patchi];
241 if (patchNames_.empty() || patchNames_.found(patchName))
243 if (mesh_.boundary()[patchi].size())
245 nfp.nTris = boundaryFaceSets_[patchi].tris.size();
246 nfp.nQuads = boundaryFaceSets_[patchi].quads.size();
247 nfp.nPolys = boundaryFaceSets_[patchi].polys.size();
251 reduce(nfp.nTris, sumOp<label>());
252 reduce(nfp.nQuads, sumOp<label>());
253 reduce(nfp.nPolys, sumOp<label>());
255 nPatchPrims_.insert(patchName, nfp);
261 const wordList faceZoneNamesAll = mesh_.faceZones().names();
263 // Find faceZone names which match that requested at command-line
264 forAll(faceZoneNamesAll, nameI)
266 const word& zoneName = faceZoneNamesAll[nameI];
267 if (findStrings(faceZonePatterns_, zoneName))
269 faceZoneNames_.insert(zoneName);
273 // Build list of boundary faces to be exported
274 boundaryFaceToBeIncluded_.setSize
277 - mesh_.nInternalFaces(),
281 forAll(mesh_.boundaryMesh(), patchI)
283 const polyPatch& pp = mesh_.boundaryMesh()[patchI];
286 isA<processorPolyPatch>(pp)
287 && !refCast<const processorPolyPatch>(pp).owner()
290 label bFaceI = pp.start()-mesh_.nInternalFaces();
293 boundaryFaceToBeIncluded_[bFaceI++] = 0;
298 // Count face types in each faceZone
299 forAll(faceZoneNamesAll, zoneI)
301 //const word& zoneName = faceZoneNamesAll[zoneI];
303 const faceZone& fz = mesh_.faceZones()[zoneI];
307 labelList& tris = faceZoneFaceSets_[zoneI].tris;
308 labelList& quads = faceZoneFaceSets_[zoneI].quads;
309 labelList& polys = faceZoneFaceSets_[zoneI].polys;
311 tris.setSize(fz.size());
312 quads.setSize(fz.size());
313 polys.setSize(fz.size());
319 label faceCounter = 0;
325 // Avoid counting faces on processor boundaries twice
326 if (faceToBeIncluded(faceI))
328 const face& f = mesh_.faces()[faceI];
332 tris[nTris++] = faceCounter;
334 else if (f.size() == 4)
336 quads[nQuads++] = faceCounter;
340 polys[nPolys++] = faceCounter;
348 quads.setSize(nQuads);
349 polys.setSize(nPolys);
353 forAll(faceZoneNamesAll, zoneI)
355 const word& zoneName = faceZoneNamesAll[zoneI];
358 if (faceZoneNames_.found(zoneName))
362 faceZoneFaceSets_[zoneI].tris.size()
363 || faceZoneFaceSets_[zoneI].quads.size()
364 || faceZoneFaceSets_[zoneI].polys.size()
367 nfp.nTris = faceZoneFaceSets_[zoneI].tris.size();
368 nfp.nQuads = faceZoneFaceSets_[zoneI].quads.size();
369 nfp.nPolys = faceZoneFaceSets_[zoneI].polys.size();
373 reduce(nfp.nTris, sumOp<label>());
374 reduce(nfp.nQuads, sumOp<label>());
375 reduce(nfp.nPolys, sumOp<label>());
377 nFaceZonePrims_.insert(zoneName, nfp);
383 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
385 Foam::ensightMesh::ensightMesh
388 const bool noPatches,
391 const wordReList& patchPatterns,
393 const bool faceZones,
394 const wordReList& faceZonePatterns,
400 noPatches_(noPatches),
402 patchPatterns_(patchPatterns),
403 faceZones_(faceZones),
404 faceZonePatterns_(faceZonePatterns),
406 meshCellSets_(mesh.nCells())
412 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
414 Foam::ensightMesh::~ensightMesh()
418 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
420 bool Foam::ensightMesh::faceToBeIncluded(const label faceI) const
424 if (mesh_.isInternalFace(faceI))
430 res = boundaryFaceToBeIncluded_[faceI-mesh_.nInternalFaces()];
437 void Foam::ensightMesh::barrier()
440 reduce(appI,maxOp<label>());
444 Foam::cellShapeList Foam::ensightMesh::map
446 const cellShapeList& cellShapes,
447 const labelList& prims,
448 const labelList& pointToGlobal
451 cellShapeList mcsl(prims.size());
455 mcsl[i] = cellShapes[prims[i]];
456 inplaceRenumber(pointToGlobal, mcsl[i]);
463 Foam::cellShapeList Foam::ensightMesh::map
465 const cellShapeList& cellShapes,
466 const labelList& hexes,
467 const labelList& wedges,
468 const labelList& pointToGlobal
471 cellShapeList mcsl(hexes.size() + wedges.size());
475 mcsl[i] = cellShapes[hexes[i]];
476 inplaceRenumber(pointToGlobal, mcsl[i]);
479 label offset = hexes.size();
481 const cellModel& hex = *(cellModeller::lookup("hex"));
482 labelList hexLabels(8);
486 const cellShape& cellPoints = cellShapes[wedges[i]];
488 hexLabels[0] = cellPoints[0];
489 hexLabels[1] = cellPoints[1];
490 hexLabels[2] = cellPoints[0];
491 hexLabels[3] = cellPoints[2];
492 hexLabels[4] = cellPoints[3];
493 hexLabels[5] = cellPoints[4];
494 hexLabels[6] = cellPoints[6];
495 hexLabels[7] = cellPoints[5];
497 mcsl[i + offset] = cellShape(hex, hexLabels);
498 inplaceRenumber(pointToGlobal, mcsl[i + offset]);
505 void Foam::ensightMesh::writePrims
507 const cellShapeList& cellShapes,
508 ensightStream& ensightGeometryFile
511 // Create a temp int array
512 if (cellShapes.size())
514 if (ensightGeometryFile.ascii())
516 // Workaround for paraview issue : write one cell per line
518 forAll(cellShapes, i)
520 const cellShape& cellPoints = cellShapes[i];
522 List<int> temp(cellPoints.size());
524 forAll(cellPoints, pointI)
526 temp[pointI] = cellPoints[pointI] + 1;
528 ensightGeometryFile.write(temp);
533 // All the cellShapes have the same number of elements!
534 int numIntElem = cellShapes.size()*cellShapes[0].size();
535 List<int> temp(numIntElem);
539 forAll(cellShapes, i)
541 const cellShape& cellPoints = cellShapes[i];
543 forAll(cellPoints, pointI)
545 temp[n] = cellPoints[pointI] + 1;
549 ensightGeometryFile.write(temp);
555 void Foam::ensightMesh::writePolysNFaces
557 const labelList& polys,
558 const cellList& cellFaces,
559 ensightStream& ensightGeometryFile
564 ensightGeometryFile.write(cellFaces[polys[i]].size());
569 void Foam::ensightMesh::writePolysNPointsPerFace
571 const labelList& polys,
572 const cellList& cellFaces,
573 const faceList& faces,
574 ensightStream& ensightGeometryFile
579 const labelList& cf = cellFaces[polys[i]];
583 ensightGeometryFile.write(faces[cf[faceI]].size());
589 void Foam::ensightMesh::writePolysPoints
591 const labelList& polys,
592 const cellList& cellFaces,
593 const faceList& faces,
594 ensightStream& ensightGeometryFile
599 const labelList& cf = cellFaces[polys[i]];
603 const face& f = faces[cf[faceI]];
605 List<int> temp(f.size());
608 temp[pointI] = f[pointI] + 1;
610 ensightGeometryFile.write(temp);
616 void Foam::ensightMesh::writeAllPolys
618 const labelList& pointToGlobal,
619 ensightStream& ensightGeometryFile
622 if (meshCellSets_.nPolys)
624 const cellList& cellFaces = mesh_.cells();
625 // Renumber faces to use global point numbers
626 faceList faces(mesh_.faces());
629 inplaceRenumber(pointToGlobal, faces[i]);
632 if (Pstream::master())
634 ensightGeometryFile.write("nfaced");
635 ensightGeometryFile.write(meshCellSets_.nPolys);
638 // Number of faces for each poly cell
640 if (Pstream::master())
650 for (int slave=1; slave<Pstream::nProcs(); slave++)
652 IPstream fromSlave(Pstream::scheduled, slave);
653 labelList polys(fromSlave);
654 cellList cellFaces(fromSlave);
666 OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
667 toMaster<< meshCellSets_.polys << cellFaces;
671 // Number of points for each face of the above list
672 if (Pstream::master())
675 writePolysNPointsPerFace
683 for (int slave=1; slave<Pstream::nProcs(); slave++)
685 IPstream fromSlave(Pstream::scheduled, slave);
686 labelList polys(fromSlave);
687 cellList cellFaces(fromSlave);
688 faceList faces(fromSlave);
690 writePolysNPointsPerFace
701 OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
702 toMaster<< meshCellSets_.polys << cellFaces << faces;
706 // List of points id for each face of the above list
707 if (Pstream::master())
718 for (int slave=1; slave<Pstream::nProcs(); slave++)
720 IPstream fromSlave(Pstream::scheduled, slave);
721 labelList polys(fromSlave);
722 cellList cellFaces(fromSlave);
723 faceList faces(fromSlave);
736 OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
737 toMaster<< meshCellSets_.polys << cellFaces << faces;
743 void Foam::ensightMesh::writeAllPrims
747 const cellShapeList& cellShapes,
748 ensightStream& ensightGeometryFile
753 if (Pstream::master())
755 ensightGeometryFile.write(key);
756 ensightGeometryFile.write(nPrims);
758 writePrims(cellShapes, ensightGeometryFile);
760 for (int slave=1; slave<Pstream::nProcs(); slave++)
762 IPstream fromSlave(Pstream::scheduled, slave);
763 cellShapeList cellShapes(fromSlave);
765 writePrims(cellShapes, ensightGeometryFile);
770 OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
771 toMaster<< cellShapes;
777 void Foam::ensightMesh::writeFacePrims
779 const faceList& patchFaces,
780 ensightStream& ensightGeometryFile
783 forAll(patchFaces, i)
785 const face& patchFace = patchFaces[i];
787 List<int> temp(patchFace.size());
788 forAll(patchFace, pointI)
790 temp[pointI] = patchFace[pointI] + 1;
793 ensightGeometryFile.write(temp);
798 void Foam::ensightMesh::writeAllFacePrims
801 const labelList& prims,
803 const faceList& patchFaces,
804 ensightStream& ensightGeometryFile
809 if (Pstream::master())
811 ensightGeometryFile.write(key);
812 ensightGeometryFile.write(nPrims);
816 UIndirectList<face>(patchFaces, prims)(),
820 for (int slave=1; slave<Pstream::nProcs(); slave++)
822 IPstream fromSlave(Pstream::scheduled, slave);
823 faceList patchFaces(fromSlave);
825 writeFacePrims(patchFaces, ensightGeometryFile);
830 OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
831 toMaster<< UIndirectList<face>(patchFaces, prims);
837 void Foam::ensightMesh::writeNSidedNPointsPerFace
839 const faceList& patchFaces,
840 ensightStream& ensightGeometryFile
843 forAll(patchFaces, i)
845 ensightGeometryFile.write(patchFaces[i].size());
850 void Foam::ensightMesh::writeNSidedPoints
852 const faceList& patchFaces,
853 ensightStream& ensightGeometryFile
856 writeFacePrims(patchFaces, ensightGeometryFile);
860 void Foam::ensightMesh::writeAllNSided
862 const labelList& prims,
864 const faceList& patchFaces,
865 ensightStream& ensightGeometryFile
870 if (Pstream::master())
872 ensightGeometryFile.write("nsided");
873 ensightGeometryFile.write(nPrims);
876 // Number of points for each face
877 if (Pstream::master())
879 writeNSidedNPointsPerFace
881 UIndirectList<face>(patchFaces, prims)(),
885 for (int slave=1; slave<Pstream::nProcs(); slave++)
887 IPstream fromSlave(Pstream::scheduled, slave);
888 faceList patchFaces(fromSlave);
890 writeNSidedNPointsPerFace
899 OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
900 toMaster<< UIndirectList<face>(patchFaces, prims);
903 // List of points id for each face
904 if (Pstream::master())
908 UIndirectList<face>(patchFaces, prims)(),
912 for (int slave=1; slave<Pstream::nProcs(); slave++)
914 IPstream fromSlave(Pstream::scheduled, slave);
915 faceList patchFaces(fromSlave);
917 writeNSidedPoints(patchFaces, ensightGeometryFile);
922 OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
923 toMaster<< UIndirectList<face>(patchFaces, prims);
929 void Foam::ensightMesh::writeAllInternalPoints
931 const pointField& uniquePoints,
933 ensightStream& ensightGeometryFile
938 if (Pstream::master())
940 ensightGeometryFile.writePartHeader(1);
941 ensightGeometryFile.write("internalMesh");
942 ensightGeometryFile.write("coordinates");
943 ensightGeometryFile.write(nPoints);
945 for (direction d=0; d<vector::nComponents; d++)
947 ensightGeometryFile.write(uniquePoints.component(d));
949 for (int slave=1; slave<Pstream::nProcs(); slave++)
951 IPstream fromSlave(Pstream::scheduled, slave);
952 scalarField pointsComponent(fromSlave);
953 ensightGeometryFile.write(pointsComponent);
959 for (direction d=0; d<vector::nComponents; d++)
961 OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
962 toMaster<< uniquePoints.component(d);
968 void Foam::ensightMesh::writeAllPatchPoints
970 const label ensightPatchI,
971 const word& patchName,
972 const pointField& uniquePoints,
974 ensightStream& ensightGeometryFile
979 if (Pstream::master())
981 ensightGeometryFile.writePartHeader(ensightPatchI);
982 ensightGeometryFile.write(patchName.c_str());
983 ensightGeometryFile.write("coordinates");
984 ensightGeometryFile.write(nPoints);
986 for (direction d=0; d<vector::nComponents; d++)
988 ensightGeometryFile.write(uniquePoints.component(d));
989 for (int slave=1; slave<Pstream::nProcs(); slave++)
991 IPstream fromSlave(Pstream::scheduled, slave);
992 scalarField patchPointsComponent(fromSlave);
993 ensightGeometryFile.write(patchPointsComponent);
999 for (direction d=0; d<vector::nComponents; d++)
1006 toMaster<< uniquePoints.component(d);
1012 void Foam::ensightMesh::write
1014 const fileName& postProcPath,
1015 const word& prepend,
1016 const label timeIndex,
1017 Ostream& ensightCaseFile
1020 const Time& runTime = mesh_.time();
1021 const cellShapeList& cellShapes = mesh_.cellShapes();
1024 word timeFile = prepend;
1030 else if (mesh_.moving())
1032 timeFile += itoa(timeIndex) + '.';
1035 // set the filename of the ensight file
1036 fileName ensightGeometryFileName = timeFile + "mesh";
1038 ensightStream* ensightGeometryFilePtr = NULL;
1039 if (Pstream::master())
1043 ensightGeometryFilePtr = new ensightBinaryStream
1045 postProcPath/ensightGeometryFileName,
1048 ensightGeometryFilePtr->write("C binary");
1052 ensightGeometryFilePtr = new ensightAsciiStream
1054 postProcPath/ensightGeometryFileName,
1060 ensightStream& ensightGeometryFile = *ensightGeometryFilePtr;
1062 if (Pstream::master())
1064 string desc = string("written by OpenFOAM-") + Foam::FOAMversion;
1066 ensightGeometryFile.write("EnSight Geometry File");
1067 ensightGeometryFile.write(desc.c_str());
1068 ensightGeometryFile.write("node id assign");
1069 ensightGeometryFile.write("element id assign");
1072 if (patchNames_.empty())
1074 label nPoints = globalPoints().size();
1076 const pointField uniquePoints(mesh_.points(), uniquePointMap_);
1078 writeAllInternalPoints
1088 meshCellSets_.nHexesWedges,
1089 map // Rewrite cellShapes to global numbering
1092 meshCellSets_.hexes,
1093 meshCellSets_.wedges,
1102 meshCellSets_.nPrisms,
1103 map(cellShapes, meshCellSets_.prisms, pointToGlobal_),
1110 meshCellSets_.nPyrs,
1111 map(cellShapes, meshCellSets_.pyrs, pointToGlobal_),
1118 meshCellSets_.nTets,
1119 map(cellShapes, meshCellSets_.tets, pointToGlobal_),
1131 label ensightPatchI = patchPartOffset_;
1133 forAll(allPatchNames_, patchi)
1135 const word& patchName = allPatchNames_[patchi];
1137 if (patchNames_.empty() || patchNames_.found(patchName))
1139 const nFacePrimitives& nfp = nPatchPrims_[patchName];
1141 if (nfp.nTris || nfp.nQuads || nfp.nPolys)
1143 const polyPatch& p = mesh_.boundaryMesh()[patchi];
1144 const labelList& tris = boundaryFaceSets_[patchi].tris;
1145 const labelList& quads = boundaryFaceSets_[patchi].quads;
1146 const labelList& polys = boundaryFaceSets_[patchi].polys;
1148 // Renumber the patch points/faces into unique points
1149 labelList pointToGlobal;
1150 labelList uniqueMeshPointLabels;
1151 autoPtr<globalIndex> globalPointsPtr =
1152 mesh_.globalData().mergePoints
1157 uniqueMeshPointLabels
1160 pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels);
1161 // Renumber the patch faces
1162 faceList patchFaces(p.localFaces());
1163 forAll(patchFaces, i)
1165 inplaceRenumber(pointToGlobal, patchFaces[i]);
1173 globalPointsPtr().size(),
1206 // write faceZones, if requested
1207 forAllConstIter(wordHashSet, faceZoneNames_, iter)
1209 const word& faceZoneName = iter.key();
1211 label faceID = mesh_.faceZones().findZoneID(faceZoneName);
1213 const faceZone& fz = mesh_.faceZones()[faceID];
1215 const nFacePrimitives& nfp = nFaceZonePrims_[faceZoneName];
1217 if (nfp.nTris || nfp.nQuads || nfp.nPolys)
1219 const labelList& tris = faceZoneFaceSets_[faceID].tris;
1220 const labelList& quads = faceZoneFaceSets_[faceID].quads;
1221 const labelList& polys = faceZoneFaceSets_[faceID].polys;
1223 // Renumber the faceZone points/faces into unique points
1224 labelList pointToGlobal;
1225 labelList uniqueMeshPointLabels;
1226 autoPtr<globalIndex> globalPointsPtr =
1227 mesh_.globalData().mergePoints
1230 fz().meshPointMap(),
1232 uniqueMeshPointLabels
1235 pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels);
1237 // Find the list of master faces belonging to the faceZone,
1238 // in loacal numbering
1239 faceList faceZoneFaces(fz().localFaces());
1241 // Count how many master faces belong to the faceZone. Is there
1242 // a better way of doing this?
1243 label nMasterFaces = 0;
1247 if (faceToBeIncluded(fz[faceI]))
1253 // Create the faceList for the master faces only and fill it.
1254 faceList faceZoneMasterFaces(nMasterFaces);
1256 label currentFace = 0;
1260 if (faceToBeIncluded(fz[faceI]))
1262 faceZoneMasterFaces[currentFace] = faceZoneFaces[faceI];
1267 // Renumber the faceZone master faces
1268 forAll(faceZoneMasterFaces, i)
1270 inplaceRenumber(pointToGlobal, faceZoneMasterFaces[i]);
1278 globalPointsPtr().size(),
1287 faceZoneMasterFaces,
1296 faceZoneMasterFaces,
1304 faceZoneMasterFaces,
1310 if (Pstream::master())
1312 delete ensightGeometryFilePtr;
1317 // ************************************************************************* //