38 void Foam::ensightCells::writePolysConnectivity
42 const ensightCells& part,
49 const label nTotal = part.total(etype);
57 const IntRange<int> senders =
85 for (
const int proci : senders)
116 os.writeLabels(send);
119 for (
const int proci : senders)
124 os.writeLabels(recv);
155 for (
const int proci : senders)
194 void Foam::ensightCells::writeShapeConnectivity
197 const polyMesh&
mesh,
199 const ensightCells& part,
204 if (etype == ensightCells::elemType::NFACED)
207 <<
"Called for ensight NFACED cell. Programming error\n" 211 const label nTotal = part.total(etype);
220 const IntRange<int> senders =
245 for (
const int proci : senders)
269 const polyMesh&
mesh,
273 const ensightCells& part = *
this;
287 uniqueMeshPointLabels,
297 UIndirectList<point>(
mesh.
points(), uniqueMeshPointLabels),
306 if (etype == ensightCells::elemType::NFACED)
308 writePolysConnectivity
319 writeShapeConnectivity
339 const InfoProxy<ensightCells>& ip
342 const ensightCells& part = ip.t_;
344 os << part.
name().c_str();
351 <<
':' << part.total(etype);
virtual Ostream & write(const char c)
Write character.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static const manifoldCellsMeshObject & New(const polyMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
constexpr char nl
The newline '\n' character (0x0a)
const cellShapeList & cellShapes() const
Return cell shapes.
List< face > faceList
A List of faces.
static bool & parRun() noexcept
Test if this a parallel run.
labelList getPolysNPointsPerFace(const polyMesh &mesh, const labelUList &addr)
The number of points for each face of the poly elements.
UList< label > labelUList
A UList of labels.
virtual const pointField & points() const
Return raw points.
void inplaceRenumber(const labelUList &oldToNew, IntListType &lists)
Inplace renumber the values (not the indices) of a list of lists.
List< cellShape > cellShapeList
List of cellShapes and PtrList of List of cellShape.
"scheduled" : (MPI_Send, MPI_Recv)
static constexpr int masterNo() noexcept
Process index of the master (always 0)
elemType
Supported ensight 'Cell' element types.
virtual void write(ensightGeoFile &os, const polyMesh &mesh, bool parallel) const
Write geometry, using a mesh reference (serial only)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writePolysPoints(ensightGeoFile &os, const cellUList &meshCells, const labelUList &addr, const faceUList &meshFaces, const labelUList &faceOwner)
Write the point ids per poly element.
OBJstream os(runTime.globalPath()/outputName)
virtual const fileName & name() const
Read/write access to the name of the stream.
static const char * key(const elemType etype) noexcept
The ensight element name for the specified 'Cell' type.
labelList getPolysNFaces(const polyMesh &mesh, const labelUList &addr)
The number of faces per poly element.
static bool master(const label communicator=worldComm)
Am I the master rank.
static const char * elemNames[nTypes]
The ensight 'Cell' element type names.
static rangeType subProcs(const label communicator=worldComm)
Range of process indices for sub-processes.
List< label > labelList
A List of labels.
List< cell > cellList
A List of cells.
const cellList & cells() const
Return the (optionally compacted) cell list Triggers demand-driven filtering if required.
bool writeCoordinates(ensightGeoFile &os, const label partId, const word &partName, const label nPoints, const FieldContainer< Foam::point > &fld, bool parallel)
Write coordinates (component-wise) for the given part.
void writeCellShapes(ensightGeoFile &os, const UList< cellShape > &shapes, const label pointOffset=0)
Write cell connectivity via cell shapes.
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
static constexpr int nTypes
Number of 'Cell' element types (5)