ensightMesh.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "ensightMesh.H"
27 #include "argList.H"
28 #include "Time.H"
29 #include "fvMesh.H"
30 #include "globalMeshData.H"
32 #include "processorPolyPatch.H"
33 #include "cellModeller.H"
34 #include "IOmanip.H"
35 #include "itoa.H"
36 #include "globalIndex.H"
37 #include "mapDistribute.H"
38 #include "stringListOps.H"
39 
40 #include "ensightBinaryStream.H"
41 #include "ensightAsciiStream.H"
42 
43 #include <fstream>
44 
45 // * * * * * * * * * * * * * Private Functions * * * * * * * * * * * * * * //
46 
48 {
49  patchPartOffset_ = 2;
51 
52  boundaryFaceSets_.setSize(mesh_.boundary().size());
53  boundaryFaceSets_ = faceSets(); // if number of patches changes
56  nPatchPrims_ = 0;
57  faceZoneFaceSets_.setSize(mesh_.faceZones().size());
58  faceZoneFaceSets_ = faceSets(); // if number of patches changes
60  nFaceZonePrims_ = 0;
62 
63  if (!noPatches_)
64  {
65  // Patches are output. Check that they're synced.
67 
69  if (Pstream::parRun())
70  {
72  (
73  mesh_.boundary().size()
75  );
76  }
77 
78  if (patches_)
79  {
80  if (patchPatterns_.empty())
81  {
82  forAll(allPatchNames_, nameI)
83  {
85  }
86  }
87  else
88  {
89  // Find patch names which match that requested at command-line
90  forAll(allPatchNames_, nameI)
91  {
92  const word& patchName = allPatchNames_[nameI];
93  if (findStrings(patchPatterns_, patchName))
94  {
95  patchNames_.insert(patchName);
96  }
97  }
98  }
99  }
100  }
101 
102  if (patchNames_.size())
103  {
104  // no internalMesh
105  patchPartOffset_ = 1;
106  }
107  else
108  {
110 
111  const cellModel& tet = *(cellModeller::lookup("tet"));
112  const cellModel& pyr = *(cellModeller::lookup("pyr"));
113  const cellModel& prism = *(cellModeller::lookup("prism"));
114  const cellModel& wedge = *(cellModeller::lookup("wedge"));
115  const cellModel& hex = *(cellModeller::lookup("hex"));
116 
117 
118 
119  // Count the shapes
120  labelList& tets = meshCellSets_.tets;
121  labelList& pyrs = meshCellSets_.pyrs;
122  labelList& prisms = meshCellSets_.prisms;
123  labelList& wedges = meshCellSets_.wedges;
124  labelList& hexes = meshCellSets_.hexes;
125  labelList& polys = meshCellSets_.polys;
126 
127  label nTets = 0;
128  label nPyrs = 0;
129  label nPrisms = 0;
130  label nWedges = 0;
131  label nHexes = 0;
132  label nPolys = 0;
133 
134  forAll(cellShapes, cellI)
135  {
136  const cellShape& cellShape = cellShapes[cellI];
137  const cellModel& cellModel = cellShape.model();
138 
139  if (cellModel == tet)
140  {
141  tets[nTets++] = cellI;
142  }
143  else if (cellModel == pyr)
144  {
145  pyrs[nPyrs++] = cellI;
146  }
147  else if (cellModel == prism)
148  {
149  prisms[nPrisms++] = cellI;
150  }
151  else if (cellModel == wedge)
152  {
153  wedges[nWedges++] = cellI;
154  }
155  else if (cellModel == hex)
156  {
157  hexes[nHexes++] = cellI;
158  }
159  else
160  {
161  polys[nPolys++] = cellI;
162  }
163  }
164 
165  tets.setSize(nTets);
166  pyrs.setSize(nPyrs);
167  prisms.setSize(nPrisms);
168  wedges.setSize(nWedges);
169  hexes.setSize(nHexes);
170  polys.setSize(nPolys);
171 
172  meshCellSets_.nTets = nTets;
173  reduce(meshCellSets_.nTets, sumOp<label>());
174 
175  meshCellSets_.nPyrs = nPyrs;
176  reduce(meshCellSets_.nPyrs, sumOp<label>());
177 
178  meshCellSets_.nPrisms = nPrisms;
179  reduce(meshCellSets_.nPrisms, sumOp<label>());
180 
181  meshCellSets_.nHexesWedges = nWedges+nHexes;
182  reduce(meshCellSets_.nHexesWedges, sumOp<label>());
183 
184  meshCellSets_.nPolys = nPolys;
185  reduce(meshCellSets_.nPolys, sumOp<label>());
186 
187 
188  // Determine parallel shared points
190  (
193  );
194  }
195 
196  if (!noPatches_)
197  {
199  {
200  if (mesh_.boundary()[patchi].size())
201  {
202  const polyPatch& p = mesh_.boundaryMesh()[patchi];
203 
204  labelList& tris = boundaryFaceSets_[patchi].tris;
205  labelList& quads = boundaryFaceSets_[patchi].quads;
206  labelList& polys = boundaryFaceSets_[patchi].polys;
207 
208  tris.setSize(p.size());
209  quads.setSize(p.size());
210  polys.setSize(p.size());
211 
212  label nTris = 0;
213  label nQuads = 0;
214  label nPolys = 0;
215 
216  forAll(p, faceI)
217  {
218  const face& f = p[faceI];
219 
220  if (f.size() == 3)
221  {
222  tris[nTris++] = faceI;
223  }
224  else if (f.size() == 4)
225  {
226  quads[nQuads++] = faceI;
227  }
228  else
229  {
230  polys[nPolys++] = faceI;
231  }
232  }
233 
234  tris.setSize(nTris);
235  quads.setSize(nQuads);
236  polys.setSize(nPolys);
237  }
238  }
239  }
240 
242  {
243  const word& patchName = allPatchNames_[patchi];
244  nFacePrimitives nfp;
245 
246  if (patchNames_.empty() || patchNames_.found(patchName))
247  {
248  if (mesh_.boundary()[patchi].size())
249  {
250  nfp.nTris = boundaryFaceSets_[patchi].tris.size();
251  nfp.nQuads = boundaryFaceSets_[patchi].quads.size();
252  nfp.nPolys = boundaryFaceSets_[patchi].polys.size();
253  }
254  }
255 
256  reduce(nfp.nTris, sumOp<label>());
257  reduce(nfp.nQuads, sumOp<label>());
258  reduce(nfp.nPolys, sumOp<label>());
259 
260  nPatchPrims_.insert(patchName, nfp);
261  }
262 
263  // faceZones
264  if (faceZones_)
265  {
266  wordList faceZoneNamesAll = mesh_.faceZones().names();
267  // Need to sort the list of all face zones since the index may vary
268  // from processor to processor...
269  sort(faceZoneNamesAll);
270 
271  // Find faceZone names which match that requested at command-line
272  forAll(faceZoneNamesAll, nameI)
273  {
274  const word& zoneName = faceZoneNamesAll[nameI];
275  if (findStrings(faceZonePatterns_, zoneName))
276  {
277  faceZoneNames_.insert(zoneName);
278  }
279  }
280 
281  // Build list of boundary faces to be exported
283  (
284  mesh_.nFaces()
285  - mesh_.nInternalFaces(),
286  1
287  );
288 
289  forAll(mesh_.boundaryMesh(), patchI)
290  {
291  const polyPatch& pp = mesh_.boundaryMesh()[patchI];
292  if
293  (
294  isA<processorPolyPatch>(pp)
295  && !refCast<const processorPolyPatch>(pp).owner()
296  )
297  {
298  label bFaceI = pp.start()-mesh_.nInternalFaces();
299  forAll(pp, i)
300  {
301  boundaryFaceToBeIncluded_[bFaceI++] = 0;
302  }
303  }
304  }
305 
306  // Count face types in each faceZone
307  forAll(faceZoneNamesAll, zoneI)
308  {
309  const word& zoneName = faceZoneNamesAll[zoneI];
310  const label faceZoneId = mesh_.faceZones().findZoneID(zoneName);
311 
312  const faceZone& fz = mesh_.faceZones()[faceZoneId];
313 
314  if (fz.size())
315  {
316  labelList& tris = faceZoneFaceSets_[faceZoneId].tris;
317  labelList& quads = faceZoneFaceSets_[faceZoneId].quads;
318  labelList& polys = faceZoneFaceSets_[faceZoneId].polys;
319 
320  tris.setSize(fz.size());
321  quads.setSize(fz.size());
322  polys.setSize(fz.size());
323 
324  label nTris = 0;
325  label nQuads = 0;
326  label nPolys = 0;
327 
328  label faceCounter = 0;
329 
330  forAll(fz, i)
331  {
332  label faceI = fz[i];
333 
334  // Avoid counting faces on processor boundaries twice
335  if (faceToBeIncluded(faceI))
336  {
337  const face& f = mesh_.faces()[faceI];
338 
339  if (f.size() == 3)
340  {
341  tris[nTris++] = faceCounter;
342  }
343  else if (f.size() == 4)
344  {
345  quads[nQuads++] = faceCounter;
346  }
347  else
348  {
349  polys[nPolys++] = faceCounter;
350  }
351 
352  ++faceCounter;
353  }
354  }
355 
356  tris.setSize(nTris);
357  quads.setSize(nQuads);
358  polys.setSize(nPolys);
359  }
360  }
361 
362  forAll(faceZoneNamesAll, zoneI)
363  {
364  const word& zoneName = faceZoneNamesAll[zoneI];
365  nFacePrimitives nfp;
366  const label faceZoneId = mesh_.faceZones().findZoneID(zoneName);
367 
368  if (faceZoneNames_.found(zoneName))
369  {
370  if
371  (
372  faceZoneFaceSets_[faceZoneId].tris.size()
373  || faceZoneFaceSets_[faceZoneId].quads.size()
374  || faceZoneFaceSets_[faceZoneId].polys.size()
375  )
376  {
377  nfp.nTris = faceZoneFaceSets_[faceZoneId].tris.size();
378  nfp.nQuads = faceZoneFaceSets_[faceZoneId].quads.size();
379  nfp.nPolys = faceZoneFaceSets_[faceZoneId].polys.size();
380  }
381  }
382 
383  reduce(nfp.nTris, sumOp<label>());
384  reduce(nfp.nQuads, sumOp<label>());
385  reduce(nfp.nPolys, sumOp<label>());
386 
387  nFaceZonePrims_.insert(zoneName, nfp);
388  }
389  }
390 }
391 
392 
393 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
394 
396 (
397  const fvMesh& mesh,
398  const bool noPatches,
399 
400  const bool patches,
401  const wordReList& patchPatterns,
402 
403  const bool faceZones,
404  const wordReList& faceZonePatterns,
405 
406  const bool binary
407 )
408 :
409  mesh_(mesh),
410  noPatches_(noPatches),
411  patches_(patches),
412  patchPatterns_(patchPatterns),
413  faceZones_(faceZones),
414  faceZonePatterns_(faceZonePatterns),
415  binary_(binary),
416  meshCellSets_(mesh.nCells())
417 {
418  correct();
419 }
420 
421 
422 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
423 
425 {}
426 
427 
428 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
429 
430 bool Foam::ensightMesh::faceToBeIncluded(const label faceI) const
431 {
432  bool res = false;
433 
434  if (mesh_.isInternalFace(faceI))
435  {
436  res = true;
437  }
438  else
439  {
440  res = boundaryFaceToBeIncluded_[faceI-mesh_.nInternalFaces()];
441  }
442 
443  return res;
444 }
445 
446 
448 {
449  label appI = 0;
450  reduce(appI,maxOp<label>());
451 }
452 
453 
455 (
456  const cellShapeList& cellShapes,
457  const labelList& prims,
458  const labelList& pointToGlobal
459 ) const
460 {
461  cellShapeList mcsl(prims.size());
462 
463  forAll(prims, i)
464  {
465  mcsl[i] = cellShapes[prims[i]];
466  inplaceRenumber(pointToGlobal, mcsl[i]);
467  }
468 
469  return mcsl;
470 }
471 
472 
474 (
475  const cellShapeList& cellShapes,
476  const labelList& hexes,
477  const labelList& wedges,
478  const labelList& pointToGlobal
479 ) const
480 {
481  cellShapeList mcsl(hexes.size() + wedges.size());
482 
483  forAll(hexes, i)
484  {
485  mcsl[i] = cellShapes[hexes[i]];
486  inplaceRenumber(pointToGlobal, mcsl[i]);
487  }
488 
489  label offset = hexes.size();
490 
491  const cellModel& hex = *(cellModeller::lookup("hex"));
492  labelList hexLabels(8);
493 
494  forAll(wedges, i)
495  {
496  const cellShape& cellPoints = cellShapes[wedges[i]];
497 
498  hexLabels[0] = cellPoints[0];
499  hexLabels[1] = cellPoints[1];
500  hexLabels[2] = cellPoints[0];
501  hexLabels[3] = cellPoints[2];
502  hexLabels[4] = cellPoints[3];
503  hexLabels[5] = cellPoints[4];
504  hexLabels[6] = cellPoints[6];
505  hexLabels[7] = cellPoints[5];
506 
507  mcsl[i + offset] = cellShape(hex, hexLabels);
508  inplaceRenumber(pointToGlobal, mcsl[i + offset]);
509  }
510 
511  return mcsl;
512 }
513 
514 
516 (
517  const cellShapeList& cellShapes,
518  ensightStream& ensightGeometryFile
519 ) const
520 {
521  // Create a temp int array
522  if (cellShapes.size())
523  {
524  if (ensightGeometryFile.ascii())
525  {
526  // Workaround for paraview issue : write one cell per line
527 
528  forAll(cellShapes, i)
529  {
530  const cellShape& cellPoints = cellShapes[i];
531 
532  List<int> temp(cellPoints.size());
533 
534  forAll(cellPoints, pointI)
535  {
536  temp[pointI] = cellPoints[pointI] + 1;
537  }
538  ensightGeometryFile.write(temp);
539  }
540  }
541  else
542  {
543  // All the cellShapes have the same number of elements!
544  int numIntElem = cellShapes.size()*cellShapes[0].size();
545  List<int> temp(numIntElem);
546 
547  int n = 0;
548 
549  forAll(cellShapes, i)
550  {
551  const cellShape& cellPoints = cellShapes[i];
552 
553  forAll(cellPoints, pointI)
554  {
555  temp[n] = cellPoints[pointI] + 1;
556  n++;
557  }
558  }
559  ensightGeometryFile.write(temp);
560  }
561  }
562 }
563 
564 
566 (
567  const labelList& polys,
568  const cellList& cellFaces,
569  ensightStream& ensightGeometryFile
570 ) const
571 {
572  forAll(polys, i)
573  {
574  ensightGeometryFile.write(cellFaces[polys[i]].size());
575  }
576 }
577 
578 
580 (
581  const labelList& polys,
582  const cellList& cellFaces,
583  const faceList& faces,
584  ensightStream& ensightGeometryFile
585 ) const
586 {
587  forAll(polys, i)
588  {
589  const labelList& cf = cellFaces[polys[i]];
590 
591  forAll(cf, faceI)
592  {
593  ensightGeometryFile.write(faces[cf[faceI]].size());
594  }
595  }
596 }
597 
598 
600 (
601  const labelList& polys,
602  const cellList& cellFaces,
603  const faceList& faces,
604  const labelList& faceOwner,
605  ensightStream& ensightGeometryFile
606 ) const
607 {
608  forAll(polys, i)
609  {
610  const labelList& cf = cellFaces[polys[i]];
611 
612  forAll(cf, faceI)
613  {
614  const label faceId = cf[faceI];
615  const face& f = faces[faceId]; // points of face (in global points)
616  const label np = f.size();
617  bool reverseOrder = false;
618  if (faceId >= faceOwner.size())
619  {
620  // Boundary face.
621  // Nothing should be done for processor boundary.
622  // The current cell always owns them. Given that we
623  // are reverting the
624  // order when the cell is the neighbour to the face,
625  // the orientation of
626  // all the boundaries, no matter if they are "real"
627  // or processorBoundaries, is consistent.
628  }
629  else
630  {
631  if (faceOwner[faceId] != polys[i])
632  {
633  reverseOrder = true;
634  }
635  }
636 
637  // If the face owner is the current cell, write the points
638  // in the standard order.
639  // If the face owner is not the current cell, write the points
640  // in reverse order.
641  // EnSight prefers to have all the faces of an nfaced cell
642  // oriented in the same way.
643  List<int> temp(np);
644  forAll(f, pointI)
645  {
646  if (reverseOrder)
647  {
648  temp[np-1-pointI] = f[pointI] + 1;
649  }
650  else
651  {
652  temp[pointI] = f[pointI] + 1;
653  }
654  }
655  ensightGeometryFile.write(temp);
656  }
657  }
658 }
659 
660 
662 (
663  const labelList& pointToGlobal,
664  ensightStream& ensightGeometryFile
665 ) const
666 {
667  if (meshCellSets_.nPolys)
668  {
669  const cellList& cellFaces = mesh_.cells();
670  const labelList& faceOwner = mesh_.faceOwner();
671 
672  // Renumber faces to use global point numbers
673  faceList faces(mesh_.faces());
674  forAll(faces, i)
675  {
676  inplaceRenumber(pointToGlobal, faces[i]);
677  }
678 
679  if (Pstream::master())
680  {
681  ensightGeometryFile.write("nfaced");
682  ensightGeometryFile.write(meshCellSets_.nPolys);
683  }
684 
685  // Number of faces for each poly cell
686 
687  if (Pstream::master())
688  {
689  // Master
690  writePolysNFaces
691  (
692  meshCellSets_.polys,
693  cellFaces,
694  ensightGeometryFile
695  );
696  // Slaves
697  for (int slave=1; slave<Pstream::nProcs(); slave++)
698  {
699  IPstream fromSlave(Pstream::scheduled, slave);
700  labelList polys(fromSlave);
701  cellList cellFaces(fromSlave);
702 
703  writePolysNFaces
704  (
705  polys,
706  cellFaces,
707  ensightGeometryFile
708  );
709  }
710  }
711  else
712  {
713  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
714  toMaster<< meshCellSets_.polys << cellFaces;
715  }
716 
717 
718  // Number of points for each face of the above list
719  if (Pstream::master())
720  {
721  // Master
722  writePolysNPointsPerFace
723  (
724  meshCellSets_.polys,
725  cellFaces,
726  faces,
727  ensightGeometryFile
728  );
729  // Slaves
730  for (int slave=1; slave<Pstream::nProcs(); slave++)
731  {
732  IPstream fromSlave(Pstream::scheduled, slave);
733  labelList polys(fromSlave);
734  cellList cellFaces(fromSlave);
735  faceList faces(fromSlave);
736 
737  writePolysNPointsPerFace
738  (
739  polys,
740  cellFaces,
741  faces,
742  ensightGeometryFile
743  );
744  }
745  }
746  else
747  {
748  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
749  toMaster<< meshCellSets_.polys << cellFaces << faces;
750  }
751 
752 
753  // List of points id for each face of the above list
754  if (Pstream::master())
755  {
756  // Master
757  writePolysPoints
758  (
759  meshCellSets_.polys,
760  cellFaces,
761  faces,
762  faceOwner,
763  ensightGeometryFile
764  );
765  // Slaves
766  for (int slave=1; slave<Pstream::nProcs(); slave++)
767  {
768  IPstream fromSlave(Pstream::scheduled, slave);
769  labelList polys(fromSlave);
770  cellList cellFaces(fromSlave);
771  faceList faces(fromSlave);
772  labelList faceOwner(fromSlave);
773 
774  writePolysPoints
775  (
776  polys,
777  cellFaces,
778  faces,
779  faceOwner,
780  ensightGeometryFile
781  );
782  }
783  }
784  else
785  {
786  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
787  toMaster<< meshCellSets_.polys << cellFaces << faces << faceOwner;
788  }
789  }
790 }
791 
792 
794 (
795  const char* key,
796  const label nPrims,
797  const cellShapeList& cellShapes,
798  ensightStream& ensightGeometryFile
799 ) const
800 {
801  if (nPrims)
802  {
803  if (Pstream::master())
804  {
805  ensightGeometryFile.write(key);
806  ensightGeometryFile.write(nPrims);
807 
808  writePrims(cellShapes, ensightGeometryFile);
809 
810  for (int slave=1; slave<Pstream::nProcs(); slave++)
811  {
812  IPstream fromSlave(Pstream::scheduled, slave);
813  cellShapeList cellShapes(fromSlave);
814 
815  writePrims(cellShapes, ensightGeometryFile);
816  }
817  }
818  else
819  {
820  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
821  toMaster<< cellShapes;
822  }
823  }
824 }
825 
826 
828 (
829  const faceList& patchFaces,
830  ensightStream& ensightGeometryFile
831 ) const
832 {
833  forAll(patchFaces, i)
834  {
835  const face& patchFace = patchFaces[i];
836 
837  List<int> temp(patchFace.size());
838  forAll(patchFace, pointI)
839  {
840  temp[pointI] = patchFace[pointI] + 1;
841  }
842 
843  ensightGeometryFile.write(temp);
844  }
845 }
846 
847 
849 (
850  const char* key,
851  const labelList& prims,
852  const label nPrims,
853  const faceList& patchFaces,
854  ensightStream& ensightGeometryFile
855 ) const
856 {
857  if (nPrims)
858  {
859  if (Pstream::master())
860  {
861  ensightGeometryFile.write(key);
862  ensightGeometryFile.write(nPrims);
863 
864  writeFacePrims
865  (
866  UIndirectList<face>(patchFaces, prims)(),
867  ensightGeometryFile
868  );
869 
870  for (int slave=1; slave<Pstream::nProcs(); slave++)
871  {
872  IPstream fromSlave(Pstream::scheduled, slave);
873  faceList patchFaces(fromSlave);
874 
875  writeFacePrims(patchFaces, ensightGeometryFile);
876  }
877  }
878  else
879  {
880  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
881  toMaster<< UIndirectList<face>(patchFaces, prims);
882  }
883  }
884 }
885 
886 
888 (
889  const faceList& patchFaces,
890  ensightStream& ensightGeometryFile
891 ) const
892 {
893  forAll(patchFaces, i)
894  {
895  ensightGeometryFile.write(patchFaces[i].size());
896  }
897 }
898 
899 
901 (
902  const faceList& patchFaces,
903  ensightStream& ensightGeometryFile
904 ) const
905 {
906  writeFacePrims(patchFaces, ensightGeometryFile);
907 }
908 
909 
911 (
912  const labelList& prims,
913  const label nPrims,
914  const faceList& patchFaces,
915  ensightStream& ensightGeometryFile
916 ) const
917 {
918  if (nPrims)
919  {
920  if (Pstream::master())
921  {
922  ensightGeometryFile.write("nsided");
923  ensightGeometryFile.write(nPrims);
924  }
925 
926  // Number of points for each face
927  if (Pstream::master())
928  {
929  writeNSidedNPointsPerFace
930  (
931  UIndirectList<face>(patchFaces, prims)(),
932  ensightGeometryFile
933  );
934 
935  for (int slave=1; slave<Pstream::nProcs(); slave++)
936  {
937  IPstream fromSlave(Pstream::scheduled, slave);
938  faceList patchFaces(fromSlave);
939 
940  writeNSidedNPointsPerFace
941  (
942  patchFaces,
943  ensightGeometryFile
944  );
945  }
946  }
947  else
948  {
949  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
950  toMaster<< UIndirectList<face>(patchFaces, prims);
951  }
952 
953  // List of points id for each face
954  if (Pstream::master())
955  {
956  writeNSidedPoints
957  (
958  UIndirectList<face>(patchFaces, prims)(),
959  ensightGeometryFile
960  );
961 
962  for (int slave=1; slave<Pstream::nProcs(); slave++)
963  {
964  IPstream fromSlave(Pstream::scheduled, slave);
965  faceList patchFaces(fromSlave);
966 
967  writeNSidedPoints(patchFaces, ensightGeometryFile);
968  }
969  }
970  else
971  {
972  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
973  toMaster<< UIndirectList<face>(patchFaces, prims);
974  }
975  }
976 }
977 
978 
980 (
981  const label ensightPartI,
982  const word& ensightPartName,
983  const pointField& uniquePoints,
984  const label nPoints,
985  ensightStream& ensightGeometryFile
986 ) const
987 {
988  barrier();
989 
990  if (Pstream::master())
991  {
992  ensightGeometryFile.writePartHeader(ensightPartI);
993  ensightGeometryFile.write(ensightPartName.c_str());
994  ensightGeometryFile.write("coordinates");
995  ensightGeometryFile.write(nPoints);
996 
997  for (direction d=0; d<vector::nComponents; d++)
998  {
999  ensightGeometryFile.write(uniquePoints.component(d));
1000  for (int slave=1; slave<Pstream::nProcs(); slave++)
1001  {
1002  IPstream fromSlave(Pstream::scheduled, slave);
1003  scalarField patchPointsComponent(fromSlave);
1004  ensightGeometryFile.write(patchPointsComponent);
1005  }
1006  }
1007  }
1008  else
1009  {
1010  for (direction d=0; d<vector::nComponents; d++)
1011  {
1012  OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
1013  toMaster<< uniquePoints.component(d);
1014  }
1015  }
1016 }
1017 
1018 
1020 (
1021  const fileName& postProcPath,
1022  const word& prepend,
1023  const label timeIndex,
1024  const bool meshMoving,
1025  Ostream& ensightCaseFile
1026 ) const
1027 {
1028  const Time& runTime = mesh_.time();
1029  const cellShapeList& cellShapes = mesh_.cellShapes();
1030 
1031 
1032  word timeFile = prepend;
1033 
1034  if (timeIndex == 0)
1035  {
1036  timeFile += "0000.";
1037  }
1038  else if (meshMoving)
1039  {
1040  timeFile += itoa(timeIndex) + '.';
1041  }
1042 
1043  // set the filename of the ensight file
1044  fileName ensightGeometryFileName = timeFile + "mesh";
1045 
1046  ensightStream* ensightGeometryFilePtr = NULL;
1047  if (Pstream::master())
1048  {
1049  if (binary_)
1050  {
1051  ensightGeometryFilePtr = new ensightBinaryStream
1052  (
1053  postProcPath/ensightGeometryFileName,
1054  runTime
1055  );
1056  ensightGeometryFilePtr->write("C binary");
1057  }
1058  else
1059  {
1060  ensightGeometryFilePtr = new ensightAsciiStream
1061  (
1062  postProcPath/ensightGeometryFileName,
1063  runTime
1064  );
1065  }
1066  }
1067 
1068  ensightStream& ensightGeometryFile = *ensightGeometryFilePtr;
1069 
1070  if (Pstream::master())
1071  {
1072  string desc = string("written by OpenFOAM-") + Foam::FOAMversion;
1073 
1074  ensightGeometryFile.write("EnSight Geometry File");
1075  ensightGeometryFile.write(desc.c_str());
1076  ensightGeometryFile.write("node id assign");
1077  ensightGeometryFile.write("element id assign");
1078  }
1079 
1080  if (patchNames_.empty())
1081  {
1082  label nPoints = globalPoints().size();
1083 
1084  const pointField uniquePoints(mesh_.points(), uniquePointMap_);
1085 
1086  writeAllPoints
1087  (
1088  1,
1089  "internalMesh",
1090  uniquePoints,
1091  nPoints,
1092  ensightGeometryFile
1093  );
1094 
1095  writeAllPrims
1096  (
1097  "hexa8",
1098  meshCellSets_.nHexesWedges,
1099  map // Rewrite cellShapes to global numbering
1100  (
1101  cellShapes,
1102  meshCellSets_.hexes,
1103  meshCellSets_.wedges,
1104  pointToGlobal_
1105  ),
1106  ensightGeometryFile
1107  );
1108 
1109  writeAllPrims
1110  (
1111  "penta6",
1112  meshCellSets_.nPrisms,
1113  map(cellShapes, meshCellSets_.prisms, pointToGlobal_),
1114  ensightGeometryFile
1115  );
1116 
1117  writeAllPrims
1118  (
1119  "pyramid5",
1120  meshCellSets_.nPyrs,
1121  map(cellShapes, meshCellSets_.pyrs, pointToGlobal_),
1122  ensightGeometryFile
1123  );
1124 
1125  writeAllPrims
1126  (
1127  "tetra4",
1128  meshCellSets_.nTets,
1129  map(cellShapes, meshCellSets_.tets, pointToGlobal_),
1130  ensightGeometryFile
1131  );
1132 
1133  writeAllPolys
1134  (
1135  pointToGlobal_,
1136  ensightGeometryFile
1137  );
1138  }
1139 
1140 
1141  label ensightPatchI = patchPartOffset_;
1142 
1143  forAll(allPatchNames_, patchi)
1144  {
1145  const word& patchName = allPatchNames_[patchi];
1146 
1147  if (patchNames_.empty() || patchNames_.found(patchName))
1148  {
1149  const nFacePrimitives& nfp = nPatchPrims_[patchName];
1150 
1151  if (nfp.nTris || nfp.nQuads || nfp.nPolys)
1152  {
1153  const polyPatch& p = mesh_.boundaryMesh()[patchi];
1154 
1155  const labelList& tris = boundaryFaceSets_[patchi].tris;
1156  const labelList& quads = boundaryFaceSets_[patchi].quads;
1157  const labelList& polys = boundaryFaceSets_[patchi].polys;
1158 
1159  // Renumber the patch points/faces into unique points
1160  labelList pointToGlobal;
1161  labelList uniqueMeshPointLabels;
1162  autoPtr<globalIndex> globalPointsPtr =
1163  mesh_.globalData().mergePoints
1164  (
1165  p.meshPoints(),
1166  p.meshPointMap(),
1167  pointToGlobal,
1168  uniqueMeshPointLabels
1169  );
1170 
1171  pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels);
1172  // Renumber the patch faces
1173  faceList patchFaces(p.localFaces());
1174  forAll(patchFaces, i)
1175  {
1176  inplaceRenumber(pointToGlobal, patchFaces[i]);
1177  }
1178 
1179  writeAllPoints
1180  (
1181  ensightPatchI++,
1182  patchName,
1183  uniquePoints,
1184  globalPointsPtr().size(),
1185  ensightGeometryFile
1186  );
1187 
1188  writeAllFacePrims
1189  (
1190  "tria3",
1191  tris,
1192  nfp.nTris,
1193  patchFaces,
1194  ensightGeometryFile
1195  );
1196 
1197  writeAllFacePrims
1198  (
1199  "quad4",
1200  quads,
1201  nfp.nQuads,
1202  patchFaces,
1203  ensightGeometryFile
1204  );
1205 
1206  writeAllNSided
1207  (
1208  polys,
1209  nfp.nPolys,
1210  patchFaces,
1211  ensightGeometryFile
1212  );
1213  }
1214  }
1215  }
1216 
1217  // write faceZones, if requested
1218  forAllConstIter(wordHashSet, faceZoneNames_, iter)
1219  {
1220  const word& faceZoneName = iter.key();
1221 
1222  label faceID = mesh_.faceZones().findZoneID(faceZoneName);
1223 
1224  const faceZone& fz = mesh_.faceZones()[faceID];
1225 
1226  const nFacePrimitives& nfp = nFaceZonePrims_[faceZoneName];
1227 
1228  if (nfp.nTris || nfp.nQuads || nfp.nPolys)
1229  {
1230  const labelList& tris = faceZoneFaceSets_[faceID].tris;
1231  const labelList& quads = faceZoneFaceSets_[faceID].quads;
1232  const labelList& polys = faceZoneFaceSets_[faceID].polys;
1233 
1234  // Renumber the faceZone points/faces into unique points
1235  labelList pointToGlobal;
1236  labelList uniqueMeshPointLabels;
1237  autoPtr<globalIndex> globalPointsPtr =
1238  mesh_.globalData().mergePoints
1239  (
1240  fz().meshPoints(),
1241  fz().meshPointMap(),
1242  pointToGlobal,
1243  uniqueMeshPointLabels
1244  );
1245 
1246  pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels);
1247 
1248  // Find the list of master faces belonging to the faceZone,
1249  // in local numbering
1250  faceList faceZoneFaces(fz().localFaces());
1251 
1252  // Count how many master faces belong to the faceZone. Is there
1253  // a better way of doing this?
1254  label nMasterFaces = 0;
1255 
1256  forAll(fz, faceI)
1257  {
1258  if (faceToBeIncluded(fz[faceI]))
1259  {
1260  ++nMasterFaces;
1261  }
1262  }
1263 
1264  // Create the faceList for the master faces only and fill it.
1265  faceList faceZoneMasterFaces(nMasterFaces);
1266 
1267  label currentFace = 0;
1268 
1269  forAll(fz, faceI)
1270  {
1271  if (faceToBeIncluded(fz[faceI]))
1272  {
1273  faceZoneMasterFaces[currentFace] = faceZoneFaces[faceI];
1274  ++currentFace;
1275  }
1276  }
1277 
1278  // Renumber the faceZone master faces
1279  forAll(faceZoneMasterFaces, i)
1280  {
1281  inplaceRenumber(pointToGlobal, faceZoneMasterFaces[i]);
1282  }
1283 
1284  writeAllPoints
1285  (
1286  ensightPatchI++,
1287  faceZoneName,
1288  uniquePoints,
1289  globalPointsPtr().size(),
1290  ensightGeometryFile
1291  );
1292 
1293  writeAllFacePrims
1294  (
1295  "tria3",
1296  tris,
1297  nfp.nTris,
1298  faceZoneMasterFaces,
1299  ensightGeometryFile
1300  );
1301 
1302  writeAllFacePrims
1303  (
1304  "quad4",
1305  quads,
1306  nfp.nQuads,
1307  faceZoneMasterFaces,
1308  ensightGeometryFile
1309  );
1310 
1311  writeAllNSided
1312  (
1313  polys,
1314  nfp.nPolys,
1315  faceZoneMasterFaces,
1316  ensightGeometryFile
1317  );
1318  }
1319  }
1320 
1321  if (Pstream::master())
1322  {
1323  delete ensightGeometryFilePtr;
1324  }
1325 }
1326 
1327 
1328 // ************************************************************************* //
cellShapes
const cellShapeList & cellShapes
Definition: getFieldScalar.H:35
Foam::ensightMesh::writeAllNSided
void writeAllNSided(const labelList &prims, const label nPrims, const faceList &patchFaces, ensightStream &ensightGeometryFile) const
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:48
Foam::ensightMesh::writeAllPoints
void writeAllPoints(const label ensightPartI, const word &ensightPartName, const pointField &uniquePoints, const label nPoints, ensightStream &ensightGeometryFile) const
p
p
Definition: pEqn.H:62
Foam::ensightMesh::meshCellSets_
cellSets meshCellSets_
Definition: ensightMesh.H:105
Foam::labelList
List< label > labelList
A List of labels.
Definition: labelList.H:56
Foam::ensightMesh::write
void write(const fileName &postProcPath, const word &prepend, const label timeIndex, const bool meshMoving, Ostream &ensightCaseFile) const
Foam::UPstream::scheduled
@ scheduled
Definition: UPstream.H:67
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::globalMeshData::processorPatches
const labelList & processorPatches() const
Return list of processor patch labels.
Definition: globalMeshData.H:404
globalMeshData.H
Foam::cellSets::setSize
void setSize(const label nCells)
Definition: cellSets.H:84
globalIndex.H
Foam::UPstream::nProcs
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Definition: UPstream.H:387
Foam::ensightMesh::correct
void correct()
Update for new mesh.
Foam::UPstream::parRun
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:377
Foam::cellShapeList
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
Definition: cellShapeList.H:43
Foam::wordReList
List< wordRe > wordReList
A List of wordRe (word or regular expression)
Definition: wordReList.H:50
Foam::VectorSpace< Vector< scalar >, scalar, 3 >::nComponents
@ nComponents
Number of components in this vector space.
Definition: VectorSpace.H:88
Foam::ensightMesh::mesh_
const fvMesh & mesh_
Reference to the OpenFOAM mesh.
Definition: ensightMesh.H:86
Foam::polyMesh::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:421
Foam::ensightMesh::writeNSidedPoints
void writeNSidedPoints(const faceList &patchFaces, ensightStream &ensightGeometryFile) const
ensightBinaryStream.H
Foam::ensightMesh::faceToBeIncluded
bool faceToBeIncluded(const label faceI) const
When exporting faceZones, check if a given face has to be included.
patchFaces
labelList patchFaces(const polyBoundaryMesh &patches, const wordList &names)
Definition: extrudeMesh.C:148
Foam::ensightMesh::patches_
const bool patches_
Output selected patches only.
Definition: ensightMesh.H:92
Foam::polyBoundaryMesh::names
wordList names() const
Return a list of patch names.
Definition: polyBoundaryMesh.C:527
Foam::cellSets::nTets
label nTets
Definition: cellSets.H:48
Foam::ensightMesh::uniquePointMap_
labelList uniquePointMap_
Local points that are unique.
Definition: ensightMesh.H:135
Foam::PackedList::setSize
void setSize(const label, const unsigned int &val=0u)
Alias for resize()
Definition: PackedListI.H:823
forAllConstIter
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Definition: pEqn.H:39
Foam::polyMesh::faceZones
const faceZoneMesh & faceZones() const
Return face zone mesh.
Definition: polyMesh.H:463
Foam::globalMeshData::mergePoints
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
Definition: globalMeshData.C:2374
nPoints
label nPoints
Definition: gmvOutputHeader.H:2
Foam::wordList
List< word > wordList
A List of words.
Definition: fileName.H:54
Foam::inplaceRenumber
void inplaceRenumber(const labelUList &oldToNew, ListType &)
Inplace renumber the values of a list.
Definition: ListOpsTemplates.C:57
Foam::primitiveMesh::nCells
label nCells() const
Definition: primitiveMeshI.H:64
PstreamCombineReduceOps.H
Combination-Reduction operation for a parallel run. The information from all nodes is collected on th...
Foam::ensightMesh::~ensightMesh
~ensightMesh()
Destructor.
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::polyBoundaryMesh::checkParallelSync
bool checkParallelSync(const bool report=false) const
Check whether all procs have all patches and in same order. Return.
Definition: polyBoundaryMesh.C:859
ensightMesh.H
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:43
Foam::ensightMesh::writeAllPrims
void writeAllPrims(const char *key, const label nPrims, const cellShapeList &cellShapes, ensightStream &ensightGeometryFile) const
cellModeller.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::HashTable::empty
bool empty() const
Return true if the hash table is empty.
Definition: HashTableI.H:72
faceId
label faceId(-1)
Foam::cellModeller::lookup
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or NULL.
Definition: cellModeller.C:91
argList.H
Foam::ensightMesh::map
cellShapeList map(const cellShapeList &cellShapes, const labelList &prims, const labelList &pointToGlobal) const
correct
fvOptions correct(rho)
Foam::cellList
List< cell > cellList
list of cells
Definition: cellList.H:42
Foam::ensightMesh::writePolysPoints
void writePolysPoints(const labelList &polys, const cellList &cellFaces, const faceList &faces, const labelList &faceOwner, ensightStream &ensightGeometryFile) const
IOmanip.H
Istream and Ostream manipulators taking arguments.
ensightAsciiStream.H
Foam::ensightMesh::writePrims
void writePrims(const cellShapeList &cellShapes, ensightStream &ensightGeometryFile) const
Foam::ensightMesh::writeAllFacePrims
void writeAllFacePrims(const char *key, const labelList &prims, const label nPrims, const faceList &patchFaces, ensightStream &ensightGeometryFile) const
Foam::ensightMesh::writeNSidedNPointsPerFace
void writeNSidedNPointsPerFace(const faceList &patchFaces, ensightStream &ensightGeometryFile) const
Foam::UPstream::masterNo
static int masterNo()
Process index of the master.
Definition: UPstream.H:393
Foam::ensightMesh::nPatchPrims_
HashTable< nFacePrimitives > nPatchPrims_
Definition: ensightMesh.H:113
Foam::cellSets::pyrs
labelList pyrs
Definition: cellSets.H:55
timeIndex
label timeIndex
Definition: getTimeIndex.H:4
Foam::cellSets::nPolys
label nPolys
Definition: cellSets.H:52
processorPolyPatch.H
Foam::HashTable::size
label size() const
Return number of elements in table.
Definition: HashTableI.H:65
Foam::primitiveMesh::nInternalFaces
label nInternalFaces() const
Definition: primitiveMeshI.H:52
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::ensightMesh::writeFacePrims
void writeFacePrims(const faceList &patchFaces, ensightStream &ensightGeometryFile) const
Foam::cellSets::nPrisms
label nPrisms
Definition: cellSets.H:50
Foam::HashTable::found
bool found(const Key &) const
Return true if hashedEntry is found in table.
Definition: HashTable.C:109
fvMesh.H
Foam::ensightMesh::pointToGlobal_
labelList pointToGlobal_
From mesh point to global merged point.
Definition: ensightMesh.H:132
Foam::ZoneMesh::findZoneID
label findZoneID(const word &zoneName) const
Find zone index given a name.
Definition: ZoneMesh.C:348
Foam::primitiveMesh::cellShapes
const cellShapeList & cellShapes() const
Return cell shapes.
Definition: primitiveMesh.C:230
Foam::cellSets::tets
labelList tets
Definition: cellSets.H:54
meshMoving
bool meshMoving
Definition: checkMeshMoving.H:3
Foam::ZoneMesh::names
wordList names() const
Return a list of zone names.
Definition: ZoneMesh.C:263
Foam::ensightMesh::boundaryFaceToBeIncluded_
PackedBoolList boundaryFaceToBeIncluded_
Per boundary face whether to include or not.
Definition: ensightMesh.H:123
Foam::ensightMesh::boundaryFaceSets_
List< faceSets > boundaryFaceSets_
Definition: ensightMesh.H:107
Foam::hex
IOstream & hex(IOstream &io)
Definition: IOstream.H:564
Foam::itoa
word itoa(const label n)
Foam::UPstream::master
static bool master(const label communicator=0)
Am I the master process.
Definition: UPstream.H:399
Foam::ensightMesh::ensightMesh
ensightMesh(const ensightMesh &)
Disallow default bitwise copy construct.
Foam::fvMesh::boundary
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Definition: fvMesh.C:550
Foam::List::setSize
void setSize(const label)
Reset size of List.
Foam::cellSets::wedges
labelList wedges
Definition: cellSets.H:57
Foam::findStrings
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
Definition: stringListOps.H:52
Foam::cellSets::polys
labelList polys
Definition: cellSets.H:59
Foam::polyMesh::faces
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1004
Foam::primitiveMesh::nFaces
label nFaces() const
Definition: primitiveMeshI.H:58
Foam::cellSets::hexes
labelList hexes
Definition: cellSets.H:58
Foam::ensightMesh::allPatchNames_
wordList allPatchNames_
Definition: ensightMesh.H:109
Foam::HashTable::clear
void clear()
Clear all entries from table.
Definition: HashTable.C:473
mapDistribute.H
f
labelList f(nPoints)
Foam::ensightMesh::patchNames_
wordHashSet patchNames_
Definition: ensightMesh.H:111
Foam::faceList
List< face > faceList
Definition: faceListFwd.H:43
Foam::List< cellShape >
Foam::cellSets::nPyrs
label nPyrs
Definition: cellSets.H:49
Foam::ensightMesh::patchPartOffset_
label patchPartOffset_
The ensight part id for the first patch.
Definition: ensightMesh.H:103
patchi
label patchi
Definition: getPatchFieldScalar.H:1
Foam::List::clear
void clear()
Clear the list, i.e. set size to zero.
Definition: List.C:379
Foam::PtrList::size
label size() const
Return the number of elements in the PtrList.
Definition: PtrListI.H:32
Foam::HashSet::insert
bool insert(const Key &key)
Insert a new entry.
Definition: HashSet.H:116
Foam::ensightMesh::faceZoneNames_
wordHashSet faceZoneNames_
Definition: ensightMesh.H:118
Foam::ensightMesh::patchPatterns_
const wordReList patchPatterns_
Definition: ensightMesh.H:93
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::ensightMesh::faceZonePatterns_
const wordReList faceZonePatterns_
Definition: ensightMesh.H:97
Foam::wordHashSet
HashSet wordHashSet
A HashSet with word keys.
Definition: HashSet.H:207
Foam::ensightMesh::writePolysNFaces
void writePolysNFaces(const labelList &polys, const cellList &cellFaces, ensightStream &ensightGeometryFile) const
stringListOps.H
Operations on lists of strings.
Foam::ensightMesh::faceZoneFaceSets_
List< faceSets > faceZoneFaceSets_
Definition: ensightMesh.H:116
patches
patches[0]
Definition: createSingleCellMesh.H:36
List
Definition: Test.C:19
Foam::ensightMesh::writeAllPolys
void writeAllPolys(const labelList &pointToGlobal, ensightStream &ensightGeometryFile) const
Foam::cellSets::nHexesWedges
label nHexesWedges
Definition: cellSets.H:51
Foam::sort
void sort(UList< T > &)
Definition: UList.C:107
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::polyMesh::globalData
const globalMeshData & globalData() const
Return parallel info.
Definition: polyMesh.C:1143
Foam::ensightMesh::writePolysNPointsPerFace
void writePolysNPointsPerFace(const labelList &polys, const cellList &cellFaces, const faceList &faces, ensightStream &ensightGeometryFile) const
Foam::ensightMesh::globalPointsPtr_
autoPtr< globalIndex > globalPointsPtr_
Global numbering for merged points.
Definition: ensightMesh.H:129
Foam::FOAMversion
const char *const FOAMversion
Foam::ensightMesh::faceZones_
const bool faceZones_
Output selected faceZones.
Definition: ensightMesh.H:96
Foam::ensightMesh::nFaceZonePrims_
HashTable< nFacePrimitives > nFaceZonePrims_
Definition: ensightMesh.H:120
Foam::ensightMesh::barrier
static void barrier()
Helper to cause barrier. Necessary on Quadrics.
Foam::PackedList::clear
void clear()
Clear the list, i.e. set addressable size to zero.
Definition: PackedListI.H:892
Foam::ensightMesh::noPatches_
const bool noPatches_
Suppress patches.
Definition: ensightMesh.H:89
Foam::cellSets::prisms
labelList prisms
Definition: cellSets.H:56