37void Foam::patchProbes::writeValues
39 const word& fieldName,
40 const Field<Type>& values,
41 const scalar timeValue
49 os <<
setw(w) << timeValue;
51 for (
const auto& v : values)
60template<
class GeoField>
61void Foam::patchProbes::performAction
63 const fieldGroup<GeoField>& fieldNames,
67 for (
const word& fieldName : fieldNames)
69 tmp<GeoField> tfield = getOrLoadField<GeoField>(fieldName);
73 const auto&
field = tfield();
74 const scalar timeValue =
field.time().timeOutputValue();
78 this->storeResults(fieldName, values);
79 if (request & ACTION_WRITE)
81 this->writeValues(fieldName, values, timeValue);
97 auto& values = tvalues.ref();
104 label facei = faceList_[probei];
109 label localFacei =
patches[patchi].whichFace(facei);
110 values[probei] = bField[patchi][localFacei];
127 auto& values = tvalues.ref();
134 label facei = faceList_[probei];
139 label localFacei =
patches[patchi].whichFace(facei);
140 values[probei] = bField[patchi][localFacei];
Istream and Ostream manipulators taking arguments.
Generic templated field type.
Minimal example by using system/controlDict.functions:
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static unsigned int defaultPrecision() noexcept
Return the default precision.
static void listCombineAllGather(const List< commsStruct > &comms, List< T > &values, const CombineOp &cop, const int tag, const label comm)
After completion all processors have the same data.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
tmp< Field< Type > > sampleSurfaceField(const word &fieldName) const
Sample a surface field at all locations.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
HashPtrTable< OFstream > probeFilePtrs_
Current open files (non-empty on master only)
splitCell * master() const
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
const polyBoundaryMesh & patches
OBJstream os(runTime.globalPath()/outputName)
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Omanip< int > setw(const int i)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
#define forAll(list, i)
Loop across all elements in list.