areaFields.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) 2016-2017 Wikki Ltd
9  Copyright (C) 2018-2025 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 \*---------------------------------------------------------------------------*/
28 
29 #include "faMesh.H"
30 #include "areaFields.H"
31 #include "coupledFaPatchField.H"
32 #include "registerSwitch.H"
33 
34 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 
44 
50 
52 (
54  "areaScalarField::Boundary",
55  0
56 );
58 (
60  "areaVectorField::Boundary",
61  0
62 );
64 (
66  "areaSphericalTensorField::Boundary",
67  0
68 );
70 (
72  "areaSymmTensorField::Boundary",
73  0
74 );
76 (
78  "areaTensorField::Boundary",
79  0
80 );
81 
82 } // End namespace Foam
83 
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 // Specializations
88 
89 namespace Foam
90 {
91 
92 template<>
95 (
96  const direction
97 ) const
98 {
99  return *this;
100 }
101 
102 template<>
104 (
105  const direction,
107 )
108 {
109  *this == gsf;
110 }
111 
112 
113 #undef fieldChecks
114 #define fieldChecks(Type) \
115 template<> \
116 bool GeometricBoundaryField<Type, faPatchField, areaMesh>::check() const \
117 { \
118  return checkConsistency<coupledFaPatchField<Type>> \
119  ( \
120  FieldBase::localBoundaryTolerance_, \
121  !(debug&4) /* make into warning if debug&4 */ \
122  ); \
123 }
124 
125 fieldChecks(scalar);
130 
131 #undef fieldChecks
132 
133 } // End namespace Foam
134 
135 
136 // * * * * * * * * * * * * * * * * Global Data * * * * * * * * * * * * * * * //
137 
138 // Note hard-coded values are more reliable than other alternatives
139 
141 ({
142  "areaScalarField",
143  "areaVectorField",
144  "areaSphericalTensorField",
145  "areaSymmTensorField",
146  "areaTensorField"
147 });
148 
150 ({
151  "areaScalarField::Internal",
152  "areaVectorField::Internal",
153  "areaSphericalTensorField::Internal",
154  "areaSymmTensorField::Internal",
155  "areaTensorField::Internal"
156 });
157 
158 
159 // ************************************************************************* //
uint8_t direction
Definition: direction.H:46
tmp< GeometricField< cmptType, PatchField, GeoMesh > > component(const direction) const
Return a component of the field.
GeometricField< symmTensor, faPatchField, areaMesh > areaSymmTensorField
Definition: areaFieldsFwd.H:84
Generic GeometricField class.
GeometricBoundaryField< scalar, faPatchField, areaMesh > Boundary
Type of boundary fields.
defineTemplateDebugSwitchWithName(areaScalarField::Boundary, "areaScalarField::Boundary", 0)
DimensionedField< scalar, areaMesh > Internal
The internal field type from which this GeometricField is derived.
const wordList area
Standard area field types (scalar, vector, tensor, etc)
GeometricField< tensor, faPatchField, areaMesh > areaTensorField
Definition: areaFieldsFwd.H:88
#define fieldChecks(Type)
Definition: areaFields.C:107
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
GeometricField< sphericalTensor, faPatchField, areaMesh > areaSphericalTensorField
Definition: areaFieldsFwd.H:80
defineTemplateTypeNameAndDebug(faScalarMatrix, 0)
const wordList area_internal
Standard dimensioned field types (scalar, vector, tensor, etc)
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Tensor of scalars, i.e. Tensor<scalar>.
GeometricField< vector, faPatchField, areaMesh > areaVectorField
Definition: areaFieldsFwd.H:76
Namespace for OpenFOAM.
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Definition: areaFieldsFwd.H:72