Set of locations to sample. More...
#include <sampling/probes.H>
Set of locations to sample.
Call write() to sample and write files.
Definition at line 61 of file probes.H.
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.
|
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
void findElements | ( | const fvMesh & | mesh ) | [protected, virtual]
|
Find element containing probes.
Reimplemented in patchProbes.
Definition at line 41 of file probes.C.
References probes::elementList_, UList< T >::empty(), Foam::endl(), primitiveMesh::findCell(), forAll, Pstream::master(), Pstream::myProcNo(), Foam::Pout, probes::probeLocations_, Foam::reduce(), List< T >::setSize(), List< T >::size(), and WarningIn.
bool checkFieldTypes | ( | ) | [protected]
|
classify field types, return true if nFields > 0
Definition at line 98 of file probes.C.
References Vector< Cmpt >::componentNames, HashTable< regIOobject * >::const_iterator, IOstream::defaultPrecision(), polyMesh::defaultRegion, Foam::endl(), Foam::findIndex(), forAll, forAllIter, IOobject::headerClassName(), IOobject::headerOk(), Pstream::master(), Foam::mkDir(), IOobject::MUST_READ, OFstream::name(), OSstream::name(), fileName::name(), VectorSpace< Vector< Cmpt >, Cmpt, 3 >::nComponents, Foam::nl, IOobject::NO_WRITE, Pstream::parRun(), fileName::path(), Foam::Pout, Foam::setw(), and List< T >::size().
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]
|
void end | ( | ) | [virtual]
|
void write | ( | ) | [virtual]
|
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]
|
virtual void movePoints | ( | const pointField & | ) | [inline, virtual]
|
virtual void readUpdate | ( | const polyMesh::readUpdateState | state ) | [inline, virtual]
|
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.
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.
bool loadFromFiles_ [protected]
|
Load fields from files (not from objectRegistry)
wordList fieldNames_ [protected]
|
Names of fields to probe.
Definition at line 104 of file probes.H.
Referenced by probes::fieldNames().
vectorField probeLocations_ [protected]
|
Locations to probe.
Definition at line 107 of file probes.H.
Referenced by probes::findElements(), patchProbes::findElements(), and probes::probeLocations().
fieldGroup<scalar> scalarFields_ [protected]
|
fieldGroup<vector> vectorFields_ [protected]
|
fieldGroup<sphericalTensor> sphericalTensorFields_ [protected]
|
fieldGroup<symmTensor> symmTensorFields_ [protected]
|
fieldGroup<tensor> tensorFields_ [protected]
|
labelList elementList_ [protected]
|
Definition at line 120 of file probes.H.
Referenced by probes::elements(), probes::findElements(), and patchProbes::findElements().
HashPtrTable<OFstream> probeFilePtrs_ [protected]
|