40 void Foam::ensightCells::writePolysConnectivity
44 const ensightCells& part,
51 const label nTotal = part.total(etype);
59 const IntRange<int> senders =
87 for (
const int proci : senders)
118 os.writeLabels(send);
121 for (
const int proci : senders)
126 os.writeLabels(recv);
157 for (
const int proci : senders)
196 void Foam::ensightCells::writeShapeConnectivity
199 const polyMesh&
mesh,
201 const ensightCells& part,
206 if (etype == ensightCells::elemType::NFACED)
209 <<
"Called for ensight NFACED cell. Programming error\n" 213 const label nTotal = part.total(etype);
222 const IntRange<int> senders =
247 for (
const int proci : senders)
271 const polyMesh&
mesh,
275 const ensightCells& part = *
this;
289 uniqueMeshPointLabels,
299 UIndirectList<point>(
mesh.
points(), uniqueMeshPointLabels),
308 if (etype == ensightCells::elemType::NFACED)
310 writePolysConnectivity
321 writeShapeConnectivity
339 const label partIndex,
379 const InfoProxy<ensightCells>& iproxy
382 const auto& part = *iproxy;
384 os << part.
name().c_str();
391 <<
':' << part.total(etype);
List< cell > cellList
List of cell.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual Ostream & write(const char c) override
Write character.
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.
virtual const fileName & name() const override
Read/write access to the name of the stream.
static const manifoldCellsMeshObject & New(const polyMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
constexpr char nl
The newline '\n' character (0x0a)
const cellShapeList & cellShapes() const
Return cell shapes.
static bool & parRun() noexcept
Test if this a parallel run.
List< cellShape > cellShapeList
List of cellShape.
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< face > faceList
List of faces.
static void writeBox(ensightGeoFile &os, const boundBox &bb, const label partIndex=0, const word &partName="geometry-box")
Write bounding box geometry. All parameters are only relevant on master No beginGeometry() marker...
vectorField pointField
pointField is a vectorField.
"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
static constexpr int masterNo() noexcept
Relative rank for the master process - is 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) No beginGeometry() marker.
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)
static const char * key(const elemType etype) noexcept
The ensight element name for the specified 'Cell' type.
T & emplace_back(Args &&... args)
Construct an element at the end of the list, return reference to the new list element.
labelList getPolysNFaces(const polyMesh &mesh, const labelUList &addr)
The number of faces per poly element.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
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.
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)