volFields.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) 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 \*---------------------------------------------------------------------------*/
28 
29 #include "volFields.H"
30 #include "coupledFvPatchField.H"
31 #include "registerSwitch.H"
32 
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 
43 
49 
51 (
53  "volScalarField::Boundary",
54  0
55 );
57 (
59  "volVectorField::Boundary",
60  0
61 );
63 (
65  "volSphericalTensorField::Boundary",
66  0
67 );
69 (
71  "volSymmTensorField::Boundary",
72  0
73 );
75 (
77  "volTensorField::Boundary",
78  0
79 );
80 
81 } // End namespace Foam
82 
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 // Specializations
87 
88 namespace Foam
89 {
90 
91 template<>
94 (
95  const direction
96 ) const
97 {
98  return *this;
99 }
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, fvPatchField, volMesh>::check() const \
117 { \
118  return checkConsistency<coupledFvPatchField<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  "volScalarField::Internal",
143  "volVectorField::Internal",
144  "volSphericalTensorField::Internal",
145  "volSymmTensorField::Internal",
146  "volTensorField::Internal"
147 });
148 
149 
151 ({
152  "volScalarField",
153  "volVectorField",
154  "volSphericalTensorField",
155  "volSymmTensorField",
156  "volTensorField"
157 });
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Definition: volFieldsFwd.H:84
uint8_t direction
Definition: direction.H:46
GeometricField< tensor, fvPatchField, volMesh > volTensorField
Definition: volFieldsFwd.H:88
tmp< GeometricField< cmptType, PatchField, GeoMesh > > component(const direction) const
Return a component of the field.
#define fieldChecks(Type)
Definition: volFields.C:107
Generic GeometricField class.
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
defineTemplateDebugSwitchWithName(areaScalarField::Boundary, "areaScalarField::Boundary", 0)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:76
DimensionedField< scalar, volMesh > Internal
The internal field type from which this GeometricField is derived.
GeometricField< sphericalTensor, fvPatchField, volMesh > volSphericalTensorField
Definition: volFieldsFwd.H:80
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
const wordList volume
Standard volume field types (scalar, vector, tensor, etc)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
defineTemplateTypeNameAndDebug(faScalarMatrix, 0)
const wordList 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>.
Namespace for OpenFOAM.