Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
probes Class Reference

Set of locations to sample. More...

Inheritance diagram for probes:
Inheritance graph
[legend]
Collaboration diagram for probes:
Collaboration graph
[legend]

Classes

class  fieldGroup
 

Public Member Functions

 TypeName ("probes")
 
 probes (const word &name, const Time &runTime, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true)
 
virtual ~probes ()=default
 
virtual const wordResfieldNames () const
 
virtual const pointFieldprobeLocations () const
 
virtual const pointprobe (const label i) const
 
const labelListelements () const
 
virtual bool read (const dictionary &)
 
virtual bool execute ()
 
virtual bool write ()
 
virtual void updateMesh (const mapPolyMesh &)
 
virtual void movePoints (const polyMesh &)
 
virtual void readUpdate (const polyMesh::readUpdateState state)
 
template<class Type >
tmp< Field< Type > > sample (const GeometricField< Type, fvPatchField, volMesh > &) const
 
template<class Type >
tmp< Field< Type > > sample (const word &fieldName) const
 
template<class Type >
tmp< Field< Type > > sampleSurfaceFields (const word &fieldName) const
 
template<class Type >
tmp< Field< Type > > sample (const GeometricField< Type, fvsPatchField, surfaceMesh > &) const
 
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)
 
virtual ~stateFunctionObject ()=default
 
dictionarypropertyDict ()
 
bool foundProperty (const word &entryName) const
 
void clearTrigger ()
 
label getTrigger () const
 
bool setTrigger (const label triggeri, bool increaseOnly=true)
 
bool getDict (const word &entryName, dictionary &dict) const
 
bool getObjectDict (const word &objectName, const word &entryName, dictionary &dict) const
 
template<class Type >
Type getProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
bool getProperty (const word &entryName, Type &value) const
 
template<class Type >
void setProperty (const word &entryName, const Type &value)
 
