fieldTypes.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) 2018-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Namespace
28  Foam::fieldTypes
29 
30 Description
31  Collection of common field types
32 
33 Note
34  The fieldTypes header contains macros for primitive types
35  that Fields are instantiated for.
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef Foam_fieldTypes_H
40 #define Foam_fieldTypes_H
41 
42 #include "label.H"
43 #include "scalar.H"
44 #include "vector.H"
45 #include "sphericalTensor.H"
46 #include "symmTensor.H"
47 #include "tensor.H"
48 #include "triad.H"
49 #include "macros.H"
50 #include "wordList.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 #define CAPITALIZE_bool Bool
55 #define CAPITALIZE_label Label
56 #define CAPITALIZE_scalar Scalar
57 #define CAPITALIZE_complex Complex
58 #define CAPITALIZE_vector Vector
59 #define CAPITALIZE_sphericalTensor SphericalTensor
60 #define CAPITALIZE_symmTensor SymmTensor
61 #define CAPITALIZE_tensor Tensor
62 
63 #define FOR_ALL_FIELD_TYPES(Macro, ...) \
64  Macro(scalar, __VA_ARGS__) \
65  Macro(vector, __VA_ARGS__) \
66  Macro(sphericalTensor, __VA_ARGS__) \
67  Macro(symmTensor, __VA_ARGS__) \
68  Macro(tensor, __VA_ARGS__)
69 
70 
71 /*---------------------------------------------------------------------------*\
72  Namespace fieldTypes Declaration
73 \*---------------------------------------------------------------------------*/
74 
75 namespace Foam
76 {
77 namespace fieldTypes
78 {
79 
80 //- Standard basic field types (label, scalar, vector, tensor, etc)
81 // These also correspond to cloud output fields.
82 extern const wordList basic;
83 
84 
85 // Commonly used patch field types
86 
87 //- An \c empty patch field type
88 inline const char* emptyTypeName_() noexcept { return "empty"; }
89 
90 //- An \c empty patch field type
91 extern const word emptyType;
92 
93 //- A \c calculated patch field type
94 inline const char* calculatedTypeName_() noexcept { return "calculated"; }
95 
96 //- A \c calculated patch field type
97 extern const word calculatedType;
98 
99 //- A combined \c zero-gradient and \c calculated patch field type
100 inline const char* extrapolatedCalculatedTypeName_() noexcept
101 {
102  return "extrapolatedCalculated";
103 }
104 
105 //- A combined \c zero-gradient and \c calculated patch field type
106 extern const word extrapolatedCalculatedType;
108 //- A \c zeroGradient patch field type
109 inline const char* zeroGradientTypeName_() noexcept { return "zeroGradient"; }
110 
111 //- A \c zeroGradient patch field type
112 extern const word zeroGradientType;
113 
114 } // End namespace fieldTypes
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
121 // ************************************************************************* //
const char * calculatedTypeName_() noexcept
A calculated patch field type.
Definition: fieldTypes.H:97
const word zeroGradientType
A zeroGradient patch field type.
const word calculatedType
A calculated patch field type.
const char * zeroGradientTypeName_() noexcept
A zeroGradient patch field type.
Definition: fieldTypes.H:120
General C-preprocessor macros.
A class for handling words, derived from Foam::string.
Definition: word.H:63
const direction noexcept
Definition: Scalar.H:258
const char * extrapolatedCalculatedTypeName_() noexcept
A combined zero-gradient and calculated patch field type.
Definition: fieldTypes.H:107
const wordList basic
Standard basic field types (label, scalar, vector, tensor, etc)
const word emptyType
An empty patch field type.
List< word > wordList
List of word.
Definition: fileName.H:58
const char * emptyTypeName_() noexcept
An empty patch field type.
Definition: fieldTypes.H:87
const word extrapolatedCalculatedType
A combined zero-gradient and calculated patch field type.
Namespace for OpenFOAM.