Utility class for probing specified points on user-selected boundary patches. The input points are projected onto the nearest point of the nearest face on the specified patch, ensuring sampling occurs at valid patch locations. More...
#include <patchFieldProbe.H>


Public Member Functions | |
| TypeName ("patchFieldProbe") | |
| Runtime type information. | |
| patchFieldProbe (const fvMesh &mesh, const dictionary &dict) | |
| Construct from Time and dictionary. | |
| virtual | ~patchFieldProbe ()=default |
| Destructor. | |
| const labelList & | patchIDs () const noexcept |
| Return the index of the patches to sample. | |
| template<class Type> | |
| tmp< Field< Type > > | sample (const VolumeField< Type > &) const |
| Sample a volume field at all locations. | |
| template<class Type> | |
| tmp< Field< Type > > | sample (const SurfaceField< Type > &) const |
| Sample a surface field at all locations. | |
| template<class Type> | |
| tmp< Field< Type > > | sample (const word &fieldName) const |
| Sample a volume field at all locations. | |
| template<class Type> | |
| tmp< Field< Type > > | sampleSurfaceField (const word &fieldName) const |
| Sample a surface field at all locations. | |
| virtual bool | read (const dictionary &) |
| Read the settings dictionary. | |
| Public Member Functions inherited from probeModel | |
| TypeName ("probeModel") | |
| Runtime type information. | |
| probeModel (const probeModel &)=delete | |
| No copy construct. | |
| void | operator= (const probeModel &)=delete |
| No copy assignment. | |
| probeModel (const fvMesh &mesh, const dictionary &dict) | |
| Construct from Time and dictionary. | |
| virtual | ~probeModel ()=default |
| Destructor. | |
| bool | empty () const |
| Return true if no probe locations. | |
| label | size () const |
| Return number of probe locations. | |
| bool | fixedLocations () const |
| Return true if fixed locations. | |
| bool | includeOutOfBounds () const |
| Return true if include out of bounds probes. | |
| const word & | samplePointScheme () const |
| Return the interpolation scheme to obtain values at the points. | |
| const pointField & | probeLocations () const |
| Return const reference to the probe locations. | |
| pointField & | probeLocations () |
| Return reference to the probe locations. | |
| const point & | probe (const label i) const |
| Return the location of probe i. | |
| const labelList & | elements () const |
| Cells to be probed (obtained from the locations). | |
| const labelList & | faces () const |
| Return const reference to the faces to be probed. | |
| const labelList & | processors () const |
| Return const reference to the processor list. | |
| const labelList & | patchIDList () const noexcept |
| Return const reference to the patch ID list. | |
| const pointField & | oldPoints () const noexcept |
| Return const reference to the original probe locations. | |
| virtual void | updateMesh (const mapPolyMesh &) |
| Update for changes of mesh. | |
| virtual void | movePoints (const polyMesh &) |
| Update for changes of mesh. | |
Protected Member Functions | |
| virtual void | findElements (const fvMesh &mesh) |
| Find elements containing patchFieldProbe. | |
Protected Attributes | |
| wordRes | patchNames_ |
| Names of the patches to sample. | |
| labelList | patchIDs_ |
| Index of the patches to sample. | |
| Protected Attributes inherited from probeModel | |
| const fvMesh & | thisMesh_ |
| Const reference to the mesh. | |
| bool | fixedLocations_ |
| Fixed locations (default: true). | |
| bool | includeOutOfBounds_ |
| Include probes that were not found (default: true). | |
| word | samplePointScheme_ |
| Interpolation/sample scheme to obtain values at the points. | |
| pointField | probes_ |
| Probe locations. | |
| labelList | cellIds_ |
| Cells to be probed (obtained from the locations). | |
| labelList | faceIds_ |
| Faces to be probed. | |
| labelList | procIds_ |
| Processor holding the cell or face (-1 if point not found on any processor). | |
| labelList | patchIds_ |
| Patch IDs on which the new probes are located. | |
| pointField | oldPoints_ |
| Original probes location. | |
Utility class for probing specified points on user-selected boundary patches. The input points are projected onto the nearest point of the nearest face on the specified patch, ensuring sampling occurs at valid patch locations.
The patchFieldProbe enables sampling of both volume and surface fields at these snapped locations. Patch selection is controlled via patch names or indices, and the class provides runtime selection and dictionary-driven configuration.
Typical usage involves specifying patch names and probe locations in a dictionary, after which the class manages the mapping and sampling operations.
Definition at line 60 of file patchFieldProbe.H.
| patchFieldProbe | ( | const fvMesh & | mesh, |
| const dictionary & | dict ) |
Construct from Time and dictionary.
Definition at line 211 of file patchFieldProbe.C.
References dict, mesh, probeModel::probeModel(), and read().

|
virtualdefault |
Destructor.
|
protectedvirtual |
Find elements containing patchFieldProbe.
Implements probeModel.
Definition at line 37 of file patchFieldProbe.C.
References boundBox::add(), indexedOctree< Type >::bb(), probeModel::cellIds_, Vector< Cmpt >::distSqr(), e, Foam::endl(), f(), probeModel::faceIds_, Tuple2< T1, T2 >::first(), UList< T >::first(), forAll, PointIndexHit< PointType >::hit(), PointIndexHit< PointType >::index(), boundBox::inflate(), Foam::Info, InfoInFunction, Foam::isA(), Pstream::listCombineReduce(), boundBox::mag(), mesh, UPstream::myProcNo(), Foam::nl, probeModel::oldPoints_, patchIDs_, probeModel::patchIds_, patchNames_, polyBoundaryMesh::patchSet(), PointIndexHit< PointType >::point(), pp(), probeModel::probeLocations(), probeModel::procIds_, Foam::reduce(), rndGen, sample(), Tuple2< T1, T2 >::second(), indexedOctree< Type >::shapes(), probeModel::size(), UList< T >::size(), UPtrList< T >::size(), HashTable< T, Key, Hash >::sortedToc(), Foam::sqr(), WarningInFunction, and polyBoundaryMesh::whichPatch().
Referenced by read().


|
inlinenoexcept |
Return the index of the patches to sample.
Definition at line 120 of file patchFieldProbe.H.
References Foam::noexcept, and patchIDs_.
| tmp< Field< Type > > sample | ( | const VolumeField< Type > & | ) | const |
Sample a volume field at all locations.
Referenced by findElements().

| tmp< Field< Type > > sample | ( | const SurfaceField< Type > & | ) | const |
Sample a surface field at all locations.
Sample a volume field at all locations.
Sample a surface field at all locations.
|
virtual |
Read the settings dictionary.
Reimplemented from probeModel.
Reimplemented in gauge.
Definition at line 225 of file patchFieldProbe.C.
References dict, findElements(), patchNames_, probeModel::read(), and probeModel::thisMesh_.
Referenced by patchFieldProbe().


|
protected |
Names of the patches to sample.
Definition at line 71 of file patchFieldProbe.H.
Referenced by findElements(), and read().
|
protected |
Index of the patches to sample.
Definition at line 76 of file patchFieldProbe.H.
Referenced by findElements(), and patchIDs().