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++)
136 const label ensightPatchi,
182 const word& fieldName,
184 const word& patchName,
188 const label timeIndex,
206 if (allPatchNames[i] == patchName)
215 word pfName = patchName +
'.' + fieldName;
217 word timeFile = prepend +
itoa(timeIndex);
224 ensightCaseFile.
setf(ios_base::left);
228 <<
" per element: 1 " 229 <<
setw(15) << pfName
230 << (
' ' + prepend +
"****." + pfName).c_str()
235 fileName ensightFileName(timeFile +
"." + pfName);
241 postProcPath/ensightFileName,
249 postProcPath/ensightFileName,
269 boundaryFaceSets[patchi],
270 nPatchPrims.
find(patchName)(),
284 nPatchPrims.
find(patchName)(),
291 delete ensightFilePtr;
303 const label timeIndex,
310 word timeFile = prepend +
itoa(timeIndex);
343 postProcPath/ensightFileName,
351 postProcPath/ensightFileName,
363 ensightCaseFile.
setf(ios_base::left);
367 <<
" per element: 1 " 369 << (
' ' + prepend +
"****." + vf.
name()).c_str()
376 if (patchNames.
empty())
388 map(vf, hexes, wedges),
423 forAll(allPatchNames, patchi)
425 const word& patchName = allPatchNames[
patchi];
429 if (patchNames.
empty() || patchNames.
found(patchName))
439 nPatchPrims.
find(patchName)(),
450 if (faceZoneNames.
size())
461 const word& faceZoneName = iter.key();
488 values[j] =
sf[facei];
512 faceZoneFaceSets[zoneID],
513 nFaceZonePrims.
find(faceZoneName)(),
524 delete ensightFilePtr;
530 void ensightPointField
536 const label timeIndex,
543 word timeFile = prepend +
itoa(timeIndex);
561 postProcPath/ensightFileName,
569 postProcPath/ensightFileName,
581 ensightCaseFile.
setf(ios_base::left);
587 << (
' ' + prepend +
"****." + pf.
name()).c_str()
600 ensightFile.writePartHeader(1);
614 forAll(allPatchNames, patchi)
616 const word& patchName = allPatchNames[
patchi];
620 if (patchNames.
empty() || patchNames.
found(patchName))
638 uniqueMeshPointLabels
643 ensightFile.writePartHeader(ensightPatchi);
659 if (faceZoneNames.
size())
663 const word& faceZoneName = iter.key();
682 uniqueMeshPointLabels
687 ensightFile.writePartHeader(ensightPatchi);
696 uniqueMeshPointLabels
708 delete ensightFilePtr;
720 const label timeIndex,
722 const bool nodeValues,
734 ensightPointField<Type>
A HashTable with keys but without contents.
#define forAll(list, i)
Loop across all elements in list.
const List< faceSets > & faceZoneFaceSets() const
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 cellSets & meshCellSets() const
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
A class for handling file names.
label whichFace(const label l) const
Return label of face in patch from global face label.
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)
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
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 faceToBeIncluded(const label facei) const
When exporting faceZones, check if a given face has to be included.
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 labelList & uniquePointMap() const
Local points that are unique.
const Map< label > & meshPointMap() const
Mesh point map. Given the global point index find its.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Generic GeometricField class.
label size() const
Return number of elements in table.
Abstract base class for writing Ensight data.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const polyPatch & patch() const
Return the polyPatch.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const HashTable< nFacePrimitives > & nFaceZonePrims() const
static const volPointInterpolation & New(const fvMesh &mesh)
Input inter-processor communications stream.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
label findZoneID(const word &zoneName) const
Find zone index given a name.
Conversion of OpenFOAM pTraits into the Ensight equivalent.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
label patchPartOffset() const
The ensight part id for the first patch.
Pre-declare SubField and related Field type.
const List< faceSets > & boundaryFaceSets() const
A class for handling words, derived from string.
const HashTable< nFacePrimitives > & nPatchPrims() const
virtual label size() const
Return size.
const wordHashSet & faceZoneNames() const
bool hasSubMesh() const
Have subMesh?
An STL-conforming hash table.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool empty() const
Return true if the hash table is empty.
bool found(const Key &) const
Return true if hashedEntry is found in table.
const globalMeshData & globalData() const
Return parallel info.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Istream and Ostream manipulators taking arguments.
const fvMesh & mesh() const
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
static void barrier()
Helper to cause barrier. Necessary on Quadrics.
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 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 Mesh & mesh() const
Return mesh.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Mesh data needed to do the Finite Volume discretisation.
const wordHashSet & patchNames() const
const wordList & allPatchNames() const
const faceZoneMesh & faceZones() const
Return face zone mesh.
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.
T & ref() const
Return non-const reference or generate a fatal error.
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.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const word & name() const
Return name.
const Time & time() const
Return the top-level database.