Loading...
Searching...
No Matches
surfaceFields.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) 2022-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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 "surfaceFields.H"
32// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34namespace Foam
35{
36
50(
52 "surfaceScalarField::Boundary",
53 0
54);
56(
58 "surfaceVectorField::Boundary",
59 0
60);
62(
64 "surfaceSphericalTensorField::Boundary",
65 0
66);
68(
70 "surfaceSymmTensorField::Boundary",
71 0
72);
74(
76 "surfaceTensorField::Boundary",
77 0
78);
79
80} // End namespace Foam
81
82
83// * * * * * * * * * * * * * * * * Global Data * * * * * * * * * * * * * * * //
84
85// Note hard-coded values are more reliable than other alternatives
86
88({
89 "surfaceScalarField",
90 "surfaceVectorField",
91 "surfaceSphericalTensorField",
92 "surfaceSymmTensorField",
93 "surfaceTensorField"
94});
95
96
97// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
98
99bool Foam::fieldTypes::is_surface(const word& clsName)
100{
101 return
102 (
103 clsName.starts_with("surface") && clsName.ends_with("Field")
104 && Foam::fieldTypes::surface.contains(clsName)
105 );
106}
107
108
109// ************************************************************************* //
DimensionedField< scalar, surfaceMesh > Internal
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
bool ends_with(char c) const
True if string ends with given character (cf. C++20).
Definition string.H:461
bool starts_with(char c) const
True if string starts with given character (cf. C++20).
Definition string.H:436
A class for handling words, derived from Foam::string.
Definition word.H:66
#define defineTemplateTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information for templates, useful.
Definition className.H:158
#define defineTemplateDebugSwitchWithName(Type, Name, Value)
Define the debug information for templates, lookup as Name.
const wordList surface
Standard surface field types (scalar, vector, tensor, etc).
bool is_surface(const word &clsName)
Test if the class name appears to be a surface field.
Namespace for OpenFOAM.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
List< word > wordList
List of word.
Definition fileName.H:60
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
GeometricField< tensor, fvsPatchField, surfaceMesh > surfaceTensorField
GeometricField< sphericalTensor, fvsPatchField, surfaceMesh > surfaceSphericalTensorField
GeometricField< symmTensor, fvsPatchField, surfaceMesh > surfaceSymmTensorField
Foam::surfaceFields.