makePatchFunction1s.C
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) 2018-2021 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
26\*---------------------------------------------------------------------------*/
27
28#include "PatchFunction1.H"
29#include "fieldTypes.H"
30#include "ConstantField.H"
31#include "UniformValueField.H"
32#include "FunctionObjectValue.H"
33#include "NoneFunction1.H"
34#include "MappedFile.H"
35#include "Table.H"
37
38// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39
40#define makePatchFunction1s(Type) \
41 makePatchFunction1(Type); \
42 makePatchFunction1Type(ConstantField, Type); \
43 makePatchFunction1Type(MappedFile, Type); \
44 makePatchFunction1Type(UniformValueField, Type);
45
46namespace Foam
47{
49 makePatchFunction1Type(ConstantField, label);
50
56
57
58 //- Option1 : add UniformFieldValue under the same name as Function1
59 // See makeFunction1s.C. Note that we do not need
60 // Constant & Uniform
61
68
74
80
81 addUniformValueFieldFunction1s(polynomial, scalar);
86
92
98
104
110
116
122
128
129 addUniformValueFieldFunction1s(functionObjectValue, scalar);
134
135
139 //template<class Type>
140 //struct addToUniform
141 //{
142 // addToUniform()
143 // {
144 // // Get the Function1 table
145 // Function1<Type>::constructdictionaryConstructorTables();
146 // const auto& F1Table =
147 // *Function1<Type>::dictionaryConstructorTablePtr_;
148 //
149 // // Get the PatchFunction1 table
150 // PatchFunction1<Type>::constructdictionaryConstructorTables();
151 // auto& PF1Table =
152 // *PatchFunction1<Type>::dictionaryConstructorTablePtr_;
153 //
154 // // Get the UniformValueField constructor
155 // auto ctorIter = PF1Table.cfind
156 // (
157 // PatchFunction1Types::UniformValueField<Type>::typeName
158 // );
159 //
160 // // Add the UniformValueField under the Function1 name
161 // forAllConstIters(F1Table, iter)
162 // {
163 // PF1Table.insert(iter.key(), ctorIter.val());
164 // }
165 // }
166 //};
167 //static const addToUniform<scalar> addScalar;
168 //static const addToUniform<vector> addVector;
169 //static const addToUniform<sphericalTensor> addSphericalTensor;
170 //static const addToUniform<symmTensor> addSymmTensor;
171 //static const addToUniform<tensor> addTensor;
172}
173
174
175// ************************************************************************* //
#define makePatchFunction1(Type)
#define makePatchFunction1Type(SS, Type)
#define addUniformValueFieldFunction1s(F1Name, Type)
Macros for easy insertion into run-time selection tables.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Definition: one.H:62
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:63
Header files for all the primitive types that Fields are instantiated for.
#define makePatchFunction1s(Type)
Namespace for OpenFOAM.