sampledMeshedSurfaceNormal.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) 2017-2020 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::sampledMeshedSurfaceNormal
28
29Description
30 Variant of sampledMeshedSurface that samples the surface-normal component
31 of a vector field.
32
33 Returns a vector field with the value in the first component and sets
34 the other two to zero.
35
36 This is often embedded as part of a sampled surfaces function object.
37
38Usage
39 Example of function object partial specification:
40 \verbatim
41 surfaces
42 {
43 surface1
44 {
45 type sampledMeshedSurfaceNormal;
46 surface something.obj;
47 source cells;
48 }
49 }
50 \endverbatim
51
52 Where the sub-entries comprise:
53 \table
54 Property | Description | Required | Default
55 type | meshedSurfaceNormal | yes |
56 surface | surface name in triSurface/ | yes |
57 patches | Limit to named surface regions (wordRes) | no |
58 source | cells/insideCells/boundaryFaces | yes |
59 keepIds | pass through id numbering | no | false
60 \endtable
61
62SeeAlso
63 Foam::sampledMeshedSurface
64
65SourceFiles
66 sampledMeshedSurfaceNormal.C
67 sampledMeshedSurfaceNormalTemplates.C
68
69\*---------------------------------------------------------------------------*/
70
71#ifndef sampledMeshedSurfaceNormal_H
72#define sampledMeshedSurfaceNormal_H
73
75
76// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78namespace Foam
79{
80
81/*---------------------------------------------------------------------------*\
82 Class sampledMeshedSurfaceNormal Declaration
83\*---------------------------------------------------------------------------*/
84
85class sampledMeshedSurfaceNormal
86:
87 public sampledMeshedSurface
88{
89public:
90
91 //- Runtime type information
92 TypeName("sampledMeshedSurfaceNormal");
93
94
95 // Constructors
96
97 //- Construct from components
99 (
100 const word& name,
101 const polyMesh& mesh,
102 const word& surfaceName,
103 const samplingSource sampleSource
104 );
105
106 //- Construct from dictionary
108 (
109 const word& name,
110 const polyMesh& mesh,
111 const dictionary& dict
112 );
113
115 //- Destructor
116 virtual ~sampledMeshedSurfaceNormal() = default;
117
118
119 // Member Functions
120
121 // Sample
122
123 //- Sample volume field onto surface faces
125 (
126 const interpolation<scalar>& sampler
127 ) const
128 {
130 return nullptr;
131 }
132
133 //- Sample volume field onto surface faces
135 (
136 const interpolation<vector>& sampler
137 ) const;
138
139 //- Sample volume field onto surface faces
141 (
142 const interpolation<sphericalTensor>& sampler
143 ) const
144 {
146 return nullptr;
147 }
148
149 //- Sample volume field onto surface faces
151 (
152 const interpolation<symmTensor>& sampler
153 ) const
154 {
156 return nullptr;
157 }
158
159 //- Sample volume field onto surface faces
161 (
162 const interpolation<tensor>& sampler
163 ) const
164 {
166 return nullptr;
167 }
168
170 // Interpolate
171
172 //- Interpolate volume field onto surface points
174 (
175 const interpolation<scalar>& interpolator
176 ) const
177 {
179 return nullptr;
180 }
181
182 //- Interpolate volume field onto surface points
184 (
185 const interpolation<vector>& interpolator
186 ) const;
187
188 //- Interpolate volume field onto surface points
190 (
191 const interpolation<sphericalTensor>& interpolator
192 ) const
193 {
195 return nullptr;
196 }
197
198 //- Interpolate volume field onto surface points
200 (
201 const interpolation<symmTensor>& interpolator
202 ) const
203 {
205 return nullptr;
206 }
207
208 //- Interpolate volume field onto surface points
210 (
211 const interpolation<tensor>& interpolator
212 ) const
213 {
215 return nullptr;
216 }
217};
219
220// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221
222} // End namespace Foam
223
224// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225
226#endif
227
228// ************************************************************************* //
Minimal example by using system/controlDict.functions:
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base class for volume field interpolation.
Definition: interpolation.H:60
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Variant of sampledMeshedSurface that samples the surface-normal component of a vector field.
sampledMeshedSurfaceNormal(const word &name, const polyMesh &mesh, const word &surfaceName, const samplingSource sampleSource)
Construct from components.
virtual ~sampledMeshedSurfaceNormal()=default
Destructor.
virtual tmp< sphericalTensorField > sample(const interpolation< sphericalTensor > &sampler) const
Sample volume field onto surface faces.
virtual tmp< scalarField > interpolate(const interpolation< scalar > &interpolator) const
Interpolate volume field onto surface points.
virtual tmp< tensorField > interpolate(const interpolation< tensor > &interpolator) const
Interpolate volume field onto surface points.
virtual tmp< symmTensorField > sample(const interpolation< symmTensor > &sampler) const
Sample volume field onto surface faces.
virtual tmp< tensorField > sample(const interpolation< tensor > &sampler) const
Sample volume field onto surface faces.
virtual tmp< scalarField > sample(const interpolation< scalar > &sampler) const
Sample volume field onto surface faces.
virtual tmp< sphericalTensorField > interpolate(const interpolation< sphericalTensor > &interpolator) const
Interpolate volume field onto surface points.
virtual tmp< symmTensorField > interpolate(const interpolation< symmTensor > &interpolator) const
Interpolate volume field onto surface points.
TypeName("sampledMeshedSurfaceNormal")
Runtime type information.
A sampledSurface from a meshed surface. It samples on the points/faces of the meshed surface.
samplingSource
Types of sampling regions.
const word & name() const noexcept
Name of surface.
const polyMesh & mesh() const noexcept
Access to the underlying mesh.
bool interpolate() const noexcept
Same as isPointData()
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73