35#ifndef foamToVtkReportFields_H
36#define foamToVtkReportFields_H
56 template<
class GeoField>
67 for (
const GeoField&
fld : flds)
83 if (fieldNames.size())
86 for (
const word& fieldName : fieldNames)
88 os <<
' ' << fieldName;
95 template<
class FieldType>
100 const IOobjectList& objects
103 print(msg,
os, objects.sortedNames<FieldType>());
112 " volScalar :",
os, objects
116 " volVector :",
os, objects
120 " volSphTensor :",
os, objects
124 " volSymTensor :",
os, objects
128 " volTensor :",
os, objects
138 " volScalar:Internal :",
os, objects
142 " volVector:Internal :",
os, objects
146 " volSphTensor:Internal :",
os, objects
150 " volSymTensor:Internal :",
os, objects
154 " volTensor:Internal :",
os, objects
170 " areaScalar :",
os, objects
174 " areaVector :",
os, objects
178 " areaSphTensor :",
os, objects
182 " areaSymTensor :",
os, objects
186 " areaTensor :",
os, objects
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))
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
wordList sortedNames() const
The sorted names of the IOobjects.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void size(const label n)
Older name for setAddressableSize.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
label size() const noexcept
The number of entries in the list.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
List< word > wordList
List of word.
Ostream & endl(Ostream &os)
Add newline and flush stream.
vector point
Point is a vector.
Collection of simple static methods for reporting field names by category, which is used by foamToVTK...
static void point(Ostream &os, const IOobjectList &objects)
Supported point field types.
static void area(Ostream &os, const IOobjectList &objects)
Supported area field types.
static void internal(Ostream &os, const IOobjectList &objects)
Supported dimensioned field types.
static void volume(Ostream &os, const IOobjectList &objects)
Supported volume field types.
static void print(const char *msg, Ostream &os, const IOobjectList &objects)
static void print(const char *msg, Ostream &os, const UPtrList< const GeoField > &flds)
static void print(const char *msg, Ostream &os, const wordList &fieldNames)