Set of locations to sample at patches. More...
Public Member Functions | |
TypeName ("patchProbes") | |
Runtime type information. More... | |
patchProbes (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false, const bool findElements=true) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~patchProbes () |
Destructor. More... | |
virtual void | write () |
Public members. More... | |
virtual void | read (const dictionary &) |
Read. 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 |
![]() | |
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 | 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 | |
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... | |
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 GeometricField< Type, fvsPatchField, surfaceMesh > &) const |
Sample a surface field at all locations. More... | |
template<class Type > | |
tmp< Field< Type > > | sample (const word &fieldName) const |
Sample a single field on all sample locations. More... | |
virtual void | findElements (const fvMesh &) |
Find elements containing patchProbes. More... | |
void | readDict (const dictionary &dict) |
Read dictionary settings. More... | |
![]() | |
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... | |
label | prepare () |
Classify field type and Open/close file streams,. More... | |
void | readDict (const dictionary &dict) |
Read dictionary settings. More... | |
Private Member Functions | |
patchProbes (const patchProbes &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const patchProbes &) |
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 at patches.
Call write() to sample and write files.
Example of function object specification:
patchProbes { type patchProbes; functionObjectLibs ( "libsampling.so" ); // Name of the directory for probe data name patchProbes; // Patches to sample (wildcards allowed) patches (".*inl.*"); // Write at same frequency as fields outputControl outputTime; outputInterval 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 ); }
Definition at line 92 of file patchProbes.H.
|
private |
Disallow default bitwise copy construct.
patchProbes | ( | 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 221 of file patchProbes.C.
References dict.
|
virtual |
Destructor.
Definition at line 246 of file patchProbes.C.
|
protected |
Sample and write a particular volume field.
Definition at line 35 of file patchProbesTemplates.C.
References Foam::endl(), forAll, Foam::setw(), and w().
|
protected |
Sample and write a particular surface field.
Definition at line 61 of file patchProbesTemplates.C.
References Foam::endl(), forAll, Foam::setw(), and w().
|
protected |
Sample and write all the fields of the given type.
Definition at line 87 of file patchProbesTemplates.C.
References fields, forAll, and Foam::type().
|
protected |
Sample and write all the surface fields of the given type.
Definition at line 139 of file patchProbesTemplates.C.
References fields, forAll, and Foam::type().
|
protected |
Sample a volume field at all locations.
Referenced by patchProbes::findElements(), and patchProbes::sample().
|
protected |
Sample a surface field at all locations.
Sample a single field on all sample locations.
|
protectedvirtual |
Find elements containing patchProbes.
Reimplemented from probes.
Definition at line 43 of file patchProbes.C.
References indexedOctree::bb(), Foam::e, probes::elementList_, Foam::endl(), treeBoundBox::extend(), f(), probes::faceList_, indexedOctree::findNearest(), Tuple2::first(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), Foam::Info, treeBoundBox::invertedBox, Pstream::listCombineGather(), Pstream::listCombineScatter(), boundBox::mag(), Foam::magSqr(), boundBox::max(), Foam::max(), mesh, boundBox::min(), Foam::min(), UPstream::myProcNo(), patchi, patchProbes::patchNames_, polyBoundaryMesh::patchSet(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), probes::probeLocations(), rndGen(), patchProbes::sample(), Tuple2::second(), List::setSize(), indexedOctree::shapes(), List::size(), PtrList::size(), HashTable::sortedToc(), Foam::sqr(), polyPatch::start(), WarningInFunction, and polyBoundaryMesh::whichPatch().
|
protected |
Read dictionary settings.
Definition at line 207 of file patchProbes.C.
References dict, dictionary::lookup(), probes::readDict(), and dictionary::readIfPresent().
|
private |
Disallow default bitwise assignment.
TypeName | ( | "patchProbes" | ) |
Runtime type information.
|
virtual |
Public members.
Sample and write
Reimplemented from probes.
Definition at line 250 of file patchProbes.C.
|
virtual |
Foam::tmp<Foam::Field<Type> > sample | ( | const GeometricField< Type, fvPatchField, volMesh > & | vField | ) | const |
Definition at line 194 of file patchProbesTemplates.C.
References GeometricField::boundaryField(), forAll, and patches.
Foam::tmp<Foam::Field<Type> > sample | ( | const word & | fieldName | ) | const |
Definition at line 230 of file patchProbesTemplates.C.
References objectRegistry::lookupObject(), probes::mesh_, and patchProbes::sample().
Foam::tmp<Foam::Field<Type> > sample | ( | const GeometricField< Type, fvsPatchField, surfaceMesh > & | sField | ) | const |
Definition at line 245 of file patchProbesTemplates.C.
References GeometricField::boundaryField(), forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), and patches.
|
protected |
Patches to sample.
Definition at line 101 of file patchProbes.H.
Referenced by patchProbes::findElements().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.