47 auto outIter = list.
begin();
49 for (
const face&
f : faces)
66 auto outIter = list.
begin();
68 for (
const face&
f : faces)
85 const cellList& meshCells = manifoldCellsMeshObject::New(
mesh).cells();
89 auto outIter = list.
begin();
92 for (
const label
cellId : addr)
109 const cellList& meshCells = manifoldCellsMeshObject::New(
mesh).cells();
115 for (
const label
cellId : addr)
122 auto outIter = list.
begin();
125 for (
const label
cellId : addr)
127 for (
const label facei : meshCells[
cellId])
129 *outIter = meshFaces[facei].
size();
143 const label pointOffset
146 const label off = (pointOffset + 1);
148 const label nLists = (offsets.
size() - 1);
150 for (label i = 0; i < nLists; ++i)
154 values.slice(offsets[i], (offsets[i+i] - offsets[i]))
156 for (
const label pointi : list)
158 os.write(pointi + off);
169 const label pointOffset
172 ensightOutput::Detail::writeLabelListList(
os, faces, pointOffset);
180 const label pointOffset
183 ensightOutput::Detail::writeLabelListList(
os, faces, pointOffset);
191 const label pointOffset
194 ensightOutput::Detail::writeLabelListList(
os, faces, pointOffset);
202 const label pointOffset
205 ensightOutput::Detail::writeLabelListList(
os, shapes, pointOffset);
218 const cellList& meshCells = manifoldCellsMeshObject::New(
mesh).cells();
228 for (
const label
cellId : addr)
246 for (
const label
cellId : addr)
260 for (label pti =
f.size()-1; pti > 0; --pti)
262 verts[
nPoints++] = pointMap[
f[pti]];
267 for (
const label pointi :
f)
269 verts[
nPoints++] = pointMap[pointi];
294 const cellList& meshCells = manifoldCellsMeshObject::New(
mesh).cells();
298 const label off = (1);
300 for (
const label
cellId : addr)
311 os.write(pointMap[
f[0]] + off);
312 for (label pti =
f.size()-1; pti > 0; --pti)
314 os.write(pointMap[
f[pti]] + off);
319 for (
const label pointi :
f)
321 os.write(pointMap[pointi] + off);
340 const label off = (1);
342 for (
const label
cellId : addr)
353 os.write(
f[0] + off);
354 for (label pti =
f.size()-1; pti > 0; --pti)
356 os.write(
f[pti] + off);
361 for (
const label pointi :
f)
363 os.write(pointi + off);
387 parallel = parallel && Pstream::parRun();
392 ? Pstream::subProcs()
396 if (Pstream::master())
398 os.writeKeyword(ensightFaces::key(etype));
403 if (etype == ensightFaces::NSIDED)
407 labelList send(ensightOutput::Detail::getFaceSizes(faces));
409 if (Pstream::master())
412 os.writeLabels(send);
415 for (
const int proci : senders)
417 IPstream fromOther(Pstream::commsTypes::scheduled, proci);
420 os.writeLabels(recv);
427 Pstream::commsTypes::scheduled,
437 if (Pstream::master())
443 for (
const int proci : senders)
445 IPstream fromOther(Pstream::commsTypes::scheduled, proci);
455 Pstream::commsTypes::scheduled,
478 parallel = parallel && Pstream::parRun();
483 ? Pstream::subProcs()
488 if (Pstream::master())
490 os.writeKeyword(ensightFaces::key(etype));
495 if (etype == ensightFaces::NSIDED)
499 labelList send(ensightOutput::Detail::getFaceSizes(faces));
501 if (Pstream::master())
504 os.writeLabels(send);
507 for (
const int proci : senders)
509 IPstream fromOther(Pstream::commsTypes::scheduled, proci);
512 os.writeLabels(recv);
519 Pstream::commsTypes::scheduled,
530 if (Pstream::master())
536 for (
const int proci : senders)
538 IPstream fromOther(Pstream::commsTypes::scheduled, proci);
548 Pstream::commsTypes::scheduled,
565 for (label typei=0; typei < ensightFaces::nTypes; ++typei)
589 for (label typei=0; typei < ensightFaces::nTypes; ++typei)
Various functions to operate on Lists.
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
const List< T > & values() const noexcept
Return the packed matrix of values.
const labelList & offsets() const noexcept
Return the offset table (= size()+1)
Input inter-processor communications stream.
label size() const noexcept
The number of elements in the list.
An interval of (signed) integers defined by a start and a size.
Output inter-processor communications stream.
A List obtained as a section of another List.
A List with indirect addressing. Like IndirectList but does not store addressing.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
iterator begin() noexcept
Return an iterator to begin traversing the UList.
void size(const label n)
Older name for setAddressableSize.
Sorting/classification of faces (2D) into corresponding ensight types.
labelRange range(const elemType etype) const
Processor-local offset/size of element type.
const labelList & faceIds() const noexcept
Processor-local face ids of all elements.
elemType
Supported ensight 'Face' element types.
label total() const
The global size of all element types.
Specialized Ensight output with extra geometry file header.
A face is a list of labels corresponding to mesh vertices.
Mesh consisting of general polyhedral cells.
OBJstream os(runTime.globalPath()/outputName)
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
labelList getFaceSizes(const UList< face > &faces)
Return sizes of faces in the list.
labelList getPolysNPointsPerFace(const polyMesh &mesh, const labelUList &addr)
The number of points for each face of the poly elements.
labelList getPolysNFaces(const polyMesh &mesh, const labelUList &addr)
The number of faces per poly element.
CompactListList< label > getPolysFacePoints(const polyMesh &mesh, const labelUList &addr, const labelList &pointMap)
Generate 0-based point ids for each poly element face.
void writeLabelListList(ensightGeoFile &os, const labelUList &offsets, const labelUList &values, const label pointOffset)
Write CompactListList<label> by components.
void writePolysPoints(ensightGeoFile &os, const cellUList &meshCells, const labelUList &addr, const faceUList &meshFaces, const labelUList &faceOwner)
Write the point ids per poly element.
void writeFaceConnectivityPresorted(ensightGeoFile &os, const ensightFaces &part, const faceUList &faces, bool parallel)
Write the presorted face connectivity for the part.
void writeFaceConnectivity(ensightGeoFile &os, const ensightFaces::elemType etype, const label nTotal, const UIndirectList< face > &faces, bool parallel)
void writeCellShapes(ensightGeoFile &os, const UList< cellShape > &shapes, const label pointOffset=0)
Write cell connectivity via cell shapes.
void writeFaceList(ensightGeoFile &os, const UList< face > &faces, const label pointOffset=0)
Write list of faces.