Loading...
Searching...
No Matches
internalFieldProbe Class Reference

A utility class for probing field values at specified point locations within an fvMesh. More...

#include <internalFieldProbe.H>

Inheritance diagram for internalFieldProbe:
Collaboration diagram for internalFieldProbe:

Public Member Functions

 TypeName ("internalFieldProbe")
 Runtime type information.
 internalFieldProbe (const fvMesh &mesh, const dictionary &dict)
 Construct from Time and dictionary.
virtual ~internalFieldProbe ()=default
 Destructor.
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 cells and faces containing probes.

Additional Inherited Members

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

A utility class for probing field values at specified point locations within an fvMesh.

The internalFieldProbe stores a list of 3D point coordinates and determines the corresponding mesh elements (cells or faces) that contain these points. It provides methods to sample volume or surface fields at the stored locations, with support for fixed or mesh-moving point coordinates.

Features include:

  • Reading probe locations and settings from a dictionary
  • Support for fixed or moving locations (for dynamic mesh cases)
  • Optional inclusion of points that lie outside of the mesh domain
  • Selection of interpolation/sampling schemes for fixed locations
  • Sampling of volume and surface fields by name or by direct reference
  • Automatic update of element mapping when the mesh changes or moves
Source files

Definition at line 63 of file internalFieldProbe.H.

Constructor & Destructor Documentation

◆ internalFieldProbe()

internalFieldProbe ( const fvMesh & mesh,
const dictionary & dict )

Construct from Time and dictionary.

Definition at line 155 of file internalFieldProbe.C.

References dict, mesh, probeModel::probeModel(), and read().

Referenced by radiometerProbes::radiometerProbes().

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

◆ ~internalFieldProbe()

virtual ~internalFieldProbe ( )
virtualdefault

Destructor.

Member Function Documentation

◆ findElements()

void findElements ( const fvMesh & mesh)
protectedvirtual

Find cells and faces containing probes.

Implements probeModel.

Definition at line 34 of file internalFieldProbe.C.

References probeModel::cellIds_, DebugInfo, Foam::endl(), probeModel::faceIds_, forAll, Foam::mag(), UPstream::master(), mesh, UPstream::myProcNo(), Foam::nl, Foam::Pout, probeModel::probeLocations(), probeModel::procIds_, Foam::reduce(), and WarningInFunction.

Referenced by read().

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

◆ TypeName()

TypeName ( "internalFieldProbe" )

Runtime type information.

References dict, and mesh.

◆ sample() [1/3]

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

Sample a volume field at all locations.

Referenced by radiometerProbes::execute(), and thermoCoupleProbes::thermoCoupleProbes().

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 radiometerProbes.

Definition at line 169 of file internalFieldProbe.C.

References dict, findElements(), probeModel::read(), and probeModel::thisMesh_.

Referenced by internalFieldProbe(), and radiometerProbes::read().

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

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