45#ifndef Foam_ensightOutputSurface_H
46#define Foam_ensightOutputSurface_H
91 const string& description =
"surface"
111 const bool isPointData =
false
139 #include "ensightOutputSurface.txx"
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
ensightFaces()
Default construct, with part index 0.
A variant of OFstream with specialised handling for Ensight writing of strings, integers and floats (...
A variant of ensightFile (Ensight writing) that includes the extra geometry file header information.
void writePointData(ensightFile &os, const Field< Type > &fld) const
Write a field of point values (serial-only).
virtual ~ensightOutputSurface()=default
Destructor.
ensightOutputSurface(const ensightOutputSurface &)=delete
No copy construct.
void writeFaceData(ensightFile &os, const Field< Type > &fld) const
Write a field of face values (serial-only).
void operator=(const ensightOutputSurface &)=delete
No copy assignment.
void writeData(ensightFile &os, const Field< Type > &fld, const bool isPointData=false) const
Write a field of face or point values (serial-only).
virtual void write(ensightGeoFile &, const polyMesh &, bool) const
Cannot write geometry with a mesh reference. No beginGeometry() marker.
Mesh consisting of general polyhedral cells.
OBJstream os(runTime.globalPath()/outputName)
List< face > faceList
List of faces.
vectorField pointField
pointField is a vectorField.