Loading...
Searching...
No Matches
patchProbes.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2016-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::patchProbes
29
30Description
31 Probes the specified points on specified patches. The points get snapped
32 onto the nearest point on the nearest face of the specified patch, and the
33 sampling is actioned on the snapped locations.
34
35Usage
36 Minimal example by using \c system/controlDict.functions:
37 \verbatim
38 patchProbes
39 {
40 // Mandatory entries
41 type patchProbes;
42 libs (sampling);
43
44 fields (<wordRes>);
45 probeLocations (<vectorList>);
46 patches (<wordRes>); // or patch <word>;
47
48 // Optional entries
49 verbose <bool>;
50 sampleOnExecute <bool>;
51 fixedLocations <bool>;
52 includeOutOfBounds <bool>;
53 interpolationScheme <word>;
54
55 ...
56 }
57 \endverbatim
58
59 where the entries mean:
60 \table
61 Property | Description | Type | Reqd | Deflt
62 type | Type name: patchProbes | word | yes | -
63 libs | Library name: sampling | word | yes | -
64 fields | Names of the fields to be probed | wordRes | yes | -
65 probeLocations | Locations of the probes | vectorField | yes | -
66 patches | Patches to sample (wildcards allowed) | wordRes | yes | -
67 verbose | Enable/disable verbose output | bool | no | false
68 sampleOnExecute | Sample on execution and store results | bool | no <!--
69 --> | false
70 fixedLocations | Do not recalculate cells if mesh moves | bool | no | true
71 includeOutOfBounds | Include out-of-bounds locations | bool | no | true
72 interpolationScheme | Scheme to obtain values at the points | word <!--
73 --> | no | cell
74 \endtable
75
76 The inherited entries are elaborated in:
77 - \link fvMeshFunctionObject.H \endlink
78 - \link Probes.H \endlink
79 - \link patchFieldProbe.H \endlink
80 - \link probeModel.H \endlink
81
82Note
83 - The \c includeOutOfBounds filters out points that haven't been found.
84 Default is to include them (with value \c -VGREAT).
85
86SourceFiles
87 patchProbes.C
88
89\*---------------------------------------------------------------------------*/
90
91#ifndef Foam_patchProbes_H
92#define Foam_patchProbes_H
93
94#include "Probes.H"
95#include "patchFieldProbe.H"
96
97// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98
99namespace Foam
100{
101
102/*---------------------------------------------------------------------------*\
103 Class patchProbes Declaration
104\*---------------------------------------------------------------------------*/
105
106class patchProbes
107:
108 public Probes<patchFieldProbe>
109{
110 // Private Data
111
112 //- Use simpler synonym for the base type
113 using Base = Probes<patchFieldProbe>;
114
115
116public:
117
118 //- Runtime type information
119 TypeName("patchProbes");
120
121
122 // Constructors
123
124 //- Construct from name, Time and dictionary
126 (
127 const word& name,
128 const Time& runTime,
129 const dictionary& dict,
130 const bool loadFromFiles = false,
131 const bool readFields = true
132 );
133
134
135 //- Destructor
136 virtual ~patchProbes() = default;
137
138
139 // Member Functions
140
141 //- Bring Base::probeModel into this class's public scope.
142 using Base::probeModel;
143
144 //- Read the settings from the dictionary
145 virtual bool read(const dictionary&);
146};
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150} // End namespace Foam
151
152// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154#endif
155
156// ************************************************************************* //
Base class for sampling fields at specified locations and writing to file. The locations are specifie...
Definition Probes.H:61
const patchFieldProbe & probeModel() const noexcept
Definition Probes.H:250
Probes(const word &name, const Time &runTime, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const word & name() const noexcept
Return the name of this functionObject.
Probes the specified points on specified patches. The points get snapped onto the nearest point on th...
patchProbes(const word &name, const Time &runTime, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true)
Construct from name, Time and dictionary.
Definition patchProbes.C:41
TypeName("patchProbes")
Runtime type information.
virtual ~patchProbes()=default
Destructor.
virtual bool read(const dictionary &)
Read the settings from the dictionary.
Definition patchProbes.C:67
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Namespace for OpenFOAM.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68