ensightPTraits.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) 2013-2015 OpenFOAM Foundation
9 Copyright (C) 2019-2021 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
27Class
28 Foam::ensightPTraits
29
30Description
31 Ensight names and component order for base types.
32
33 For the purpose of traits, integers (label) are treated like
34 floating point (scalar). Spherical tensors are mapped as a scalar.
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef ensightPTraits_H
39#define ensightPTraits_H
40
41#include "fieldTypes.H"
42#include "direction.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class ensightPTraits Declaration
51\*---------------------------------------------------------------------------*/
52
53template<class Type>
54struct ensightPTraits
55{
56 //- The type name used in ensight case files
57 static const char* const typeName;
58
59 //- Ordering table: return OpenFOAM component given Ensight component
60 // This is used for the symmTensor ordering: Ensight requires
61 // xx yy zz xy xz yz
62 static const direction componentOrder[];
63};
64
65
66// Specializations
67
68template<>
69const char* const ensightPTraits<label>::typeName;
70
71template<>
73
74template<>
75const char* const ensightPTraits<scalar>::typeName;
76
77template<>
79
80template<>
81const char* const ensightPTraits<vector>::typeName;
82
83template<>
85
86template<>
88
89template<>
91
92template<>
94
95template<>
97
98template<>
99const char* const ensightPTraits<tensor>::typeName;
100
101template<>
103
104
105// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106
107} // End namespace Foam
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111#endif
112
113// ************************************************************************* //
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
Header files for all the primitive types that Fields are instantiated for.
Namespace for OpenFOAM.
uint8_t direction
Definition: direction.H:56
Ensight names and component order for base types.
static const char *const typeName
The type name used in ensight case files.
static const direction componentOrder[]
Ordering table: return OpenFOAM component given Ensight component.