Go to the documentation of this file.
58 tfld().rename(vf.name());
78 >::DimensionedInternalField& df
96 tvf().internalField() = df;
97 tvf().correctBoundaryConditions();
107 tfld().rename(vf.name());
166 mf[i + offset] = vf[map2[i]];
187 for (
direction i=0; i < pTraits<Type>::nComponents; ++i)
203 for (
direction i=0; i < pTraits<Type>::nComponents; ++i)
220 const label ensightPatchI,
266 const word& fieldName,
268 const word& patchName,
290 if (allPatchNames[i] == patchName)
299 word pfName = patchName +
'.' + fieldName;
308 ensightCaseFile.
setf(ios_base::left);
312 <<
" per element: 1 "
313 <<
setw(15) << pfName
314 << (
' ' + prepend +
"****." + pfName).c_str()
319 fileName ensightFileName(timeFile +
"." + pfName);
325 postProcPath/ensightFileName,
333 postProcPath/ensightFileName,
354 nPatchPrims.
find(patchName)(),
368 nPatchPrims.
find(patchName)(),
375 delete ensightFilePtr;
392 Info<<
"Converting field " << vf.name() <<
endl;
421 fileName ensightFileName(timeFile +
"." + vf.name());
427 postProcPath/ensightFileName,
435 postProcPath/ensightFileName,
447 ensightCaseFile.
setf(ios_base::left);
451 <<
" per element: 1 "
452 <<
setw(15) << vf.name()
453 << (
' ' + prepend +
"****." + vf.name()).c_str()
472 map(vf, hexes, wedges),
509 const word& patchName = allPatchNames[
patchi];
523 nPatchPrims.
find(patchName)(),
534 if (faceZoneNames.
size())
545 const word& faceZoneName = iter.key();
572 values[j] =
sf[faceI];
596 faceZoneFaceSets[zoneID],
597 nFaceZonePrims.
find(faceZoneName)(),
608 delete ensightFilePtr;
614 void ensightPointField
625 Info<<
"Converting field " << pf.name() <<
endl;
639 fileName ensightFileName(timeFile +
"." + pf.name());
645 postProcPath/ensightFileName,
653 postProcPath/ensightFileName,
665 ensightCaseFile.
setf(ios_base::left);
670 <<
setw(15) << pf.name()
671 << (
' ' + prepend +
"****." + pf.name()).c_str()
700 const word& patchName = allPatchNames[
patchi];
719 p.patch().meshPoints(),
720 p.patch().meshPointMap(),
722 uniqueMeshPointLabels
743 if (faceZoneNames.
size())
747 const word& faceZoneName = iter.key();
766 uniqueMeshPointLabels
780 uniqueMeshPointLabels
792 delete ensightFilePtr;
806 const bool nodeValues,
816 pfld().rename(vf.name());
818 ensightPointField<Type>
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
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.
Abstract base class for writing Ensight data.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const wordHashSet & faceZoneNames() const
A class for handling words, derived from string.
A class for handling file names.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
Post-processing mesh subset tool. Given the original mesh and the list of selected cells,...
Output inter-processor communications stream.
Mesh data needed to do the Finite Volume discretisation.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const List< faceSets > & faceZoneFaceSets() const
const fvMesh & mesh() const
bool faceToBeIncluded(const label faceI) const
When exporting faceZones, check if a given face has to be included.
A HashTable with keys but without contents.
static const volPointInterpolation & New(const fvMesh &mesh)
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
const HashTable< nFacePrimitives > & nFaceZonePrims() const
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const faceZoneMesh & faceZones() const
Return face zone mesh.
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
Conversion of OpenFOAM pTraits into the Ensight equivalent.
const wordHashSet & patchNames() 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.
A subset of mesh faces organised as a primitive patch.
bool empty() const
Return true if the hash table is empty.
A patch is a list of labels that address the faces in the global face list.
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)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Istream and Ostream manipulators taking arguments.
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
InternalField & internalField()
Return internal field.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
wordList patchNames(nPatches)
const List< faceSets > & boundaryFaceSets() const
static int masterNo()
Process index of the master.
label size() const
Return number of elements in table.
label patchPartOffset() const
The ensight part id for the first patch.
Mesh data needed to do the Finite Volume discretisation.
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
volScalarField sf(fieldObject, mesh)
Omanip< int > setw(const int i)
label findZoneID(const word &zoneName) const
Find zone index given a name.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
tmp< GeometricField< Type, pointPatchField, pointMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
Interpolate volField using inverse distance weighting.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
static bool master(const label communicator=0)
Am I the master process.
An STL-conforming hash table.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
label whichFace(const label l) const
Return label of face in patch from global face label.
const cellSets & meshCellSets() const
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
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)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const wordList & allPatchNames() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
const Time & time() const
Return the top-level database.
Input inter-processor communications stream.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const globalMeshData & globalData() const
Return parallel info.
const HashTable< nFacePrimitives > & nPatchPrims() const
Generic GeometricField class.
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.
bool hasSubMesh() const
Have subMesh?
static void barrier()
Helper to cause barrier. Necessary on Quadrics.
const labelList & uniquePointMap() const
Local points that are unique.