sampledPatchInternalField.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 | Copyright (C) 2011-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::sampledPatchInternalField
26 
27 Description
28  Variation of sampledPatch that samples the internalField (at a given
29  normal distance from the patch) instead of the patchField.
30  Note:
31  - interpolate=false : get cell value on faces
32  - interpolate=true : interpolate inside cell and interpolate to points
33  There is no option to get interpolated value inside the cell on the faces.
34 
35 SourceFiles
36  sampledPatchInternalField.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef sampledPatchInternalField_H
41 #define sampledPatchInternalField_H
42 
43 #include "sampledPatch.H"
44 #include "mappedPatchBase.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class sampledPatchInternalField Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public sampledPatch
58 {
59  // Private data
60 
61  //- Mapping engines
62  PtrList<mappedPatchBase> mappers_;
63 
64 
65  // Private Member Functions
66 
67  //- Sample field on faces
68  template<class Type>
69  tmp<Field<Type>> sampleField
70  (
72  ) const;
73 
74  template<class Type>
75  tmp<Field<Type>> interpolateField(const interpolation<Type>&) const;
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("sampledPatchInternalField");
82 
83 
84  // Constructors
85 
86  //- Construct from dictionary
88  (
89  const word& name,
90  const polyMesh& mesh,
91  const dictionary& dict
92  );
93 
94 
95  //- Destructor
97 
98 
99  // Member Functions
100 
101  // Sample
102 
103  //- Sample field on surface
104  virtual tmp<scalarField> sample
105  (
106  const volScalarField&
107  ) const;
108 
109  //- Sample field on surface
110  virtual tmp<vectorField> sample
111  (
112  const volVectorField&
113  ) const;
114 
115  //- Sample field on surface
117  (
119  ) const;
120 
121  //- Sample field on surface
123  (
124  const volSymmTensorField&
125  ) const;
126 
127  //- Sample field on surface
128  virtual tmp<tensorField> sample
129  (
130  const volTensorField&
131  ) const;
132 
133 
134  // Interpolate
135 
136  //- Interpolate field on surface
138  (
139  const interpolation<scalar>&
140  ) const;
141 
142  //- Interpolate field on surface
144  (
145  const interpolation<vector>&
146  ) const;
147 
148  //- Interpolate field on surface
150  (
152  ) const;
153 
154  //- Interpolate field on surface
156  (
158  ) const;
159 
160  //- Interpolate field on surface
162  (
163  const interpolation<tensor>&
164  ) const;
165 
166 
167  //- Write
168  virtual void print(Ostream&) const;
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #ifdef NoRepository
180 #endif
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
dictionary dict
Variation of sampledPatch that samples the internalField (at a given normal distance from the patch) ...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Generic GeometricField class.
A sampledSurface on patches. Non-triangulated by default.
Definition: sampledPatch.H:49
const polyMesh & mesh() const
Access to the underlying mesh.
A class for handling words, derived from string.
Definition: word.H:59
virtual void print(Ostream &) const
Write.
const word & name() const
Name of surface.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual tmp< scalarField > sample(const volScalarField &) const
Sample field on surface.
TypeName("sampledPatchInternalField")
Runtime type information.
bool interpolate() const
Interpolation requested for surface.
virtual ~sampledPatchInternalField()
Destructor.
sampledPatchInternalField(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:62
Abstract base class for interpolation.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.