OpenFOAM: API Guide
v2012
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 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
Conversion of OpenFOAM pTraits into the Ensight equivalent
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 "
pTraits.H
"
42
#include "
fieldTypes.H
"
43
#include "
direction.H
"
44
45
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47
namespace
Foam
48
{
49
50
/*---------------------------------------------------------------------------*\
51
Class ensightPTraits Declaration
52
\*---------------------------------------------------------------------------*/
53
54
template
<
class
PrimitiveType>
55
class
ensightPTraits
56
{
57
public
:
58
59
// Static data members
60
61
static
const
char
*
const
typeName
;
62
63
//- Ordering table: return OpenFOAM component given Ensight component
64
// This is used for the symmTensor ordering: Ensight requires
65
// xx yy zz xy xz yz
66
static
const
direction
componentOrder
[];
67
};
68
69
template
<>
70
const
char
*
const
ensightPTraits<label>::typeName
;
71
72
template
<>
73
const
direction
ensightPTraits<label>::componentOrder
[];
74
75
template
<>
76
const
char
*
const
ensightPTraits<scalar>::typeName
;
77
78
template
<>
79
const
direction
ensightPTraits<scalar>::componentOrder
[];
80
81
template
<>
82
const
char
*
const
ensightPTraits<vector>::typeName
;
83
84
template
<>
85
const
direction
ensightPTraits<vector>::componentOrder
[];
86
87
template
<>
88
const
char
*
const
ensightPTraits<sphericalTensor>::typeName
;
89
90
template
<>
91
const
direction
ensightPTraits<sphericalTensor>::componentOrder
[];
92
93
template
<>
94
const
char
*
const
ensightPTraits<symmTensor>::typeName
;
95
96
template
<>
97
const
direction
ensightPTraits<symmTensor>::componentOrder
[];
98
99
template
<>
100
const
char
*
const
ensightPTraits<tensor>::typeName
;
101
102
template
<>
103
const
direction
ensightPTraits<tensor>::componentOrder
[];
104
105
106
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107
108
}
// End namespace Foam
109
110
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112
#endif
113
114
// ************************************************************************* //
Foam::ensightPTraits
Conversion of OpenFOAM pTraits into the Ensight equivalent.
Definition:
ensightPTraits.H:54
Foam::ensightPTraits::typeName
const char *const typeName
Definition:
ensightPTraits.C:35
pTraits.H
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::ensightPTraits::typeName
static const char *const typeName
Definition:
ensightPTraits.H:60
direction.H
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
Foam::direction
uint8_t direction
Definition:
direction.H:52
fieldTypes.H
Header files for all the primitive types that Fields are instantiated for.
Foam::ensightPTraits::componentOrder
const Foam::direction componentOrder[]
Definition:
ensightPTraits.C:39
src
fileFormats
ensight
type
ensightPTraits.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.