probes Class Reference

Set of locations to sample. More...

Inheritance diagram for probes:
Collaboration diagram for probes:

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 &time, const dictionary &dict, const bool initialise=true)
 Construct from Time and dictionary. More...
 
 probes (const probes &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~probes ()
 Destructor. More...
 
virtual wordList fields () const
 Return the list of fields required. More...
 
bool read (const dictionary &, const bool initialise)
 Read the probes. 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 movePoints (const polyMesh &)
 Update topology using the given map. More...
 
virtual void topoChange (const polyTopoChangeMap &)
 Update topology using the given map. More...
 
virtual void mapMesh (const polyMeshMap &)
 Update from another mesh using the given map. More...
 
virtual void distribute (const polyDistributionMap &)
 Update using the given distribution map. More...
 
void operator= (const probes &)=delete
 Disallow default bitwise assignment. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > sample (const VolField< Type > &vField) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > sample (const SurfaceField< Type > &sField) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > sample (const word &fieldName) const
 
template<class Type >
Foam::tmp< Foam::Field< Type > > sampleSurfaceFields (const word &fieldName) const
 
- Public Member Functions inherited from functionObject
 ClassName ("functionObject")
 
virtual const wordtype () 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, const Time &runTime)
 Construct from components. More...
 
 functionObject (const word &name, const Time &runTime, const dictionary &dict)
 Construct from dictionary. More...
 
autoPtr< functionObjectclone () const
 Return clone. More...
 
 functionObject (const functionObject &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~functionObject ()
 Destructor. More...
 
const wordname () const
 Return the name of this functionObject. More...
 
virtual bool executeAtStart () const
 Return true if the functionObject should be executed at the start. More...
 
virtual bool end ()
 Called when Time::run() determines that the time-loop exits. More...
 
virtual scalar timeToNextAction ()
 Called by Time::adjustTimeStep(). Allows the functionObject to. More...
 
virtual scalar maxDeltaT () const
 Return the maximum time-step for stable operation. More...
 
void operator= (const functionObject &)=delete
 Disallow default bitwise assignment. More...
 

Protected Member Functions

void clearFieldGroups ()
 Clear old field groups. More...
 
label appendFieldGroup (const word &fieldName, const word &fieldType)
 Append fieldName to the appropriate group. More...
 
label classifyFields ()
 Classify field types, returns the number of fields. More...
 
virtual void findElements (const fvMesh &)
 Find cells and faces containing probes. More...
 
label prepare ()
 Classify field type and Open/close file streams,. More...
 

Protected Attributes

const fvMeshmesh_
 Const reference to fvMesh. More...
 
pointField locations_
 Probe locations. More...
 
wordList fields_
 Names of fields to probe. More...
 
bool fixedLocations_
 Fixed locations, default = yes. More...
 
word interpolationScheme_
 Interpolation scheme name. More...
 
fieldGroup< scalar > scalarFields_
 Categorised scalar/vector/tensor vol fields. More...
 
fieldGroup< vectorvectorFields_
 
fieldGroup< sphericalTensorsphericalTensorFields_
 
fieldGroup< symmTensorsymmTensorFields_
 
fieldGroup< tensortensorFields_
 
fieldGroup< scalar > surfaceScalarFields_
 Categorised scalar/vector/tensor surf fields. More...
 
fieldGroup< vectorsurfaceVectorFields_
 
fieldGroup< sphericalTensorsurfaceSphericalTensorFields_
 
fieldGroup< symmTensorsurfaceSymmTensorFields_
 
fieldGroup< tensorsurfaceTensorFields_
 
labelList cellList_
 
labelList faceList_
 
HashPtrTable< OFstreamprobeFilePtrs_
 Current open files. More...
 
- Protected Attributes inherited from functionObject
const Timetime_
 Reference to time. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &, const dictionary &)
 Select from dictionary, based on its "type" entry. More...
 
- Public Attributes inherited from functionObject
Switch log
 Switch write log to Info. More...
 
Switch executeAtStart_
 Switch execute at start time. More...
 
- Static Public Attributes inherited from functionObject
static bool postProcess
 Global post-processing mode switch. More...
 

Detailed Description

Set of locations to sample.

Call write() to sample and write files.

Source files

Definition at line 63 of file probes.H.

Constructor & Destructor Documentation

◆ probes() [1/2]

probes ( const word name,
const Time time,
const dictionary dict,
const bool  initialise = true 
)

Construct from Time and dictionary.

Definition at line 261 of file probes.C.

References dict, and probes::read().

Here is the call graph for this function:

◆ probes() [2/2]

probes ( const probes )
delete

Disallow default bitwise copy construction.

◆ ~probes()

~probes ( )
virtual

Destructor.

Definition at line 290 of file probes.C.

Member Function Documentation

◆ clearFieldGroups()

◆ appendFieldGroup()

Foam::label appendFieldGroup ( const word fieldName,
const word fieldType 
)
protected

Append fieldName to the appropriate group.

Definition at line 50 of file probesGrouping.C.

References Foam::typeName().

Here is the call graph for this function:

◆ classifyFields()

Foam::label classifyFields ( )
protected

Classify field types, returns the number of fields.

Definition at line 111 of file probesGrouping.C.

References forAll.

◆ findElements()

◆ prepare()

Foam::label prepare ( )
protected

Classify field type and Open/close file streams,.

returns number of fields to sample

Definition at line 170 of file probes.C.

References IOstream::defaultPrecision(), polyMesh::defaultRegion, Foam::endl(), HashTable< T, Key, Hash >::erase(), forAll, forAllConstIter, forAllIter, Foam::Info, HashSet< Key, Hash >::insert(), UPstream::master(), Foam::mkDir(), OFstream::name(), Foam::name(), Foam::nl, writeFile::outputPrefix, Foam::setf(), and Foam::setw().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "probes"  )

