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

Set of locations to sample at patches. More...

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

Public Member Functions

 TypeName ("patchProbes")
 
 patchProbes (const word &name, const Time &time, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true)
 
virtual ~patchProbes ()=default
 
virtual bool write ()
 
virtual bool read (const dictionary &)
 
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")
 
 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 execute ()
 
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

template<class Type >
void sampleAndWrite (const GeometricField< Type, fvPatchField, volMesh > &)
 
template<class Type >
void sampleAndWrite (const GeometricField< Type, fvsPatchField, surfaceMesh > &)
 
template<class Type >
void sampleAndWrite (const fieldGroup< Type > &)
 
template<class Type >
void sampleAndWriteSurfaceFields (const fieldGroup< Type > &)
 
template<class Type >
tmp< Field< Type > > sample (const GeometricField< Type, fvPatchField, volMesh > &) const
 
template<class Type >
tmp< Field< Type > > sample (const GeometricField< Type, fvsPatchField, surfaceMesh > &) const
 
template<class Type >
tmp< Field< Type > > sample (const word &fieldName) const
 
virtual void findElements (const fvMesh &)
 
- Protected Member Functions inherited from probes
void clearFieldGroups ()
 
label classifyFields ()
 
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

wordRes patchNames_
 
- Protected Attributes inherited from probes
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 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
    );
}
Source files

Definition at line 88 of file patchProbes.H.

Constructor & Destructor Documentation

◆ patchProbes()

patchProbes ( const word name,
const Time time,
const dictionary dict,
const bool  loadFromFiles = false,
const bool  readFields = true 
)

Definition at line 230 of file patchProbes.C.

References dict, and Foam::read().

Here is the call graph for this function:

◆ ~patchProbes()

virtual ~patchProbes ( )
virtualdefault

Member Function Documentation

◆ sampleAndWrite() [1/3]

void sampleAndWrite ( const GeometricField< Type, fvPatchField, volMesh > &  vField)
protected

Definition at line 30 of file patchProbesTemplates.C.

References Foam::endl(), forAll, Foam::setw(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ sampleAndWrite() [2/3]

void sampleAndWrite ( const GeometricField< Type, fvsPatchField, surfaceMesh > &  sField)
protected

Definition at line 56 of file patchProbesTemplates.C.

References Foam::endl(), forAll, Foam::setw(), and Foam::HashTableOps::values().

Here is the call graph for this function:

◆ sampleAndWrite() [3/3]

void sampleAndWrite ( const fieldGroup< Type > &  fields)
protected

Definition at line 82 of file patchProbesTemplates.C.

References fields, forAll, and patchProbes::sampleAndWrite().

Referenced by patchProbes::sampleAndWrite().

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

◆ sampleAndWriteSurfaceFields()

void sampleAndWriteSurfaceFields ( const fieldGroup< Type > &  fields)
protected

Definition at line 134 of file patchProbesTemplates.C.

References fields, and forAll.

◆ sample() [1/6]

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

Referenced by patchProbes::sample().

Here is the caller graph for this function:

◆ sample() [2/6]

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

◆ sample() [3/6]

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

◆ findElements()

void findElements ( const fvMesh mesh)
protectedvirtual

◆ TypeName()

TypeName ( "patchProbes"  )

◆ write()

bool write ( )
virtual

Reimplemented from probes.

Definition at line 249 of file patchProbes.C.

◆ read()

bool read ( const dictionary dict)
virtual

Reimplemented from probes.

Definition at line 270 of file patchProbes.C.

References dict, dictionary::get(), probes::read(), and dictionary::readIfPresent().

Here is the call graph for this function:

◆ sample() [4/6]

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

Definition at line 189 of file patchProbesTemplates.C.

References GeometricField::boundaryField(), forAll, patches, 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 225 of file patchProbesTemplates.C.

References objectRegistry::lookupObject(), probes::mesh_, and patchProbes::sample().

Here is the call graph for this function:

◆ sample() [6/6]

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

Member Data Documentation

◆ patchNames_

wordRes patchNames_
protected

Definition at line 97 of file patchProbes.H.

Referenced by patchProbes::findElements().


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