OpenFOAM: API Guide
v2012
The open source CFD toolbox
ensightOutputSurface.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) 2020 OpenCFD Ltd.
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
\*---------------------------------------------------------------------------*/
27
28
#include "
ensightOutputSurface.H
"
29
#include "
ensightOutput.H
"
30
31
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32
33
Foam::ensightOutputSurface::ensightOutputSurface
34
(
35
const
pointField
&
points
,
36
const
faceList
& faces,
37
const
string
& description
38
)
39
:
40
ensightFaces
(description),
41
points_(
points
),
42
faces_(faces)
43
{
44
// Classify face types
45
classify(faces);
46
}
47
48
49
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
50
51
void
Foam::ensightOutputSurface::write
(
ensightGeoFile
& os)
const
52
{
53
if
(!
total
())
54
{
55
return
;
56
}
57
58
// Coordinates
59
ensightOutput::Detail::writeCoordinates
60
(
61
os,
62
index
(),
63
name
(),
64
points_.size(),
65
points_,
66
false
// serial
67
);
68
69
// Faces
70
ensightOutput::writeFaceConnectivity
71
(
72
os,
73
*
this
,
74
faces_,
75
false
// serial
76
);
77
}
78
79
80
// ************************************************************************* //
Foam::ensightPart::index
label index() const
The index in a list (0-based)
Definition:
ensightPart.H:124
Foam::ensightPart::name
const string & name() const
The part name or description.
Definition:
ensightPart.H:160
Foam::ensightFaces
Sorting/classification of faces (2D) into corresponding ensight types.
Definition:
ensightFaces.H:68
Foam::ensightFaces::total
label total() const
The global size of all element types.
Definition:
ensightFaces.C:130
Foam::ensightOutput::writeFaceConnectivity
void writeFaceConnectivity(ensightGeoFile &os, const ensightFaces::elemType etype, const label nTotal, const UIndirectList< face > &faces, bool parallel)
Definition:
ensightOutput.C:369
Foam::ensightGeoFile
Specialized Ensight output with extra geometry file header.
Definition:
ensightGeoFile.H:48
ensightOutput.H
Foam::Field< vector >
Foam::ensightOutputSurface::write
void write(ensightGeoFile &os) const
Write processor-local geometry (serial-only)
Definition:
ensightOutputSurface.C:51
Foam::List< face >
ensightOutputSurface.H
points
const pointField & points
Definition:
gmvOutputHeader.H:1
Foam::ensightOutput::Detail::writeCoordinates
bool writeCoordinates(ensightGeoFile &os, const label partId, const word &partName, const label nPoints, const FieldContainer< Foam::point > &fld, bool parallel)
Write coordinates (component-wise) for the given part.
Definition:
ensightOutputTemplates.C:55
src
fileFormats
ensight
part
surface
ensightOutputSurface.C
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.