Runtime type information.

◆ fields()

Foam::wordList fields ( ) const
virtual

Return the list of fields required.

Implements functionObject.

Definition at line 332 of file probes.C.

◆ read() [1/2]

bool read ( const dictionary dict,
const bool  initialise 
)

Read the probes.

Definition at line 296 of file probes.C.

References dict, dictionary::lookup(), dictionary::readIfPresent(), and WarningInFunction.

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

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

◆ read() [2/2]

bool read ( const dictionary dict)
virtual

Read the probes.

Reimplemented from functionObject.

Reimplemented in patchProbes.

Definition at line 326 of file probes.C.

References dict, and Foam::read().

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Execute, currently does nothing.

Implements functionObject.

Definition at line 338 of file probes.C.

◆ write()

bool write ( )
virtual

Sample and write.

Implements functionObject.

Reimplemented in patchProbes.

Definition at line 344 of file probes.C.

◆ movePoints()

void movePoints ( const polyMesh mesh)
virtual

Update topology using the given map.

Reimplemented from functionObject.

Definition at line 365 of file probes.C.

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

Here is the call graph for this function:

◆ topoChange()

void topoChange ( const polyTopoChangeMap map)
virtual

Update topology using the given map.

Reimplemented from functionObject.

Definition at line 378 of file probes.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), DebugInfo, UList< T >::empty(), Foam::endl(), forAll, Foam::Info, polyTopoChangeMap::mesh(), polyTopoChangeMap::reverseCellMap(), and polyTopoChangeMap::reverseFaceMap().

Here is the call graph for this function:

◆ mapMesh()

void mapMesh ( const polyMeshMap map)
virtual

Update from another mesh using the given map.

Reimplemented from functionObject.

Definition at line 458 of file probes.C.

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

Here is the call graph for this function:

◆ distribute()

void distribute ( const polyDistributionMap map)
virtual

Update using the given distribution map.

Reimplemented from functionObject.

Definition at line 468 of file probes.C.

References polyDistributionMap::cellMap(), DebugInfo, Foam::endl(), polyDistributionMap::faceMap(), forAll, polyDistributionMap::mesh(), polyDistributionMap::nOldCells(), and polyDistributionMap::nOldFaces().

Here is the call graph for this function:

◆ operator=()

void operator= ( const probes )
delete

Disallow default bitwise assignment.

◆ sample() [1/3]

Foam::tmp<Foam::Field<Type> > sample ( const VolField< Type > &  vField) const

Definition at line 164 of file probesTemplates.C.

References forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), Foam::tracking::position(), and tmp< T >::ref().

Here is the call graph for this function:

◆ sample() [2/3]

Foam::tmp<Foam::Field<Type> > sample ( const SurfaceField< Type > &  sField) const

Definition at line 217 of file probesTemplates.C.

References forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), and tmp< T >::ref().

Here is the call graph for this function:

◆ sample() [3/3]

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

Definition at line 245 of file probesTemplates.C.

◆ sampleSurfaceFields()

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

Definition at line 259 of file probesTemplates.C.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Const reference to fvMesh.

Definition at line 90 of file probes.H.

Referenced by probes::findElements().

◆ locations_

pointField locations_
protected

Probe locations.

Definition at line 96 of file probes.H.

Referenced by probes::findElements().

◆ fields_

wordList fields_
protected

Names of fields to probe.

Definition at line 99 of file probes.H.

◆ fixedLocations_

bool fixedLocations_
protected

Fixed locations, default = yes.

Note: set to false for moving mesh calculations where locations should move with the mesh

Definition at line 104 of file probes.H.

◆ interpolationScheme_

word interpolationScheme_
protected

Interpolation scheme name.

Note: only possible when fixedLocations_ is true

Definition at line 108 of file probes.H.

◆ scalarFields_

fieldGroup<scalar> scalarFields_
protected

Categorised scalar/vector/tensor vol fields.

Definition at line 114 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ vectorFields_

fieldGroup<vector> vectorFields_
protected

Definition at line 115 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ sphericalTensorFields_

fieldGroup<sphericalTensor> sphericalTensorFields_
protected

Definition at line 116 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ symmTensorFields_

fieldGroup<symmTensor> symmTensorFields_
protected

Definition at line 117 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ tensorFields_

fieldGroup<tensor> tensorFields_
protected

Definition at line 118 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceScalarFields_

fieldGroup<scalar> surfaceScalarFields_
protected

Categorised scalar/vector/tensor surf fields.

Definition at line 121 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceVectorFields_

fieldGroup<vector> surfaceVectorFields_
protected

Definition at line 122 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceSphericalTensorFields_

fieldGroup<sphericalTensor> surfaceSphericalTensorFields_
protected

Definition at line 123 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceSymmTensorFields_

fieldGroup<symmTensor> surfaceSymmTensorFields_
protected

Definition at line 124 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ surfaceTensorFields_

fieldGroup<tensor> surfaceTensorFields_
protected

Definition at line 125 of file probes.H.

Referenced by probes::clearFieldGroups().

◆ cellList_

labelList cellList_
protected

Definition at line 128 of file probes.H.

Referenced by probes::findElements().

◆ faceList_

labelList faceList_
protected

Definition at line 131 of file probes.H.

Referenced by probes::findElements().

◆ probeFilePtrs_

HashPtrTable<OFstream> probeFilePtrs_
protected

Current open files.

Definition at line 134 of file probes.H.


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