Loading...
Searching...
No Matches
gnuplotCoordSetWriter.C File Reference
Include dependency graph for gnuplotCoordSetWriter.C:

Go to the source code of this file.

Namespaces

namespace  Foam
 Namespace for OpenFOAM.
namespace  Foam::coordSetWriters

Macros

#define doLocalCode(Type)
#define doLocalCode(Type)

Functions

 defineTypeName (gnuplotWriter)
 addToRunTimeSelectionTable (coordSetWriter, gnuplotWriter, word)
 addToRunTimeSelectionTable (coordSetWriter, gnuplotWriter, wordDict)
 defineCoordSetWriterWriteFields (Foam::coordSetWriters::gnuplotWriter)

Detailed Description

Original source file gnuplotCoordSetWriter.C

Definition in file gnuplotCoordSetWriter.C.

Macro Definition Documentation

◆ doLocalCode [1/2]

#define doLocalCode ( Type)
Value:
for (const word& fldName : Type##Names_) \
{ \
os << (nplots++ ? ", \\" : "plot \\") << nl; \
os << " '-' title \"" << fldName << "\" with lines"; \
}
OBJstream os(runTime.globalPath()/outputName)

◆ doLocalCode [2/2]

#define doLocalCode ( Type)
Value:
for (const Field<Type>& fld : Type##Fields_) \
{ \
writeTable(os, coords_[0], fld, " \t"); \
os << "end_data" << nl << nl; \
}
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))

Function Documentation

◆ defineCoordSetWriterWriteFields()

defineCoordSetWriterWriteFields ( Foam::coordSetWriters::gnuplotWriter )