OpenFOAM
v2406
The open source CFD toolbox
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-2022 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
Class
28
Foam::ensightPTraits
29
30
Description
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 Foam_ensightPTraits_H
39
#define Foam_ensightPTraits_H
40
41
#include "
fieldTypes.H
"
42
#include "
direction.H
"
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
namespace
Foam
47
{
48
49
/*---------------------------------------------------------------------------*\
50
Class ensightPTraits Declaration
51
\*---------------------------------------------------------------------------*/
52
53
template
<
class
Type>
54
struct
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
// Primarily used for remapping of symmTensor.
61
// OpenFOAM uses (XX, XY, XZ, YY, YZ, ZZ) order,
62
// Ensight uses (XX, YY, ZZ, XY, YZ, XZ) order (like VTK).
63
static
const
direction
componentOrder
[];
64
};
65
66
67
// Specializations
68
69
template
<>
const
char
*
const
ensightPTraits<label>::typeName
;
70
template
<>
const
direction
ensightPTraits<label>::componentOrder
[];
71
72
template
<>
const
char
*
const
ensightPTraits<float>::typeName
;
73
template
<>
const
direction
ensightPTraits<float>::componentOrder
[];
74
75
template
<>
const
char
*
const
ensightPTraits<double>::typeName
;
76
template
<>
const
direction
ensightPTraits<double>::componentOrder
[];
77
78
template
<>
const
char
*
const
ensightPTraits<vector>::typeName
;
79
template
<>
const
direction
ensightPTraits<vector>::componentOrder
[];
80
81
template
<>
const
char
*
const
ensightPTraits<sphericalTensor>::typeName
;
82
template
<>
const
direction
ensightPTraits<sphericalTensor>::componentOrder
[];
83
84
template
<>
const
char
*
const
ensightPTraits<symmTensor>::typeName
;
85
template
<>
const
direction
ensightPTraits<symmTensor>::componentOrder
[];
86
87
template
<>
const
char
*
const
ensightPTraits<tensor>::typeName
;
88
template
<>
const
direction
ensightPTraits<tensor>::componentOrder
[];
89
90
91
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92
93
}
// End namespace Foam
94
95
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96
97
#endif
98
99
// ************************************************************************* //
Foam::direction
uint8_t direction
Definition:
direction.H:46
Foam::ensightPTraits
Ensight names and component order for base types.
Definition:
ensightPTraits.H:47
fieldTypes.H
Foam::ensightPTraits::typeName
const char *const typeName
Definition:
ensightPTraits.C:28
direction.H
Direction is an 8-bit unsigned integer type used to represent Cartesian directions, components etc.
Foam::ensightPTraits::componentOrder
const Foam::direction componentOrder[]
Definition:
ensightPTraits.C:32
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:26
src
fileFormats
ensight
type
ensightPTraits.H
Generated by
1.8.14