56 tfld.ref().checkOut();
57 tfld.ref().rename(vf.
name());
86 mf[i +
offset] = vf[map2[i]];
107 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
121 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
140 const label ensightPatchi,
186 const word& fieldName,
188 const word& patchName,
210 if (allPatchNames[i] == patchName)
219 word pfName = patchName +
'.' + fieldName;
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,
274 nPatchPrims.
find(patchName)(),
288 nPatchPrims.
find(patchName)(),
295 delete ensightFilePtr;
347 postProcPath/ensightFileName,
355 postProcPath/ensightFileName,
367 ensightCaseFile.
setf(ios_base::left);
371 <<
" per element: 1 "
373 << (
' ' + prepend +
"****." + vf.
name()).c_str()
392 map(vf, hexes, wedges),
429 const word& patchName = allPatchNames[
patchi];
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
565 postProcPath/ensightFileName,
573 postProcPath/ensightFileName,
585 ensightCaseFile.
setf(ios_base::left);
591 << (
' ' + prepend +
"****." + pf.
name()).c_str()
620 const word& patchName = allPatchNames[
patchi];
639 p.patch().meshPoints(),
640 p.patch().meshPointMap(),
642 uniqueMeshPointLabels
663 if (faceZoneNames.
size())
667 const word& faceZoneName = iter.key();
686 uniqueMeshPointLabels
700 uniqueMeshPointLabels
712 delete ensightFilePtr;
726 const bool nodeValues,
736 pfld.ref().rename(vf.
name());
738 ensightPointField<Type>
Istream and Ostream manipulators taking arguments.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static volPointInterpolation & New(const word &name, const fvMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
const Mesh & mesh() const
Return mesh.
Pre-declare SubField and related Field type.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
Generic GeometricField class.
const Internal::FieldType & primitiveField() const
Return a const-reference to the primitive field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A HashTable with keys but without contents.
An STL-conforming hash table.
label size() const
Return number of elements in table.
bool empty() const
Return true if the hash table is empty.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
const word & name() const
Return name.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
Input inter-processor communications stream.
void size(const label)
Override size to be inconsistent with allocated storage.
Output inter-processor communications stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label nPoints() const
Return number of points supporting patch faces.
const Map< label > & meshPointMap() const
Mesh point map. Given the global point index find its.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
label findIndex(const word &key) const
Return the index of the given the key or -1 if not found.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
static int masterNo()
Process index of the master.
static bool master(const label communicator=0)
Am I the master process.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Ensight output with specialised write() for strings, integers and floats. Correctly handles binary wr...
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
const HashTable< nFacePrimitives > & nFaceZonePrims() const
static void barrier()
Helper to cause barrier. Necessary on Quadrics.
const labelList & uniquePointMap() const
Local points that are unique.
const List< faceSets > & boundaryFaceSets() const
const fvMesh & mesh() const
const wordHashSet & faceZoneNames() const
const List< faceSets > & faceZoneFaceSets() const
const HashTable< nFacePrimitives > & nPatchPrims() const
const wordList & allPatchNames() const
label patchPartOffset() const
The ensight part id for the first patch.
const wordHashSet & patchNames() const
bool faceToBeIncluded(const label facei) const
When exporting faceZones, check if a given face has to be included.
const cellSets & meshCellSets() const
Conversion of OpenFOAM pTraits into the Ensight equivalent.
Abstract base class for writing Ensight data.
A subset of mesh faces organised as a primitive patch.
const primitiveFacePatch & patch() const
Return reference to primitive patch.
A class for handling file names.
Post-processing mesh subset tool. Given the original mesh and the list of selected cells,...
bool hasSubMesh() const
Have subMesh?
static tmp< VolField< Type > > interpolate(const VolField< Type > &, const fvMesh &sMesh, const labelList &patchMap, const labelList &cellMap, const labelList &faceMap)
Map volume field.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
const globalMeshData & globalData() const
Return parallel info.
const faceZoneList & faceZones() const
Return face zones.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
label whichFace(const label l) const
Return label of face in patch from global face label.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
A class for managing temporary objects.
tmp< PointField< Type > > interpolate(const VolField< Type > &) const
Interpolate volField using inverse distance weighting.
A class for handling words, derived from string.
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)
Foam::tmp< Foam::VolField< Type > > volField(const Foam::fvMeshSubset &, const Foam::VolField< Type > &vf)
Wrapper to get hold of the field or the subsetted field.
void ensightField(const Foam::VolField< Type > &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)
volScalarField sf(fieldObject, mesh)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Omanip< int > setw(const int i)
tmp< SurfaceField< Type > > linearInterpolate(const VolField< Type > &vf)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
void offset(label &lst, const label o)
wordList patchNames(nPatches)