template<class Type >
Type getObjectProperty (const word &objectName, const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
bool getObjectProperty (const word &objectName, const word &entryName, Type &value) const
 
template<class Type >
void setObjectProperty (const word &objectName, const word &entryName, const Type &value)
 
template<class Type >
void setResult (const word &entryName, const Type &value)
 
template<class Type >
void setObjectResult (const word &objectName, const word &entryName, const Type &value)
 
template<class Type >
Type getResult (const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
Type getObjectResult (const word &objectName, const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
bool getObjectResult (const word &objectName, const word &entryName, Type &value) const
 
word resultType (const word &entryName) const
 
word objectResultType (const word &objectName, const word &entryName) const
 
wordList objectResultEntries () const
 
wordList objectResultEntries (const word &objectName) const
 
void writeResultEntries (Ostream &os) const
 
void writeResultEntries (const word &objectName, Ostream &os) const
 
void writeAllResultEntries (Ostream &os) const
 
- Public Member Functions inherited from timeFunctionObject
 timeFunctionObject (const word &name, const Time &runTime)
 
virtual ~timeFunctionObject ()=default
 
const Timetime () const
 
objectRegistrystoredObjects ()
 
const objectRegistrystoredObjects () const
 
- Public Member Functions inherited from functionObject
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 
 functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix)
 
autoPtr< functionObjectclone () const
 
virtual ~functionObject ()=default
 
virtual const wordtype () const =0
 
const wordname () const noexcept
 
bool useNamePrefix () const noexcept
 
bool useNamePrefix (bool on) noexcept
 
virtual bool execute (const label subIndex)
 
virtual bool end ()
 
virtual bool adjustTimeStep ()
 
virtual bool filesModified () const
 
- Public Member Functions inherited from Field
constexpr Field () noexcept
 
 Field (const label len)
 
 Field (const label len, const Type &val)
 
 Field (const label len, const Foam::zero)
 
 Field (const Foam::one, const Type &val)
 
 Field (const Foam::one, Type &&val)
 
 Field (const Foam::one, const Foam::zero)
 
 Field (const Field< Type > &fld)
 
 Field (const UList< Type > &list)
 
template<class Addr >
 Field (const IndirectListBase< Type, Addr > &list)
 
 Field (Field< Type > &&fld)
 
 Field (List< Type > &&list)
 
template<int SizeMin>
 Field (DynamicList< Type, SizeMin > &&list)
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
 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)
 
 Field (const tmp< Field< Type >> &tfld)
 
 Field (Istream &is)
 
 Field (const word &keyword, const dictionary &dict, const label len)
 
tmp< Field< Type > > clone () const
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void map (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
void map (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void negate ()
 
tmp< Field< cmptType > > component (const direction) const
 
void replace (const direction, const UList< cmptType > &)
 
void replace (const direction, const tmp< Field< cmptType >> &)
 
void replace (const direction, const cmptType &)
 
template<class VSForm >
VSForm block (const label start) const
 
tmp< Field< Type > > T () const
 
void writeEntry (const word &keyword, Ostream &os) const
 
SubField< Type > slice (const label pos, label len=-1)
 
const SubField< Type > slice (const label pos, label len=-1) const
 
SubField< Type > slice (const labelRange &range)
 
const SubField< Type > slice (const labelRange &range) const
 
void operator= (const Field< Type > &)
 
void operator= (const tmp< Field< Type >> &)
 
void operator= (const UList< Type > &rhs)
 
void operator= (const SubField< Type > &rhs)
 
template<class Addr >
void operator= (const IndirectListBase< Type, Addr > &rhs)
 
void operator= (Field< Type > &&rhs)
 
void operator= (List< Type > &&rhs)
 
template<int SizeMin>
void operator= (DynamicList< Type, SizeMin > &&rhs)
 
void operator= (const Type &val)
 
void operator= (const Foam::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 >
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const word &keyword, const dictionary &dict, const label len)
 
template<class Type >
void operator= (const Field< Type > &rhs)
 
template<class Type >
void operator= (const tmp< Field > &rhs)
 
template<class Type >
constexpr Field () noexcept
 
template<class Type >
 Field (const label len)
 
template<class Type >
 Field (const label len, const Type &val)
 
template<class Type >
 Field (const label len, const Foam::zero)
 
template<class Type >
 Field (const Foam::one, const Type &val)
 
template<class Type >
 Field (const Foam::one, Type &&val)
 
template<class Type >
 Field (const Foam::one, const Foam::zero)
 
template<class Type >
 Field (const Field< Type > &fld)
 
template<class Type >
 Field (const UList< Type > &list)
 
template<class Type >
 Field (Field< Type > &&fld)
 
template<class Type >
 Field (List< Type > &&list)
 
template<class Type >
 Field (Field< Type > &fld, bool reuse)
 
template<class Type >
 Field (const tmp< Field< Type >> &tfld)
 
template<class Type >
 Field (Istream &is)
 
template<class Type >
void operator= (const UList< Type > &rhs)
 
template<class Type >
void operator= (const SubField< Type > &rhs)
 
template<class Type >
void operator= (Field< Type > &&rhs)
 
template<class Type >
void operator= (List< Type > &&rhs)
 
template<class Type >
void operator= (const Type &val)
 
template<class Type >
void operator= (const Foam::zero)
 

Protected Member Functions

void clearFieldGroups ()
 
label classifyFields ()
 
virtual void findElements (const fvMesh &mesh)
 
label prepare ()
 
- Protected Member Functions inherited from stateFunctionObject
const functionObjects::propertiesstateDict () const
 
functionObjects::propertiesstateDict ()
 
 stateFunctionObject (const stateFunctionObject &)=delete
 
void operator= (const stateFunctionObject &)=delete
 
- Protected Member Functions inherited from timeFunctionObject
void clearOutputObjects (const wordList &objNames)
 
 timeFunctionObject (const timeFunctionObject &)=delete
 
void operator= (const timeFunctionObject &)=delete
 
- Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 

Protected Attributes

const fvMeshmesh_
 
bool loadFromFiles_
 
wordRes fieldSelection_
 
bool fixedLocations_
 
word interpolationScheme_
 
bool includeOutOfBounds_
 
fieldGroup< scalar > scalarFields_
 
fieldGroup< vectorvectorFields_
 
fieldGroup< sphericalTensorsphericalTensorFields_
 
fieldGroup< symmTensorsymmTensorFields_
 
fieldGroup< tensortensorFields_
 
fieldGroup< scalar > surfaceScalarFields_
 
fieldGroup< vectorsurfaceVectorFields_
 
fieldGroup< sphericalTensorsurfaceSphericalTensorFields_
 
fieldGroup< symmTensorsurfaceSymmTensorFields_
 
fieldGroup< tensorsurfaceTensorFields_
 
labelList elementList_
 
labelList faceList_
 
labelList processor_
 
HashPtrTable< OFstreamprobeFilePtrs_
 
labelList patchIDList_
 
pointField oldPoints_
 
- Protected Attributes inherited from timeFunctionObject
const Timetime_
 

Additional Inherited Members

- Public Types inherited from Field
typedef pTraits< Type >::cmptType cmptType
 
typedef SubField< Type > subField
 
- Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 
- Static Public Member Functions inherited from Field
static const Field< Type > & null ()
 
static autoPtr< Field< Type > > New (Istream &is)
 
template<class Type2 >
static tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 
- Public Attributes inherited from functionObject
bool log
 
- Static Public Attributes inherited from functionObject
static int debug
 
static bool postProcess
 
static bool defaultUseNamePrefix
 
static word outputPrefix
 

Detailed Description

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;
}
Source files

Definition at line 106 of file probes.H.

Constructor & Destructor Documentation

◆ probes()

probes ( const word name,
const Time runTime,
const dictionary dict,
const bool  loadFromFiles = false,
const bool  readFields = true 
)

Definition at line 296 of file probes.C.

References dict, and Foam::read().

Here is the call graph for this function:

◆ ~probes()

virtual ~probes ( )
virtualdefault

Member Function Documentation

◆ clearFieldGroups()

void clearFieldGroups ( )
protected

◆ classifyFields()

Foam::label classifyFields ( )
protected

Definition at line 45 of file probesGrouping.C.

References List::append(), IOobjectList::classes(), Foam::BitOps::count(), fieldNames(), and forAllConstIters().

Here is the call graph for this function:

◆ findElements()

void findElements ( const fvMesh mesh)
protectedvirtual

◆ prepare()

Foam::label prepare ( )
protected

◆ TypeName()

TypeName ( "probes"  )

◆ fieldNames()

virtual const wordRes& fieldNames ( ) const
inlinevirtual

Definition at line 269 of file probes.H.

◆ probeLocations()

virtual const pointField& probeLocations ( ) const
inlinevirtual

Definition at line 275 of file probes.H.

Referenced by patchProbes::findElements().

Here is the caller graph for this function:

◆ probe()

virtual const point& probe ( const label  i) const
inlinevirtual

Definition at line 281 of file probes.H.

◆ elements()

const labelList& elements ( ) const
inline

Definition at line 287 of file probes.H.

◆ read()

bool read ( const dictionary dict)
virtual

Reimplemented from functionObject.

Reimplemented in thermoCoupleProbes, and patchProbes.

Definition at line 331 of file probes.C.

References dict, Foam::endl(), dictionary::readEntry(), dictionary::readIfPresent(), and WarningInFunction.

Referenced by patchProbes::read(), and thermoCoupleProbes::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

bool execute ( )
virtual

Implements functionObject.

Reimplemented in thermoCoupleProbes.

Definition at line 359 of file probes.C.

◆ write()

bool write ( )
virtual

Implements functionObject.

Reimplemented in thermoCoupleProbes, and patchProbes.

Definition at line 365 of file probes.C.

◆ updateMesh()

void updateMesh ( const mapPolyMesh mpm)
virtual

Reimplemented from functionObject.

Definition at line 386 of file probes.C.

References DynamicList::append(), DebugInfo, Foam::endl(), forAll, mapPolyMesh::mesh(), mapPolyMesh::reverseCellMap(), and mapPolyMesh::reverseFaceMap().

Here is the call graph for this function:

◆ movePoints()

void movePoints ( const polyMesh mesh)
virtual

Reimplemented from functionObject.

Definition at line 477 of file probes.C.

References DebugInfo, Foam::endl(), and mesh.

Here is the call graph for this function:

◆ readUpdate()

virtual void readUpdate ( const polyMesh::readUpdateState  state)
inlinevirtual

Definition at line 308 of file probes.H.

◆ sample() [1/6]

tmp<Field<Type> > sample ( const GeometricField< Type, fvPatchField, volMesh > &  ) const

Referenced by thermoCoupleProbes::derivatives(), and thermoCoupleProbes::thermoCoupleProbes().

Here is the caller graph for this function:

◆ sample() [2/6]

tmp<Field<Type> > sample ( const word fieldName) const

◆ sampleSurfaceFields() [1/2]

tmp<Field<Type> > sampleSurfaceFields ( const word fieldName) const

◆ sample() [3/6]

tmp<Field<Type> > sample ( const GeometricField< Type, fvsPatchField, surfaceMesh > &  ) const

◆ sample() [4/6]

Foam::tmp<Foam::Field<Type> > sample ( const GeometricField< Type, fvPatchField, volMesh > &  vField) const

Definition at line 218 of file probesTemplates.C.

References forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), tmp::ref(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ sample() [5/6]

Foam::tmp<Foam::Field<Type> > sample ( const word fieldName) const

Definition at line 273 of file probesTemplates.C.

◆ sample() [6/6]

Foam::tmp<Foam::Field<Type> > sample ( const GeometricField< Type, fvsPatchField, surfaceMesh > &  sField) const

Definition at line 288 of file probesTemplates.C.

References forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), tmp::ref(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ sampleSurfaceFields() [2/2]

Foam::tmp<Foam::Field<Type> > sampleSurfaceFields ( const word fieldName) const

Definition at line 318 of file probesTemplates.C.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Definition at line 133 of file probes.H.

Referenced by patchProbes::sample().

◆ loadFromFiles_

bool loadFromFiles_
protected

Definition at line 136 of file probes.H.

◆ fieldSelection_

wordRes fieldSelection_
protected

Definition at line 142 of file probes.H.

◆ fixedLocations_

bool fixedLocations_
protected

Definition at line 147 of file probes.H.

◆ interpolationScheme_

word interpolationScheme_
protected

Definition at line 151 of file probes.H.

◆ includeOutOfBounds_

bool includeOutOfBounds_
protected

Definition at line 154 of file probes.H.

◆ scalarFields_

fieldGroup<scalar> scalarFields_
protected

Definition at line 160 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ vectorFields_

fieldGroup<vector> vectorFields_
protected

Definition at line 161 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ sphericalTensorFields_

fieldGroup<sphericalTensor> sphericalTensorFields_
protected

Definition at line 162 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ symmTensorFields_

fieldGroup<symmTensor> symmTensorFields_
protected

Definition at line 163 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ tensorFields_

fieldGroup<tensor> tensorFields_
protected

Definition at line 164 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceScalarFields_

fieldGroup<scalar> surfaceScalarFields_
protected

Definition at line 167 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceVectorFields_

fieldGroup<vector> surfaceVectorFields_
protected

Definition at line 168 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceSphericalTensorFields_

fieldGroup<sphericalTensor> surfaceSphericalTensorFields_
protected

Definition at line 169 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceSymmTensorFields_

fieldGroup<symmTensor> surfaceSymmTensorFields_
protected

Definition at line 170 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceTensorFields_

fieldGroup<tensor> surfaceTensorFields_
protected

Definition at line 171 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ elementList_

labelList elementList_
protected

Definition at line 174 of file probes.H.

Referenced by patchProbes::findElements(), and probes::findElements().

◆ faceList_

labelList faceList_
protected

Definition at line 177 of file probes.H.

Referenced by patchProbes::findElements(), and probes::findElements().

◆ processor_

labelList processor_
protected

Definition at line 181 of file probes.H.

Referenced by patchProbes::findElements(), and probes::findElements().

◆ probeFilePtrs_

HashPtrTable<OFstream> probeFilePtrs_
protected

Definition at line 184 of file probes.H.

◆ patchIDList_

labelList patchIDList_
protected

Definition at line 189 of file probes.H.

Referenced by patchProbes::findElements().

◆ oldPoints_

pointField oldPoints_
protected

Definition at line 192 of file probes.H.

Referenced by patchProbes::findElements().


The documentation for this class was generated from the following files: