Loading...
Searching...
No Matches
patchFieldProbe Class Reference

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>

Inheritance diagram for patchFieldProbe:
Collaboration diagram for patchFieldProbe:

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 labelListpatchIDs () 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 wordsamplePointScheme () const
 Return the interpolation scheme to obtain values at the points.
const pointFieldprobeLocations () const
 Return const reference to the probe locations.
pointFieldprobeLocations ()
 Return reference to the probe locations.
const pointprobe (const label i) const
 Return the location of probe i.
const labelListelements () const
 Cells to be probed (obtained from the locations).
const labelListfaces () const
 Return const reference to the faces to be probed.
const labelListprocessors () const
 Return const reference to the processor list.
const labelListpatchIDList () const noexcept
 Return const reference to the patch ID list.
const pointFieldoldPoints () 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 fvMeshthisMesh_
 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.

Detailed Description

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.

Source files

Definition at line 60 of file patchFieldProbe.H.

Constructor & Destructor Documentation

◆ patchFieldProbe()

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().

Here is the call graph for this function:

◆ ~patchFieldProbe()

virtual ~patchFieldProbe ( )
virtualdefault

Destructor.

Member Function Documentation

◆ findElements()

◆ TypeName()

TypeName ( "patchFieldProbe" )

Runtime type information.

References dict, and mesh.

◆ patchIDs()

const labelList & patchIDs ( ) const
inlinenoexcept

Return the index of the patches to sample.

Definition at line 120 of file patchFieldProbe.H.

References Foam::noexcept, and patchIDs_.

◆ sample() [1/3]

template<class Type>
tmp< Field< Type > > sample ( const VolumeField< Type > & ) const

Sample a volume field at all locations.

Referenced by findElements().

Here is the caller graph for this function:

◆ sample() [2/3]

template<class Type>
tmp< Field< Type > > sample ( const SurfaceField< Type > & ) const

Sample a surface field at all locations.

◆ sample() [3/3]

template<class Type>
tmp< Field< Type > > sample ( const word & fieldName) const

Sample a volume field at all locations.

◆ sampleSurfaceField()

template<class Type>
tmp< Field< Type > > sampleSurfaceField ( const word & fieldName) const

Sample a surface field at all locations.

◆ read()

bool read ( const dictionary & dict)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ patchNames_

wordRes patchNames_
protected

Names of the patches to sample.

Definition at line 71 of file patchFieldProbe.H.

Referenced by findElements(), and read().

◆ patchIDs_

labelList patchIDs_
protected

Index of the patches to sample.

Definition at line 76 of file patchFieldProbe.H.

Referenced by findElements(), and patchIDs().


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