FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

Set of locations to sample. More...

#include <sampling/probes.H>


Detailed Description

Set of locations to sample.

Call write() to sample and write files.

Source files

Definition at line 61 of file probes.H.

Inheritance diagram for probes:
Collaboration diagram for probes:

List of all members.

Classes

class  fieldGroup
 Class used for grouping field types. More...

Public Member Functions

 TypeName ("probes")
 Runtime type information.
 probes (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary.
virtual  ~probes ()
 Destructor.
virtual const word &  name () const
 Return name of the set of probes.
virtual const wordList &  fieldNames () const
 Return names of fields to probe.
virtual const vectorField &  probeLocations () const
 Return locations to probe.
const labelList &  elements () const
 Cells to be probed (obtained from the locations)
virtual void  execute ()
 Execute, currently does nothing.
virtual void  end ()
 Execute at the final time-loop, currently does nothing.
virtual void  write ()
 Sample and write.
virtual void  read (const dictionary &)
 Read the probes.
virtual void  updateMesh (const mapPolyMesh &)
 Update for changes of mesh.
virtual void  movePoints (const pointField &)
 Update for changes of mesh.
virtual void  readUpdate (const polyMesh::readUpdateState state)
 Update for changes of mesh due to readUpdate.
template<class Type >
tmp< Field< Type > >  sample (const GeometricField< Type, fvPatchField, volMesh > &) const
 Sample a volume field at all locations.
template<class Type >
tmp< Field< Type > >  sample (const word &fieldName) const
 Sample a single field on all sample locations.

Protected Member Functions

virtual void  findElements (const fvMesh &)
 Find element containing probes.
bool  checkFieldTypes ()
 classify field types, return true if nFields > 0
template<class Type >
label  countFields (fieldGroup< Type > &fieldList, const wordList &fieldTypes) const
 Find the fields in the list of the given type, return count.

Protected Attributes

word  name_
 Name of this set of probes,.
const objectRegistry &  obr_
 Const reference to objectRegistry.
bool  loadFromFiles_
 Load fields from files (not from objectRegistry)
wordList  fieldNames_
 Names of fields to probe.
vectorField  probeLocations_
 Locations to probe.
fieldGroup< scalar >  scalarFields_
 Categorized scalar/vector/tensor fields.
fieldGroup< vector >  vectorFields_
fieldGroup< sphericalTensor >  sphericalTensorFields_
fieldGroup< symmTensor >  symmTensorFields_
fieldGroup< tensor >  tensorFields_
labelList  elementList_
HashPtrTable< OFstream >  probeFilePtrs_
 Current open files.

Constructor & Destructor Documentation

probes ( const word &   name,
const objectRegistry &   obr,
const dictionary &   dict,
const bool   loadFromFiles = false  
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 277 of file probes.C.

~probes (  ) [virtual]

Destructor.

Definition at line 303 of file probes.C.


Member Function Documentation

void findElements ( const fvMesh &   mesh  ) [protected, virtual]
Foam::label countFields ( fieldGroup< Type > &   fieldList,
const wordList &   fieldTypes  
) const [protected]

Find the fields in the list of the given type, return count.

Definition at line 67 of file probesTemplates.C.

References forAll, and List< word >::setSize().

TypeName ( "probes"    )

Runtime type information.

virtual const word& name (  ) const [inline, virtual]

Return name of the set of probes.

Definition at line 189 of file probes.H.

References probes::name_.

virtual const wordList& fieldNames (  ) const [inline, virtual]

Return names of fields to probe.

Definition at line 195 of file probes.H.

References probes::fieldNames_.

virtual const vectorField& probeLocations (  ) const [inline, virtual]

Return locations to probe.

Definition at line 201 of file probes.H.

References probes::probeLocations_.

const labelList& elements (  ) const [inline]

Cells to be probed (obtained from the locations)

Definition at line 207 of file probes.H.

References probes::elementList_.

void execute (  ) [virtual]

Execute, currently does nothing.

Definition at line 309 of file probes.C.

void end (  ) [virtual]

Execute at the final time-loop, currently does nothing.

Definition at line 315 of file probes.C.

void write (  ) [virtual]

Sample and write.

Reimplemented in patchProbes.

Definition at line 321 of file probes.C.

void read ( const dictionary &   dict  ) [virtual]

Read the probes.

Reimplemented in patchProbes.

Definition at line 334 of file probes.C.

References List< T >::clear(), and dictionary::lookup().

Referenced by patchProbes::read().

virtual void updateMesh ( const mapPolyMesh &    ) [inline, virtual]

Update for changes of mesh.

Definition at line 225 of file probes.H.

virtual void movePoints ( const pointField &    ) [inline, virtual]

Update for changes of mesh.

Definition at line 229 of file probes.H.

virtual void readUpdate ( const polyMesh::readUpdateState   state  ) [inline, virtual]

Update for changes of mesh due to readUpdate.

Definition at line 233 of file probes.H.

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

Sample a volume field at all locations.

Definition at line 175 of file probesTemplates.C.

References forAll, Pstream::listCombineGather(), and Pstream::listCombineScatter().

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

Sample a single field on all sample locations.

Definition at line 205 of file probesTemplates.C.


Member Data Documentation

word name_ [protected]

Name of this set of probes,.

Also used as the name of the probes directory.

Definition at line 92 of file probes.H.

Referenced by probes::name().

const objectRegistry& obr_ [protected]

Const reference to objectRegistry.

Definition at line 95 of file probes.H.

bool loadFromFiles_ [protected]

Load fields from files (not from objectRegistry)

Definition at line 98 of file probes.H.

wordList fieldNames_ [protected]

Names of fields to probe.

Definition at line 104 of file probes.H.

Referenced by probes::fieldNames().

Locations to probe.

Definition at line 107 of file probes.H.

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

fieldGroup<scalar> scalarFields_ [protected]

Categorized scalar/vector/tensor fields.

Definition at line 113 of file probes.H.

Definition at line 114 of file probes.H.

Definition at line 115 of file probes.H.

Definition at line 116 of file probes.H.

Definition at line 117 of file probes.H.

labelList elementList_ [protected]

Definition at line 120 of file probes.H.

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

Current open files.

Definition at line 123 of file probes.H.


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