Set of locations to sample. More...
Classes | |
class | fieldGroup |
Class used for grouping field types. More... | |
Public Member Functions | |
TypeName ("probes") | |
Runtime type information. More... | |
probes (const word &name, const Time &runTime, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true) | |
Construct from Time and dictionary. More... | |
virtual | ~probes ()=default |
Destructor. More... | |
virtual const wordRes & | fieldNames () const |
Return names of fields to probe. More... | |
virtual const pointField & | probeLocations () const |
Return locations to probe. More... | |
virtual const point & | probe (const label i) const |
Return location for probe i. More... | |
const labelList & | elements () const |
Cells to be probed (obtained from the locations) More... | |
virtual bool | read (const dictionary &) |
Read the probes. More... | |
virtual bool | execute () |
Execute, currently does nothing. More... | |
virtual bool | write () |
Sample and write. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &) |
Update for changes of mesh. More... | |
virtual void | readUpdate (const polyMesh::readUpdateState state) |
Update for changes of mesh due to readUpdate. More... | |
template<class Type > | |
tmp< Field< Type > > | sample (const GeometricField< Type, fvPatchField, volMesh > &) const |
Sample a volume field at all locations. More... | |
template<class Type > | |
tmp< Field< Type > > | sample (const word &fieldName) const |
Sample a single vol field on all sample locations. More... | |
template<class Type > | |
tmp< Field< Type > > | sampleSurfaceFields (const word &fieldName) const |
Sample a single scalar field on all sample locations. More... | |
template<class Type > | |
tmp< Field< Type > > | sample (const GeometricField< Type, fvsPatchField, surfaceMesh > &) const |
Sample a surface field at all locations. More... | |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sample (const GeometricField< Type, fvPatchField, volMesh > &vField) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sample (const word &fieldName) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sample (const GeometricField< Type, fvsPatchField, surfaceMesh > &sField) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleSurfaceFields (const word &fieldName) const |
![]() | |
stateFunctionObject (const word &name, const Time &runTime) | |
Construct from components. More... | |
virtual | ~stateFunctionObject ()=default |
Destructor. More... | |
dictionary & | propertyDict () |
Return access to the property dictionary. More... | |
bool | foundProperty (const word &entryName) const |
Return true if the property exists. More... | |
void | clearTrigger () |
Remove the trigger index from the properties. More... | |
label | getTrigger () const |
Get the current trigger index. More... | |
bool | setTrigger (const label triggeri, bool increaseOnly=true) |
Set the trigger index. Normally only if greater than current. More... | |
bool | getDict (const word &entryName, dictionary &dict) const |
Set dictionary, return true if set. More... | |
bool | getObjectDict (const word &objectName, const word &entryName, dictionary &dict) const |
Set dictionary from named object, return true if set. More... | |
template<class Type > | |
Type | getProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const |
Retrieve generic property. More... | |
template<class Type > | |
bool | getProperty (const word &entryName, Type &value) const |
Set generic property, return true if set. More... | |
template<class Type > | |
void | setProperty (const word &entryName, const Type &value) |
Add generic property. More... | |
template<class Type > | |
Type | getObjectProperty (const word &objectName, const word &entryName, const Type &defaultValue=Type(Zero)) const |
Retrieve generic property from named object. More... | |
template<class Type > | |
bool | getObjectProperty (const word &objectName, const word &entryName, Type &value) const |
Set generic property from named object, return true if set. More... | |
template<class Type > | |
void | setObjectProperty (const word &objectName, const word &entryName, const Type &value) |
Add generic property from named object. More... | |
template<class Type > | |
void | setResult (const word &entryName, const Type &value) |
Add result. More... | |
template<class Type > | |
void | setObjectResult (const word &objectName, const word &entryName, const Type &value) |
Add result from named object. More... | |
template<class Type > | |
Type | getResult (const word &entryName, const Type &defaultValue=Type(Zero)) const |
Retrieve result. More... | |
template<class Type > | |
Type | getObjectResult (const word &objectName, const word &entryName, const Type &defaultValue=Type(Zero)) const |
Retrieve result from named object. More... | |
template<class Type > | |
bool | getObjectResult (const word &objectName, const word &entryName, Type &value) const |
Set result from named object, return true if set. More... | |
word | resultType (const word &entryName) const |
Retrieve the result type. More... | |
word | objectResultType (const word &objectName, const word &entryName) const |
Return the type of result. More... | |
wordList | objectResultEntries () const |
Retrieve the result entries. More... | |
wordList | objectResultEntries (const word &objectName) const |
Return result entries for named object. More... | |
void | writeResultEntries (Ostream &os) const |
Write the results entries for all objects to stream. More... | |
void | writeResultEntries (const word &objectName, Ostream &os) const |
Write the results entries for named object to stream. More... | |
void | writeAllResultEntries (Ostream &os) const |
Write the results entries for all objects to stream. More... | |
![]() | |
timeFunctionObject (const word &name, const Time &runTime) | |
Construct from Time. More... | |
virtual | ~timeFunctionObject ()=default |
Destructor. More... | |
const Time & | time () const |
Return time database. More... | |
objectRegistry & | storedObjects () |
const objectRegistry & | storedObjects () const |
![]() | |
declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix) | |
Construct from components. More... | |
autoPtr< functionObject > | clone () const |
Return clone. More... | |
virtual | ~functionObject ()=default |
Destructor. More... | |
virtual const word & | type () const =0 |
Runtime type information. More... | |
const word & | name () const noexcept |
Return the name of this functionObject. More... | |
bool | useNamePrefix () const noexcept |
Return the flag for adding a scoping name prefix. More... | |
bool | useNamePrefix (bool on) noexcept |
Modify the flag for adding a scoping name prefix. More... | |
virtual bool | execute (const label subIndex) |
Execute using the specified subIndex. More... | |
virtual bool | end () |
Called when Time::run() determines that the time-loop exits. More... | |
virtual bool | adjustTimeStep () |
Called at the end of Time::adjustDeltaT() if adjustTime is true. More... | |
virtual bool | filesModified () const |
Did any file get changed during execution? More... | |
![]() | |
constexpr | Field () noexcept |
Default construct. More... | |
Field (const label len) | |
Construct given size. More... | |
Field (const label len, const vector &val) | |
Construct given size and initial value. More... | |
Field (const label len, const Foam::zero) | |
Construct given size and initial values of zero. More... | |
Field (const Foam::one, const vector &val) | |
Construct with length=1, copying the value as the only content. More... | |
Field (const Foam::one, vector &&val) | |
Construct with length=1, moving the value as the only content. More... | |
Field (const Foam::one, const Foam::zero) | |
Construct with length=1, initializing content to zero. More... | |
Field (const Field< vector > &fld) | |
Copy construct. More... | |
Field (const UList< vector > &list) | |
Copy construct from UList<Type> More... | |
Field (const IndirectListBase< vector, Addr > &list) | |
Copy construct from IndirectList. More... | |
Field (Field< vector > &&fld) | |
Move construct from Field. More... | |
Field (List< vector > &&list) | |
Move construct from List. More... | |
Field (DynamicList< vector, SizeMin > &&list) | |
Move construct from DynamicList. More... | |
Field (const UList< vector > &mapF, const labelUList &mapAddressing) | |
Construct by 1 to 1 mapping from the given field. More... | |
Field (const tmp< Field< vector >> &tmapF, const labelUList &mapAddressing) | |
Construct by 1 to 1 mapping from the given tmp field. More... | |
Field (const UList< vector > &mapF, const labelListList &mapAddressing, const scalarListList &weights) | |
Construct by interpolative mapping from the given field. More... | |
Field (const tmp< Field< vector >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights) | |
Construct by interpolative mapping from the given tmp field. More... | |
Field (const UList< vector > &mapF, const FieldMapper &map, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const UList< vector > &mapF, const FieldMapper &map, const vector &defaultValue, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const UList< vector > &mapF, const FieldMapper &map, const UList< vector > &defaultValues, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const tmp< Field< vector >> &tmapF, const FieldMapper &map, const bool applyFlip=true) | |
Construct by mapping from the given tmp field. More... | |
Field (const tmp< Field< vector >> &tmapF, const FieldMapper &map, const vector &defaultValue, const bool applyFlip=true) | |
Field (const tmp< Field< vector >> &tmapF, const FieldMapper &map, const UList< vector > &defaultValues, const bool applyFlip=true) | |
Field (Field< vector > &fld, bool reuse) | |
Copy construct or re-use as specified. More... | |
Field (const tmp< Field< vector >> &tfld) | |
Copy or move construct from tmp. More... | |
Field (Istream &is) | |
Construct from Istream. More... | |
Field (const word &keyword, const dictionary &dict, const label len) | |
Construct from a dictionary entry. More... | |
tmp< Field< vector > > | clone () const |
Clone. More... | |
void | map (const UList< vector > &mapF, const labelUList &mapAddressing) |
1 to 1 map from the given field More... | |
void | map (const tmp< Field< vector >> &tmapF, const labelUList &mapAddressing) |
1 to 1 map from the given tmp field More... | |
void | map (const UList< vector > &mapF, const labelListList &mapAddressing, const scalarListList &weights) |
Interpolative map from the given field. More... | |
void | map (const tmp< Field< vector >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights) |
Interpolative map from the given tmp field. More... | |
void | map (const UList< vector > &mapF, const FieldMapper &map, const bool applyFlip=true) |
Map from the given field. More... | |
void | map (const tmp< Field< vector >> &tmapF, const FieldMapper &map, const bool applyFlip=true) |
Map from the given tmp field. More... | |
void | autoMap (const FieldMapper &map, const bool applyFlip=true) |
Map from self. More... | |
void | rmap (const UList< vector > &mapF, const labelUList &mapAddressing) |
1 to 1 reverse-map from the given field More... | |
void | rmap (const tmp< Field< vector >> &tmapF, const labelUList &mapAddressing) |
1 to 1 reverse-map from the given tmp field More... | |
void | rmap (const UList< vector > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights) |
Interpolative reverse map from the given field. More... | |
void | rmap (const tmp< Field< vector >> &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights) |
Interpolative reverse map from the given tmp field. More... | |
void | negate () |
Negate this field (negative). More... | |
tmp< Field< cmptType > > | component (const direction) const |
Return a component field of the field. More... | |
void | replace (const direction, const UList< cmptType > &) |
Replace a component field of the field. More... | |
void | replace (const direction, const tmp< Field< cmptType >> &) |
Replace a component field of the field. More... | |
void | replace (const direction, const cmptType &) |
Replace a component field of the field. More... | |
VSForm | block (const label start) const |
tmp< Field< vector > > | T () const |
Return the field transpose (only defined for second rank tensors) More... | |
void | writeEntry (const word &keyword, Ostream &os) const |
Write the field as a dictionary entry. More... | |
SubField< vector > | slice (const label pos, label len=-1) |
Return SubField slice (non-const access) - no range checking. More... | |
const SubField< vector > | slice (const label pos, label len=-1) const |
Return SubField slice (const access) - no range checking. More... | |
SubField< vector > | slice (const labelRange &range) |
Return SubField slice (non-const access) - with range checking. More... | |
const SubField< vector > | slice (const labelRange &range) const |
Return SubField slice (const access) - with range checking. More... | |
void | operator= (const Field< vector > &) |
Copy assignment. More... | |
void | operator= (const tmp< Field< vector >> &) |
void | operator= (const UList< vector > &rhs) |
void | operator= (const SubField< vector > &rhs) |
void | operator= (const IndirectListBase< vector, Addr > &rhs) |
Copy assign from IndirectList. More... | |
void | operator= (Field< vector > &&rhs) |
Move assignment. More... | |
void | operator= (List< vector > &&rhs) |
void | operator= (DynamicList< vector, SizeMin > &&rhs) |
void | operator= (const vector &val) |
Value assignment. More... | |
void | operator= (const Foam::zero) |
void | operator= (const VectorSpace< Form, Cmpt, nCmpt > &) |
void | operator= (const tmp< Field > &rhs) |
void | operator+= (const UList< vector > &) |
void | operator+= (const tmp< Field< vector >> &) |
void | operator+= (const vector &) |
void | operator-= (const UList< vector > &) |
void | operator-= (const tmp< Field< vector >> &) |
void | operator-= (const vector &) |
void | operator*= (const UList< scalar > &) |
void | operator*= (const tmp< Field< scalar >> &) |
void | operator*= (const scalar &) |
void | operator/= (const UList< scalar > &) |
void | operator/= (const tmp< Field< scalar >> &) |
void | operator/= (const scalar &) |
Protected Member Functions | |
void | clearFieldGroups () |
Clear old field groups. More... | |
label | classifyFields () |
Classify field types, returns the number of fields. More... | |
virtual void | findElements (const fvMesh &mesh) |
Find cells and faces containing probes. More... | |
label | prepare () |
Classify field type and open/close file streams,. More... | |
![]() | |
const functionObjects::properties & | stateDict () const |
Return a const reference to the state dictionary. More... | |
functionObjects::properties & | stateDict () |
Return non-const access to the state dictionary. More... | |
stateFunctionObject (const stateFunctionObject &)=delete | |
No copy construct. More... | |
void | operator= (const stateFunctionObject &)=delete |
No copy assignment. More... | |
![]() | |
void | clearOutputObjects (const wordList &objNames) |
Remove specified items from "functionObjectObjects". More... | |
timeFunctionObject (const timeFunctionObject &)=delete | |
No copy construct. More... | |
void | operator= (const timeFunctionObject &)=delete |
No copy assignment. More... | |
![]() | |
word | scopedName (const word &name) const |
Return a scoped (prefixed) name. More... | |
Additional Inherited Members | |
![]() | |
typedef pTraits< vector >::cmptType | cmptType |
Component type. More... | |
typedef SubField< vector > | subField |
Declare type of subField. More... | |
![]() | |
static autoPtr< functionObject > | New (const word &name, const Time &runTime, const dictionary &dict) |
Select from dictionary, based on its "type" entry. More... | |
![]() | |
static const Field< vector > & | null () |
Return nullObject reference Field. More... | |
static autoPtr< Field< vector > > | New (Istream &is) |
Return a pointer to a new Field created on freestore. More... | |
static tmp< Field< vector > > | NewCalculatedType (const Field< Type2 > &f) |
![]() | |
bool | log |
Flag to write log into Info. More... | |
![]() | |
static int | debug |
Flag to execute debug content. More... | |
static bool | postProcess |
Global post-processing mode switch. More... | |
static bool | defaultUseNamePrefix |
Global default for useNamePrefix. More... | |
static word | outputPrefix |
Directory prefix. More... | |
Set of locations to sample.
Call write() to sample and write files.
Example of function object specification:
probes { type probes; libs (sampling); // Name of the directory for probe data name probes; // Write at same frequency as fields writeControl outputTime; writeInterval 1; // Fields to be probed fields (p U); // Optional: do not recalculate cells if mesh moves fixedLocations false; // Optional: interpolation scheme to use (default is cell) interpolationScheme cellPoint; probeLocations ( ( 1e-06 0 0.01 ) // at inlet (0.21 -0.20999 0.01) // at outlet1 (0.21 0.20999 0.01) // at outlet2 (0.21 0 0.01) // at central block ); // Optional: filter out points that haven't been found. Default // is to include them (with value -VGREAT) includeOutOfBounds true; }
probes | ( | const word & | name, |
const Time & | runTime, | ||
const dictionary & | dict, | ||
const bool | loadFromFiles = false , |
||
const bool | readFields = true |
||
) |
Construct from Time and dictionary.
Definition at line 303 of file probes.C.
References dict, and Foam::read().
|
virtualdefault |
Destructor.
|
protected |
Clear old field groups.
Definition at line 36 of file probesGrouping.C.
References DynamicList< T, SizeMin >::clear(), probes::scalarFields_, probes::sphericalTensorFields_, probes::surfaceScalarFields_, probes::surfaceSphericalTensorFields_, probes::surfaceSymmTensorFields_, probes::surfaceTensorFields_, probes::surfaceVectorFields_, probes::symmTensorFields_, probes::tensorFields_, and probes::vectorFields_.
|
protected |
Classify field types, returns the number of fields.
Definition at line 52 of file probesGrouping.C.
References List< T >::append(), Foam::BitOps::count(), fieldNames(), and forAllConstIters().
|
protectedvirtual |
Find cells and faces containing probes.
Reimplemented in patchProbes.
Definition at line 54 of file probes.C.
References List< T >::clear(), functionObject::debug, DebugInfo, probes::elementList_, Foam::endl(), probes::faceList_, forAll, Foam::mag(), UPstream::master(), mesh, UPstream::myProcNo(), Foam::nl, Foam::Pout, probes::processor_, Foam::reduce(), List< T >::setSize(), and WarningInFunction.
|
protected |
Classify field type and open/close file streams,.
returns number of fields to sample
Definition at line 174 of file probes.C.
References fileName::clean(), DebugInfo, IOstream::defaultPrecision(), polyMesh::defaultRegion, Foam::endl(), forAll, forAllIters, HashSet< Key, Hash >::insert(), Foam::mag(), UPstream::master(), Foam::mkDir(), UPstream::myProcNo(), Foam::name(), fileName::name(), IOobject::name(), autoPtr< T >::New(), Foam::nl, polyBoundaryMesh::nNonProcessor(), functionObject::outputPrefix, and Foam::setw().
TypeName | ( | "probes" | ) |
Runtime type information.
|
inlinevirtual |
|
inlinevirtual |
Return locations to probe.
Definition at line 279 of file probes.H.
Referenced by patchProbes::findElements().
|
inlinevirtual |
|
inline |
|
virtual |
Read the probes.
Reimplemented from functionObject.
Reimplemented in thermoCoupleProbes, and patchProbes.
Definition at line 338 of file probes.C.
References dict, Foam::endl(), dictionary::readEntry(), dictionary::readIfPresent(), and WarningInFunction.
Referenced by patchProbes::read(), and thermoCoupleProbes::read().
|
virtual |
|
virtual |
|
virtual |
Update for changes of mesh.
Reimplemented from functionObject.
Definition at line 393 of file probes.C.
References DynamicList< T, SizeMin >::append(), DebugInfo, Foam::endl(), forAll, mapPolyMesh::mesh(), mapPolyMesh::reverseCellMap(), and mapPolyMesh::reverseFaceMap().
|
virtual |
Update for changes of mesh.
Reimplemented from functionObject.
Definition at line 484 of file probes.C.
References DebugInfo, Foam::endl(), and mesh.
|
inlinevirtual |
tmp<Field<Type> > sample | ( | const GeometricField< Type, fvPatchField, volMesh > & | ) | const |
Sample a volume field at all locations.
Referenced by thermoCoupleProbes::derivatives(), and thermoCoupleProbes::thermoCoupleProbes().
Sample a single vol field on all sample locations.
Sample a single scalar field on all sample locations.
tmp<Field<Type> > sample | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | ) | const |
Sample a surface field at all locations.
Foam::tmp<Foam::Field<Type> > sample | ( | const GeometricField< Type, fvPatchField, volMesh > & | vField | ) | const |
Definition at line 225 of file probesTemplates.C.
References forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), tmp< T >::ref(), and Foam::HashTableOps::values().
Foam::tmp<Foam::Field<Type> > sample | ( | const word & | fieldName | ) | const |
Definition at line 280 of file probesTemplates.C.
Foam::tmp<Foam::Field<Type> > sample | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | sField | ) | const |
Definition at line 295 of file probesTemplates.C.
References forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), tmp< T >::ref(), and Foam::HashTableOps::values().
Foam::tmp<Foam::Field<Type> > sampleSurfaceFields | ( | const word & | fieldName | ) | const |
Definition at line 325 of file probesTemplates.C.
|
protected |
Const reference to fvMesh.
Definition at line 137 of file probes.H.
Referenced by patchProbes::sample().
|
protected |
Load fields from files (not from objectRegistry)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Categorized scalar/vector/tensor vol fields.
Definition at line 164 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 165 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 166 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 167 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 168 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Categorized scalar/vector/tensor surf fields.
Definition at line 171 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 172 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 173 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 174 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 175 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Cells to be probed (obtained from the locations)
Definition at line 178 of file probes.H.
Referenced by patchProbes::findElements(), and probes::findElements().
|
protected |
Faces to be probed.
Definition at line 181 of file probes.H.
Referenced by patchProbes::findElements(), and probes::findElements().
|
protected |
Processor holding the cell or face (-1 if point not found.
on any processor)
Definition at line 185 of file probes.H.
Referenced by patchProbes::findElements(), and probes::findElements().
|
protected |
|
protected |
Patch IDs on which the new probes are located.
Definition at line 193 of file probes.H.
Referenced by patchProbes::findElements().
|
protected |
Original probes location (only used for patchProbes)
Definition at line 196 of file probes.H.
Referenced by patchProbes::findElements().