Set of locations to sample. More...
Data Structures | |
class | fieldGroup |
Class used for grouping field types. More... | |
Public Member Functions | |
TypeName ("probes") | |
Runtime type information. More... | |
probes (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false, const bool findElements=true) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~probes () |
Destructor. More... | |
virtual const word & | name () const |
Return name of the set of probes. More... | |
virtual const wordReList & | fieldNames () const |
Return names of fields to probe. More... | |
virtual const pointField & | probeLocations () const |
Return locations to probe. More... | |
virtual const point & | probe (const label i) const |
Return location for probe i. More... | |
const labelList & | elements () const |
Cells to be probed (obtained from the locations) More... | |
virtual void | execute () |
Execute, currently does nothing. More... | |
virtual void | end () |
Execute at the final time-loop, currently does nothing. More... | |
virtual void | timeSet () |
Called when time was set at the end of the Time::operator++. More... | |
virtual void | write () |
Sample and write. More... | |
virtual void | read (const dictionary &) |
Read the probes. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &) |
Update for changes of mesh. More... | |
virtual void | readUpdate (const polyMesh::readUpdateState state) |
Update for changes of mesh due to readUpdate. More... | |
template<class Type > | |
tmp< Field< Type > > | sample (const GeometricField< Type, fvPatchField, volMesh > &) const |
Sample a volume field at all locations. More... | |
template<class Type > | |
tmp< Field< Type > > | sample (const word &fieldName) const |
Sample a single vol field on all sample locations. More... | |
template<class Type > | |
tmp< Field< Type > > | sampleSurfaceFields (const word &fieldName) const |
Sample a single scalar field on all sample locations. More... | |
template<class Type > | |
tmp< Field< Type > > | sample (const GeometricField< Type, fvsPatchField, surfaceMesh > &) const |
Sample a surface field at all locations. More... | |
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 |
![]() | |
Field () | |
Construct null. More... | |
Field (const label) | |
Construct given size. More... | |
Field (const label, const Type &) | |
Construct given size and initial value. More... | |
Field (const UList< Type > &) | |
Construct as copy of a UList<Type> More... | |
Field (const Xfer< List< Type > > &) | |
Construct by transferring the List contents. More... | |
Field (const UList< Type > &mapF, const labelUList &mapAddressing) | |
Construct by 1 to 1 mapping from the given field. More... | |
Field (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing) | |
Construct by 1 to 1 mapping from the given tmp field. More... | |
Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights) | |
Construct by interpolative mapping from the given field. More... | |
Field (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights) | |
Construct by interpolative mapping from the given tmp field. More... | |
Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true) | |
Construct by mapping from the given field. More... | |
Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true) | |
Construct by mapping from the given tmp field. More... | |
Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true) | |
Construct by mapping from the given tmp field. Supplied uniform. More... | |
Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true) | |
Construct by mapping from the given tmp field. Supplied values. More... | |
Field (const Field< Type > &) | |
Construct as copy. More... | |
Field (Field< Type > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
Field (const Xfer< Field< Type > > &) | |
Construct by transferring the Field contents. More... | |
Field (const tmp< Field< Type > > &) | |
Construct as copy of tmp<Field> More... | |
Field (Istream &) | |
Construct from Istream. More... | |
Field (const word &keyword, const dictionary &, const label size) | |
Construct from a dictionary entry. More... | |
tmp< Field< Type > > | clone () const |
Clone. More... | |
void | map (const UList< Type > &mapF, const labelUList &mapAddressing) |
1 to 1 map from the given field More... | |
void | map (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing) |
1 to 1 map from the given tmp field More... | |
void | map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights) |
Interpolative map from the given field. More... | |
void | map (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights) |
Interpolative map from the given tmp field. More... | |
void | map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true) |
Map from the given field. More... | |
void | map (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true) |
Map from the given tmp field. More... | |
void | autoMap (const FieldMapper &map, const bool applyFlip=true) |
Map from self. More... | |
void | rmap (const UList< Type > &mapF, const labelUList &mapAddressing) |
1 to 1 reverse-map from the given field More... | |
void | rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing) |
1 to 1 reverse-map from the given tmp field More... | |
void | rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights) |
Interpolative reverse map from the given field. More... | |
void | rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights) |
Interpolative reverse map from the given tmp field. More... | |
void | negate () |
Negate this field. More... | |
tmp< Field< cmptType > > | component (const direction) const |
Return a component field of the field. More... | |
void | replace (const direction, const UList< cmptType > &) |
Replace a component field of the field. More... | |
void | replace (const direction, const tmp< Field< cmptType > > &) |
Replace a component field of the field. More... | |
void | replace (const direction, const cmptType &) |
Replace a component field of the field. More... | |
tmp< Field< Type > > | T () const |
Return the field transpose (only defined for second rank tensors) More... | |
void | writeEntry (const word &keyword, Ostream &os) const |
Write the field as a dictionary entry. More... | |
void | operator= (const Field< Type > &) |
void | operator= (const UList< Type > &) |
void | operator= (const SubField< Type > &) |
void | operator= (const tmp< Field< Type > > &) |
void | operator= (const Type &) |
template<class Form , class Cmpt , int 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 > | |
void | operator= (const Field< Type > &rhs) |
template<class Type > | |
void | operator= (const SubField< Type > &rhs) |
template<class Type > | |
void | operator= (const UList< Type > &rhs) |
template<class Type > | |
void | operator= (const tmp< Field > &rhs) |
template<class Type > | |
void | operator= (const Type &t) |
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... | |
void | readDict (const dictionary &dict) |
Read dictionary settings. More... | |
Private Member Functions | |
template<class Type > | |
void | sampleAndWrite (const GeometricField< Type, fvPatchField, volMesh > &) |
Sample and write a particular volume field. More... | |
template<class Type > | |
void | sampleAndWrite (const GeometricField< Type, fvsPatchField, surfaceMesh > &) |
Sample and write a particular surface field. More... | |
template<class Type > | |
void | sampleAndWrite (const fieldGroup< Type > &) |
Sample and write all the fields of the given type. More... | |
template<class Type > | |
void | sampleAndWriteSurfaceFields (const fieldGroup< Type > &) |
Sample and write all the surface fields of the given type. More... | |
probes (const probes &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const probes &) |
Disallow default bitwise assignment. More... | |
Additional Inherited Members | |
![]() | |
typedef pTraits< Type >::cmptType | cmptType |
Component type. More... | |
typedef SubField< Type > | subField |
Declare type of subField. More... | |
![]() | |
static const Field< Type > & | null () |
Return a null field. More... | |
template<class Type2 > | |
static tmp< Field< Type > > | NewCalculatedType (const Field< Type2 > &f) |
Return a pointer to a new calculatedFvPatchFieldField created on. More... | |
![]() | |
static const char *const | typeName |
Set of locations to sample.
Call write() to sample and write files.
Example of function object specification:
probes { type probes; functionObjectLibs ( "libsampling.so" ); // Name of the directory for probe data name probes; // Write at same frequency as fields outputControl outputTime; outputInterval 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 ); }
probes | ( | const word & | name, |
const objectRegistry & | obr, | ||
const dictionary & | dict, | ||
const bool | loadFromFiles = false , |
||
const bool | findElements = true |
||
) |
Construct for given objectRegistry and dictionary.
Allow the possibility to load fields from files
Definition at line 288 of file probes.C.
References dict.
|
protected |
Clear old field groups.
Definition at line 34 of file probesGrouping.C.
References DynamicList::clear(), probes::scalarFields_, probes::sphericalTensorFields_, probes::surfaceScalarFields_, probes::surfaceSphericalTensorFields_, probes::surfaceSymmTensorFields_, probes::surfaceTensorFields_, probes::surfaceVectorFields_, probes::symmTensorFields_, probes::tensorFields_, and probes::vectorFields_.
|
protected |
Append fieldName to the appropriate group.
Definition at line 51 of file probesGrouping.C.
|
protected |
Classify field types, returns the number of fields.
Definition at line 111 of file probesGrouping.C.
References Foam::findStrings(), forAll, and IOobjectList::sortedNames().
|
protectedvirtual |
Find cells and faces containing probes.
Reimplemented in patchProbes.
Definition at line 43 of file probes.C.
References List::clear(), probes::elementList_, Foam::endl(), probes::faceList_, forAll, Foam::Info, Foam::mag(), UPstream::master(), mesh, UPstream::myProcNo(), Foam::Pout, Foam::reduce(), List::setSize(), and WarningInFunction.
|
protected |
Classify field type and Open/close file streams,.
returns number of fields to sample
Definition at line 158 of file probes.C.
References IOstream::defaultPrecision(), polyMesh::defaultRegion, Foam::endl(), HashTable::erase(), forAll, forAllConstIter(), forAllIter, Foam::Info, HashSet< Key, Hash >::insert(), UPstream::master(), Foam::mkDir(), OFstream::name(), fileName::name(), Foam::nl, UPstream::parRun(), fileName::path(), Foam::setw(), and w().
|
protected |
Read dictionary settings.
Definition at line 266 of file probes.C.
References dict, dictionary::lookup(), dictionary::readIfPresent(), and WarningInFunction.
Referenced by patchProbes::readDict().
|
private |
Sample and write a particular volume field.
Definition at line 69 of file probesTemplates.C.
References Foam::endl(), forAll, Foam::setw(), and w().
Referenced by probes::sampleAndWrite().
|
private |
Sample and write a particular surface field.
Definition at line 93 of file probesTemplates.C.
References Foam::endl(), forAll, Foam::setw(), and w().
|
private |
Sample and write all the fields of the given type.
Definition at line 116 of file probesTemplates.C.
References HashTable< regIOobject * >::const_iterator, fields, HashTable::find(), forAll, probes::loadFromFiles_, objectRegistry::lookupObject(), probes::mesh_, IOobject::MUST_READ, IOobject::NO_WRITE, probes::sampleAndWrite(), fvMesh::time(), Time::timeName(), and Foam::type().
|
private |
Sample and write all the surface fields of the given type.
Definition at line 165 of file probesTemplates.C.
References HashTable< regIOobject * >::const_iterator, fields, forAll, IOobject::MUST_READ, IOobject::NO_WRITE, and Foam::type().
TypeName | ( | "probes" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the set of probes.
Definition at line 259 of file probes.H.
References probes::name_.
|
inlinevirtual |
Return names of fields to probe.
Definition at line 265 of file probes.H.
References probes::fieldSelection_.
|
inlinevirtual |
Return locations to probe.
Definition at line 271 of file probes.H.
Referenced by patchProbes::findElements().
|
inline |
Cells to be probed (obtained from the locations)
Definition at line 283 of file probes.H.
References probes::elementList_.
|
virtual |
|
virtual |
Called when time was set at the end of the Time::operator++.
|
virtual |
|
virtual |
Read the probes.
Reimplemented in patchProbes.
Definition at line 364 of file probes.C.
References dict, dictionary::readIfPresent(), and WarningInFunction.
|
virtual |
Update for changes of mesh.
Definition at line 389 of file probes.C.
References DynamicList::append(), Foam::endl(), forAll, Foam::Info, mapPolyMesh::reverseCellMap(), and mapPolyMesh::reverseFaceMap().
|
virtual |
Update for changes of mesh.
Definition at line 482 of file probes.C.
References Foam::endl(), and Foam::Info.
|
inlinevirtual |
tmp<Field<Type> > sample | ( | const GeometricField< Type, fvPatchField, volMesh > & | ) | const |
Sample a volume field at all locations.
Sample a single vol field on all sample locations.
Sample a single scalar field on all sample locations.
tmp<Field<Type> > sample | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | ) | const |
Sample a surface field at all locations.
Foam::tmp<Foam::Field<Type> > sample | ( | const GeometricField< Type, fvPatchField, volMesh > & | vField | ) | const |
Definition at line 217 of file probesTemplates.C.
References forAll, Pstream::listCombineGather(), and Pstream::listCombineScatter().
Foam::tmp<Foam::Field<Type> > sample | ( | const word & | fieldName | ) | const |
Definition at line 272 of file probesTemplates.C.
Foam::tmp<Foam::Field<Type> > sample | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | sField | ) | const |
Definition at line 287 of file probesTemplates.C.
References forAll, Pstream::listCombineGather(), and Pstream::listCombineScatter().
Foam::tmp<Foam::Field<Type> > sampleSurfaceFields | ( | const word & | fieldName | ) | const |
Definition at line 317 of file probesTemplates.C.
|
protected |
Name of this set of probes,.
Also used as the name of the probes directory.
Definition at line 129 of file probes.H.
Referenced by probes::name().
|
protected |
Const reference to fvMesh.
Definition at line 132 of file probes.H.
Referenced by patchProbes::sample(), and probes::sampleAndWrite().
|
protected |
Load fields from files (not from objectRegistry)
Definition at line 135 of file probes.H.
Referenced by probes::sampleAndWrite().
|
protected |
Names of fields to probe.
Definition at line 141 of file probes.H.
Referenced by probes::fieldNames().
|
protected |
|
protected |
|
protected |
Categorized scalar/vector/tensor vol fields.
Definition at line 156 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 157 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 158 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 159 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 160 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Categorized scalar/vector/tensor surf fields.
Definition at line 163 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 164 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 165 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 166 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 167 of file probes.H.
Referenced by probes::clearFieldGroups().
|
protected |
Definition at line 170 of file probes.H.
Referenced by probes::elements(), patchProbes::findElements(), and probes::findElements().
|
protected |
Definition at line 173 of file probes.H.
Referenced by patchProbes::findElements(), and probes::findElements().
|
protected |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.