Set of locations to sample at patches. More...
Public Member Functions | |
| TypeName ("patchProbes") | |
| Runtime type information. More... | |
| patchProbes (const word &name, const Time &time, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true) | |
| Construct from Time and dictionary. More... | |
| virtual | ~patchProbes ()=default |
| Destructor. More... | |
| virtual bool | write () |
| Public members. More... | |
| virtual bool | read (const dictionary &) |
| Read. 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 |
Public Member Functions inherited from probes | |
| 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 | execute () |
| Execute, currently does nothing. 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 |
Public Member Functions inherited from stateFunctionObject | |
| 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... | |
| label | getTrigger () const |
| Get the current trigger index. More... | |
| bool | setTrigger (const label triggeri) |
| Set the current trigger index. 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... | |
| List< word > | objectResultEntries () const |
| Retrieve the result entries. More... | |
| List< word > | 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... | |
Public Member Functions inherited from timeFunctionObject | |
| 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 |
Public Member Functions inherited from functionObject | |
| virtual const word & | type () const =0 |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
| functionObject (const word &name) | |
| Construct from components. More... | |
| autoPtr< functionObject > | clone () const |
| Return clone. More... | |
| virtual | ~functionObject ()=default |
| Destructor. More... | |
| const word & | name () const |
| Return the name of this functionObject. 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... | |
Public Member Functions inherited from Field< Type > | |
| constexpr | Field () noexcept |
| Construct null. More... | |
| Field (const label len) | |
| Construct given size. More... | |
| Field (const label len, const Type &val) | |
| Construct given size and initial value. More... | |
| Field (const label len, const zero) | |
| Construct given size and initial values of zero. More... | |
| Field (const Field< Type > &fld) | |
| Copy construct. More... | |
| Field (const UList< Type > &list) | |
| Copy construct from UList<Type> More... | |
| template<class Addr > | |
| Field (const IndirectListBase< Type, Addr > &list) | |
| Copy construct from IndirectList. More... | |
| Field (Field< Type > &&fld) | |
| Move construct from Field. More... | |
| Field (List< Type > &&list) | |
| Move construct from List. More... | |
| template<int SizeMin> | |
| Field (DynamicList< Type, SizeMin > &&list) | |
| Move construct from DynamicList. More... | |
| Field (const UList< Type > &mapF, const labelUList &mapAddressing) | |
| Construct by 1 to 1 mapping from the given field. More... | |
| Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing) | |
| Construct by 1 to 1 mapping from the given tmp field. More... | |
| Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights) | |
| Construct by interpolative mapping from the given field. More... | |
| Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights) | |
| Construct by interpolative mapping from the given tmp field. More... | |
| Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true) | |
| Construct by mapping from the given field. More... | |
| Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true) | |
| Construct by mapping from the given field. More... | |
| Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true) | |
| Construct by mapping from the given field. More... | |
| Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true) | |
| Construct by mapping from the given tmp field. More... | |
| Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true) | |
| Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true) | |
| Field (Field< Type > &fld, bool reuse) | |
| Copy construct or re-use as specified. More... | |
| Field (const tmp< Field< Type >> &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< Type > > | clone () const |
| Clone. More... | |
| void | map (const UList< Type > &mapF, const labelUList &mapAddressing) |
| 1 to 1 map from the given field More... | |
| void | map (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing) |
| 1 to 1 map from the given tmp field More... | |
| void | map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights) |
| Interpolative map from the given field. More... | |
| void | map (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights) |
| Interpolative map from the given tmp field. More... | |
| void | map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true) |
| Map from the given field. More... | |
| void | map (const tmp< Field< Type >> &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< Type > &mapF, const labelUList &mapAddressing) |
| 1 to 1 reverse-map from the given field More... | |
| void | rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing) |
| 1 to 1 reverse-map from the given tmp field More... | |
| void | rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights) |
| Interpolative reverse map from the given field. More... | |
| void | rmap (const tmp< Field< Type >> &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... | |
| template<class VSForm > | |
| VSForm | block (const label start) const |
| tmp< Field< Type > > | 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... | |
| void | operator= (const Field< Type > &) |
| Copy assignment. More... | |
| void | operator= (const tmp< Field< Type >> &) |
| void | operator= (const UList< Type > &) |
| void | operator= (const SubField< Type > &) |
| void | operator= (Field< Type > &&rhs) |
| Move assignment. More... | |
| void | operator= (List< Type > &&rhs) |
| template<int SizeMin> | |
| void | operator= (DynamicList< Type, SizeMin > &&rhs) |
| void | operator= (const Type &val) |
| Value assignment. More... | |
| void | operator= (const zero) |
| template<class Form , class Cmpt , direction nCmpt> | |
| void | operator= (const VectorSpace< Form, Cmpt, nCmpt > &) |
| void | operator+= (const UList< Type > &) |
| void | operator+= (const tmp< Field< Type >> &) |
| void | operator-= (const UList< Type > &) |
| void | operator-= (const tmp< Field< Type >> &) |
| void | operator*= (const UList< scalar > &) |
| void | operator*= (const tmp< Field< scalar >> &) |
| void | operator/= (const UList< scalar > &) |
| void | operator/= (const tmp< Field< scalar >> &) |
| void | operator+= (const Type &) |
| void | operator-= (const Type &) |
| void | operator*= (const scalar &) |
| void | operator/= (const scalar &) |
| template<class Type> | |
| void | operator= (const tmp< Field > &rhs) |
Protected Member Functions | |
| template<class Type > | |
| void | sampleAndWrite (const GeometricField< Type, fvPatchField, volMesh > &) |
| Sample and write a particular volume field. More... | |
| template<class Type > | |
| void | sampleAndWrite (const GeometricField< Type, fvsPatchField, surfaceMesh > &) |
| Sample and write a particular surface field. More... | |
| template<class Type > | |
| void | sampleAndWrite (const fieldGroup< Type > &) |
| Sample and write all the fields of the given type. More... | |
| template<class Type > | |
| void | sampleAndWriteSurfaceFields (const fieldGroup< Type > &) |
| Sample and write all the surface fields of the given type. 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 GeometricField< Type, fvsPatchField, surfaceMesh > &) const |
| Sample a surface field at all locations. More... | |
| template<class Type > | |
| tmp< Field< Type > > | sample (const word &fieldName) const |
| Sample a single field on all sample locations. More... | |
| virtual void | findElements (const fvMesh &) |
| Find elements containing patchProbes. More... | |
Protected Member Functions inherited from probes | |
| void | clearFieldGroups () |
| Clear old field groups. More... | |
| label | classifyFields () |
| Classify field types, returns the number of fields. More... | |
| label | prepare () |
| Classify field type and open/close file streams,. More... | |
Protected Member Functions inherited from stateFunctionObject | |
| const IOdictionary & | stateDict () const |
| Return a const reference to the state dictionary. More... | |
| IOdictionary & | 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... | |
Protected Member Functions inherited from timeFunctionObject | |
| 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... | |
Protected Member Functions inherited from functionObject | |
| word | scopedName (const word &name) const |
| Return a scoped name, e.g. used to construct local field names. More... | |
Additional Inherited Members | |
Public Types inherited from Field< Type > | |
| typedef pTraits< Type >::cmptType | cmptType |
| Component type. More... | |
| typedef SubField< Type > | subField |
| Declare type of subField. More... | |
Static Public Member Functions inherited from functionObject | |
| static autoPtr< functionObject > | New (const word &name, const Time &runTime, const dictionary &dict) |
| Select from dictionary, based on its "type" entry. More... | |
Static Public Member Functions inherited from Field< Type > | |
| static const Field< Type > & | null () |
| Return nullObject reference field. More... | |
| static autoPtr< Field< Type > > | New (Istream &is) |
| Return a pointer to a new Field created on freestore. More... | |
| template<class Type2 > | |
| static tmp< Field< Type > > | NewCalculatedType (const Field< Type2 > &f) |
Public Attributes inherited from functionObject | |
| bool | log |
| Flag to write log into Info. More... | |
Static Public Attributes inherited from functionObject | |
| static int | debug |
| Flag to execute debug content. More... | |
| static bool | postProcess |
| Global post-processing mode switch. More... | |
| static word | outputPrefix |
| Directory prefix. More... | |
Set of locations to sample at patches.
Call write() to sample and write files.
Example of function object specification:
patchProbes
{
type patchProbes;
libs (sampling);
// Name of the directory for probe data
name patchProbes;
// Patches to sample (wildcards allowed)
patches (".*inl.*");
// Write at same frequency as fields
writeControl writeTime;
writeInterval 1;
// Fields to be probed
fields (p U);
// Locations to probe. These get snapped onto the nearest point
// on the selected patches
probeLocations
(
( -100 0 0.01 ) // at inlet
);
}
Definition at line 92 of file patchProbes.H.
| patchProbes | ( | const word & | name, |
| const Time & | time, | ||
| const dictionary & | dict, | ||
| const bool | loadFromFiles = false, |
||
| const bool | readFields = true |
||
| ) |
Construct from Time and dictionary.
Definition at line 226 of file patchProbes.C.
References dict, and Foam::read().
|
virtualdefault |
Destructor.
|
protected |
Sample and write a particular volume field.
Definition at line 37 of file patchProbesTemplates.C.
References Foam::endl(), forAll, Foam::setw(), and Foam::HashTableOps::values().
|
protected |
Sample and write a particular surface field.
Definition at line 63 of file patchProbesTemplates.C.
References Foam::endl(), forAll, Foam::setw(), and Foam::HashTableOps::values().
|
protected |
Sample and write all the fields of the given type.
Definition at line 89 of file patchProbesTemplates.C.
|
protected |
Sample and write all the surface fields of the given type.
Definition at line 141 of file patchProbesTemplates.C.
|
protected |
Sample a volume field at all locations.
Referenced by patchProbes::findElements(), and patchProbes::sample().
|
protected |
Sample a surface field at all locations.
Sample a single field on all sample locations.
|
protectedvirtual |
Find elements containing patchProbes.
Reimplemented from probes.
Definition at line 53 of file patchProbes.C.
References boundBox::add(), indexedOctree< Type >::bb(), functionObject::debug, Foam::constant::electromagnetic::e, probes::elementList_, Foam::endl(), treeBoundBox::extend(), f(), probes::faceList_, Tuple2< T1, T2 >::first(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), Foam::Info, InfoInFunction, boundBox::invertedBox, Pstream::listCombineGather(), Pstream::listCombineScatter(), Foam::magSqr(), boundBox::max(), mesh, boundBox::min(), UPstream::myProcNo(), Foam::nl, patchProbes::patchNames_, polyBoundaryMesh::patchSet(), PrimitivePatch< FaceList, PointField >::points(), probes::probeLocations(), probes::processor_, Foam::reduce(), rndGen, patchProbes::sample(), Tuple2< T1, T2 >::second(), List< T >::setSize(), indexedOctree< Type >::shapes(), HashTable< T, Key, Hash >::sortedToc(), Foam::sqr(), polyPatch::start(), VectorSpace< Vector< Cmpt >, Cmpt, 3 >::uniform(), WarningInFunction, and polyBoundaryMesh::whichPatch().
| TypeName | ( | "patchProbes" | ) |
Runtime type information.
|
virtual |
Public members.
Sample and write
Reimplemented from probes.
Definition at line 245 of file patchProbes.C.
|
virtual |
Read.
Reimplemented from probes.
Definition at line 266 of file patchProbes.C.
References dict, dictionary::get(), probes::read(), and dictionary::readIfPresent().
| Foam::tmp<Foam::Field<Type> > sample | ( | const GeometricField< Type, fvPatchField, volMesh > & | vField | ) | const |
Definition at line 196 of file patchProbesTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, patches, tmp< T >::ref(), and Foam::HashTableOps::values().
| Foam::tmp<Foam::Field<Type> > sample | ( | const word & | fieldName | ) | const |
Definition at line 232 of file patchProbesTemplates.C.
References objectRegistry::lookupObject(), probes::mesh_, and patchProbes::sample().
| Foam::tmp<Foam::Field<Type> > sample | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | sField | ) | const |
Definition at line 247 of file patchProbesTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), patches, tmp< T >::ref(), Foam::HashTableOps::values(), and polyBoundaryMesh::whichPatch().
|
protected |
Patches to sample.
Definition at line 101 of file patchProbes.H.
Referenced by patchProbes::findElements().