56 tfld.
ref().checkOut();
57 tfld.ref().rename(vf.
name());
86 mf[i + offset] = vf[map2[i]];
105 ensightFile.
write(key);
107 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
115 ensightFile.
write(slaveData);
121 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
140 const label ensightPatchi,
186 const word& fieldName,
188 const word& patchName,
192 const label timeIndex,
210 if (allPatchNames[i] == patchName)
219 word pfName = patchName +
'.' + fieldName;
221 word timeFile = prepend +
itoa(timeIndex);
228 ensightCaseFile.
setf(ios_base::left);
232 <<
" per element: 1 " 233 <<
setw(15) << pfName
234 << (
' ' + prepend +
"****." + pfName).c_str()
239 fileName ensightFileName(timeFile +
"." + pfName);
245 postProcPath/ensightFileName,
253 postProcPath/ensightFileName,
273 boundaryFaceSets[patchi],
274 nPatchPrims.
find(patchName)(),
288 nPatchPrims.
find(patchName)(),
295 delete ensightFilePtr;
307 const label timeIndex,
314 word timeFile = prepend +
itoa(timeIndex);
347 postProcPath/ensightFileName,
355 postProcPath/ensightFileName,
367 ensightCaseFile.
setf(ios_base::left);
371 <<
" per element: 1 " 373 << (
' ' + prepend +
"****." + vf.
name()).c_str()
380 if (patchNames.
empty())
392 map(vf, hexes, wedges),
427 forAll(allPatchNames, patchi)
429 const word& patchName = allPatchNames[
patchi];
433 if (patchNames.
empty() || patchNames.
found(patchName))
443 nPatchPrims.
find(patchName)(),
454 if (faceZoneNames.
size())
465 const word& faceZoneName = iter.key();
492 values[j] =
sf[facei];
516 faceZoneFaceSets[zoneID],
517 nFaceZonePrims.
find(faceZoneName)(),
528 delete ensightFilePtr;
534 void ensightPointField
540 const label timeIndex,
547 word timeFile = prepend +
itoa(timeIndex);
565 postProcPath/ensightFileName,
573 postProcPath/ensightFileName,
585 ensightCaseFile.
setf(ios_base::left);
591 << (
' ' + prepend +
"****." + pf.
name()).c_str()
604 ensightFile.writePartHeader(1);
618 forAll(allPatchNames, patchi)
620 const word& patchName = allPatchNames[
patchi];
624 if (patchNames.
empty() || patchNames.
found(patchName))
642 uniqueMeshPointLabels
647 ensightFile.writePartHeader(ensightPatchi);
663 if (faceZoneNames.
size())
667 const word& faceZoneName = iter.key();
686 uniqueMeshPointLabels
691 ensightFile.writePartHeader(ensightPatchi);
700 uniqueMeshPointLabels
712 delete ensightFilePtr;
724 const label timeIndex,
726 const bool nodeValues,
738 ensightPointField<Type>
const HashTable< nFacePrimitives > & nPatchPrims() const
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A HashTable with keys but without contents.
label findZoneID(const word &zoneName) const
Find zone index given a name.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static int masterNo()
Process index of the master.
const word & name() const
Return name.
A class for handling file names.
void ensightField(const Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > &vf, const Foam::ensightMesh &eMesh, const Foam::fileName &postProcPath, const Foam::word &prepend, const Foam::label timeIndex, const bool binary, const bool nodeValues, Foam::Ostream &ensightCaseFile)
const wordHashSet & faceZoneNames() const
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
label patchPartOffset() const
The ensight part id for the first patch.
T & ref() const
Return non-const reference or generate a fatal error.
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > volField(const Foam::fvMeshSubset &, const Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > &vf)
Wrapper to get hold of the field or the subsetted field.
void size(const label)
Override size to be inconsistent with allocated storage.
bool empty() const
Return true if the hash table is empty.
const labelList & uniquePointMap() const
Local points that are unique.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void write(const char *)=0
static bool master(const label communicator=0)
Am I the master process.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Generic GeometricField class.
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
Abstract base class for writing Ensight data.
const Time & time() const
Return the top-level database.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
label size() const
Return number of elements in table.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
Input inter-processor communications stream.
const cellSets & meshCellSets() const
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
const Map< label > & meshPointMap() const
Mesh point map. Given the global point index find its.
Conversion of OpenFOAM pTraits into the Ensight equivalent.
const List< faceSets > & boundaryFaceSets() const
bool found(const Key &) const
Return true if hashedEntry is found in table.
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
const polyPatch & patch() const
Return the polyPatch.
const wordHashSet & patchNames() const
const fvMesh & mesh() const
const globalMeshData & globalData() const
Return parallel info.
An STL-conforming hash table.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
virtual label size() const
Return size.
const HashTable< nFacePrimitives > & nFaceZonePrims() const
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Istream and Ostream manipulators taking arguments.
const Mesh & mesh() const
Return mesh.
const wordList & allPatchNames() const
static void barrier()
Helper to cause barrier. Necessary on Quadrics.
static volPointInterpolation & New(fvMesh &mesh)
Post-processing mesh subset tool. Given the original mesh and the list of selected cells...
Output inter-processor communications stream.
volScalarField sf(fieldObject, mesh)
static tmp< GeometricField< Type, fvPatchField, volMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &, const fvMesh &sMesh, const labelList &patchMap, const labelList &cellMap, const labelList &faceMap)
Map volume field.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
void writePatchField(const Foam::word &fieldName, const Foam::Field< Type > &pf, const Foam::word &patchName, const Foam::ensightMesh &eMesh, const Foam::fileName &postProcPath, const Foam::word &prepend, const Foam::label timeIndex, Foam::Ostream &ensightCaseFile)
const meshFaceZones & faceZones() const
Return face zones.
Mesh data needed to do the Finite Volume discretisation.
const List< faceSets > & faceZoneFaceSets() const
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Omanip< int > setw(const int i)
A subset of mesh faces organised as a primitive patch.
virtual void writePartHeader(const label)=0
A class for managing temporary objects.
A patch is a list of labels that address the faces in the global face list.
bool faceToBeIncluded(const label facei) const
When exporting faceZones, check if a given face has to be included.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
bool hasSubMesh() const
Have subMesh?
label whichFace(const label l) const
Return label of face in patch from global face label.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.