Loading...
Searching...
No Matches
surfaceInterpolate.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-2020 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::functionObjects::surfaceInterpolate
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Linearly interpolates volume fields to generate surface fields.
35
36 Operands:
37 \table
38 Operand | Type | Location
39 input | vol<Type>Field | <time>/inputFields
40 output file | - | -
41 output field | surfaceTypeField | <time>/outputField
42 \endtable
43
44 where \c Type can be one of:
45 \c Scalar, \c Vector, \c SphericalTensor, \c SymmTensor, or \c Tensor.
46
47Usage
48 Minimal example by using \c system/controlDict.functions:
49 \verbatim
50 surfaceInterpolateFO
51 {
52 // Mandatory entries
53 type surfaceInterpolate;
54 libs (fieldFunctionObjects);
55 fields ((<inpField1> <outField1>) ... (<inpFieldN> <outFieldN>));
56
57 // Inherited entries
58 ...
59 }
60 \endverbatim
61
62 where the entries mean:
63 \table
64 Property | Description | Type | Reqd | Deflt
65 type | Type name: surfaceInterpolate | word | yes | -
66 libs | Library name: fieldFunctionObjects | word | yes | -
67 fields | Names of operand and output fields | wordList | yes | -
68 \endtable
69
70 The inherited entries are elaborated in:
71 - \link functionObject.H \endlink
72
73SourceFiles
74 surfaceInterpolate.C
75 surfaceInterpolateTemplates.C
76
77\*---------------------------------------------------------------------------*/
78
79#ifndef Foam_functionObjects_surfaceInterpolate_H
80#define Foam_functionObjects_surfaceInterpolate_H
81
83#include "surfaceFieldsFwd.H"
84#include "Tuple2.H"
85
86// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87
88namespace Foam
89{
90
91// Forward declaration of classes
92class objectRegistry;
93class dictionary;
94class mapPolyMesh;
95
96namespace functionObjects
97{
98
99/*---------------------------------------------------------------------------*\
100 Class surfaceInterpolate Declaration
101\*---------------------------------------------------------------------------*/
102
104:
106{
107protected:
108
109 // Protected Data
110
111 //- Fields to process
112 List<Tuple2<word, word>> fieldSet_;
113
114
115 // Protected Member Functions
116
117 //- Linearly interpolate volume fields to generate surface fields
118 template<class Type>
119 void interpolateFields();
120
121
122public:
123
124 //- Runtime type information
125 TypeName("surfaceInterpolate");
126
127
128 // Constructors
129
130 //- Construct for given objectRegistry and dictionary.
131 // Allow the possibility to load fields from files
133 (
134 const word& name,
135 const Time& runTime,
136 const dictionary& dict
137 );
139 //- No copy construct
140 surfaceInterpolate(const surfaceInterpolate&) = delete;
141
142 //- No copy assignment
143 void operator=(const surfaceInterpolate&) = delete;
144
145
146 //- Destructor
147 virtual ~surfaceInterpolate() = default;
148
150 // Member Functions
151
152 //- Read the function-object dictionary
153 virtual bool read(const dictionary& dict);
154
155 //- Execute the function-object operations
156 virtual bool execute();
157
158 //- Write the function-object results
159 virtual bool write();
160};
161
162
163// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164
165} // End namespace functionObjects
166} // End namespace Foam
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170#ifdef NoRepository
172#endif
173
174// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175
176#endif
177
178// ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
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.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
Linearly interpolates volume fields to generate surface fields.
void interpolateFields()
Linearly interpolate volume fields to generate surface fields.
surfaceInterpolate(const surfaceInterpolate &)=delete
No copy construct.
TypeName("surfaceInterpolate")
Runtime type information.
void operator=(const surfaceInterpolate &)=delete
No copy assignment.
List< Tuple2< word, word > > fieldSet_
Fields to process.
surfaceInterpolate(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
virtual ~surfaceInterpolate()=default
Destructor.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
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