OpenFOAM: API Guide
v1912
The open source CFD toolbox
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 OpenCFD Ltd.
9
-------------------------------------------------------------------------------
10
License
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 "
MappedFile.H
"
33
#include "
addToRunTimeSelectionTable.H
"
34
#include "
Table.H
"
35
36
#define makePatchFunction1s(Type) \
37
makePatchFunction1(Type); \
38
makePatchFunction1Type(ConstantField, Type); \
39
makePatchFunction1Type(MappedFile, Type); \
40
makePatchFunction1Type(UniformValueField, Type);
41
42
#define addUniformValueFieldFunction1s(F1Type, Type) \
43
PatchFunction1<Type>::adddictionaryConstructorToTable \
44
<PatchFunction1Types::UniformValueField<Type>> \
45
add##F1Type##UniformValueField##Type##ConstructorToTable_(#F1Type);
46
47
namespace
Foam
48
{
49
makePatchFunction1
(
label
);
50
makePatchFunction1Type
(ConstantField,
label
);
51
52
makePatchFunction1s
(scalar);
53
makePatchFunction1s
(
vector
);
54
makePatchFunction1s
(
sphericalTensor
);
55
makePatchFunction1s
(
symmTensor
);
56
makePatchFunction1s
(
tensor
);
57
58
59
//- Option1 : add UniformFieldValue under the same name as Function1
60
// See makeFunction1s.C. Note that we do not need
61
// Constant & Uniform
62
addUniformValueFieldFunction1s
(
zero
, scalar);
63
addUniformValueFieldFunction1s
(
zero
,
vector
);
64
addUniformValueFieldFunction1s
(
zero
,
sphericalTensor
);
65
addUniformValueFieldFunction1s
(
zero
,
symmTensor
);
66
addUniformValueFieldFunction1s
(
zero
,
tensor
);
67
68
addUniformValueFieldFunction1s
(
one
, scalar);
69
addUniformValueFieldFunction1s
(
one
,
vector
);
70
addUniformValueFieldFunction1s
(
one
,
sphericalTensor
);
71
addUniformValueFieldFunction1s
(
one
,
symmTensor
);
72
addUniformValueFieldFunction1s
(
one
,
tensor
);
73
74
addUniformValueFieldFunction1s
(polynomial, scalar);
75
addUniformValueFieldFunction1s
(polynomial,
vector
);
76
addUniformValueFieldFunction1s
(polynomial,
sphericalTensor
);
77
addUniformValueFieldFunction1s
(polynomial,
symmTensor
);
78
addUniformValueFieldFunction1s
(polynomial,
tensor
);
79
80
addUniformValueFieldFunction1s
(sine, scalar);
81
addUniformValueFieldFunction1s
(sine,
vector
);
82
addUniformValueFieldFunction1s
(sine,
sphericalTensor
);
83
addUniformValueFieldFunction1s
(sine,
symmTensor
);
84
addUniformValueFieldFunction1s
(sine,
tensor
);
85
86
addUniformValueFieldFunction1s
(square, scalar);
87
addUniformValueFieldFunction1s
(square,
vector
);
88
addUniformValueFieldFunction1s
(square,
sphericalTensor
);
89
addUniformValueFieldFunction1s
(square,
symmTensor
);
90
addUniformValueFieldFunction1s
(square,
tensor
);
91
92
addUniformValueFieldFunction1s
(csvFile, scalar);
93
addUniformValueFieldFunction1s
(csvFile,
vector
);
94
addUniformValueFieldFunction1s
(csvFile,
sphericalTensor
);
95
addUniformValueFieldFunction1s
(csvFile,
symmTensor
);
96
addUniformValueFieldFunction1s
(csvFile,
tensor
);
97
98
addUniformValueFieldFunction1s
(table, scalar);
99
addUniformValueFieldFunction1s
(table,
vector
);
100
addUniformValueFieldFunction1s
(table,
sphericalTensor
);
101
addUniformValueFieldFunction1s
(table,
symmTensor
);
102
addUniformValueFieldFunction1s
(table,
tensor
);
103
104
addUniformValueFieldFunction1s
(tableFile, scalar);
105
addUniformValueFieldFunction1s
(tableFile,
vector
);
106
addUniformValueFieldFunction1s
(tableFile,
sphericalTensor
);
107
addUniformValueFieldFunction1s
(tableFile,
symmTensor
);
108
addUniformValueFieldFunction1s
(tableFile,
tensor
);
109
110
addUniformValueFieldFunction1s
(scale, scalar);
111
addUniformValueFieldFunction1s
(scale,
vector
);
112
addUniformValueFieldFunction1s
(scale,
sphericalTensor
);
113
addUniformValueFieldFunction1s
(scale,
symmTensor
);
114
addUniformValueFieldFunction1s
(scale,
tensor
);
115
116
120
//template<class Type>
121
//class addToUniform
122
//{
123
//public:
124
// addToUniform()
125
// {
126
// // Get the Function1 table
127
// typedef typename Function1<Type>::dictionaryConstructorTable
128
// F1Type;
129
// Function1<Type>::constructdictionaryConstructorTables();
130
// const F1Type& F1Table =
131
// *Function1<Type>::dictionaryConstructorTablePtr_;
132
//
133
// // Get the PatchFunction1 table
134
// typedef typename PatchFunction1<Type>::dictionaryConstructorTable
135
// PF1Type;
136
//
137
// PatchFunction1<Type>::constructdictionaryConstructorTables();
138
// PF1Type& PF1Table =
139
// *PatchFunction1<Type>::dictionaryConstructorTablePtr_;
140
//
141
// // Get the UniformValueField constructor
142
// auto cstrIter =
143
// PatchFunction1<Type>::dictionaryConstructorTablePtr_->cfind
144
// (
145
// PatchFunction1Types::UniformValueField<Type>::typeName
146
// );
147
//
148
// // Add the UniformValueField under the Function1 name
149
// forAllConstIters(F1Table, iter)
150
// {
151
// //bool ok =
152
// PF1Table.insert(iter.key(), cstrIter());
153
// //if (!ok)
154
// //{
155
// // std::cout<< "** problem" << std::endl;
156
// //}
157
// }
158
// }
159
//};
160
//static const addToUniform<scalar> addScalar;
161
//static const addToUniform<vector> addVector;
162
//static const addToUniform<sphericalTensor> addSphericalTensor;
163
//static const addToUniform<symmTensor> addSymmTensor;
164
//static const addToUniform<tensor> addTensor;
165
}
166
167
168
// ************************************************************************* //
Foam::Tensor< scalar >
Table.H
Foam::SymmTensor< scalar >
ConstantField.H
UniformValueField.H
PatchFunction1.H
Foam::one
A class representing the concept of 1 (one), which can be used to avoid manipulating objects that are...
Definition:
one.H:60
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition:
label.H:62
Foam::makePatchFunction1Type
makePatchFunction1Type(Sampled, scalar)
addUniformValueFieldFunction1s
#define addUniformValueFieldFunction1s(F1Type, Type)
Definition:
makePatchFunction1s.C:42
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
makePatchFunction1s
#define makePatchFunction1s(Type)
Definition:
makePatchFunction1s.C:36
Foam::SphericalTensor
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component,...
Definition:
SphericalTensor.H:55
Foam::Vector< scalar >
makePatchFunction1
#define makePatchFunction1(Type)
Definition:
PatchFunction1.H:259
MappedFile.H
fieldTypes.H
Header files for all the primitive types that Fields are instantiated for.
Foam::zero
A class representing the concept of 0 (zero), which can be used to avoid manipulating objects that ar...
Definition:
zero.H:61
src
meshTools
PatchFunction1
makePatchFunction1s.C
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.