Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
10License
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
29#include "ensightOutput.H"
30
31// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32
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
52{
53 if (!total())
54 {
55 return;
56 }
57
58 // Coordinates
60 (
61 os,
62 index(),
63 name(),
64 points_.size(),
65 points_,
66 false // serial
67 );
68
69 // Faces
71 (
72 os,
73 *this,
74 faces_,
75 false // serial
76 );
77}
78
79
80// ************************************************************************* //
void classify(const UList< face > &faces)
Classify the face types and set the element lists.
label total() const noexcept
Same as totalSize.
ensightFaces()
Default construct, with part index 0.
A variant of ensightFile (Ensight writing) that includes the extra geometry file header information.
ensightOutputSurface(const ensightOutputSurface &)=delete
No copy construct.
void write(ensightGeoFile &os) const
Write processor-local geometry (serial-only). No beginGeometry() marker.
label index() const noexcept
The index in a list (0-based).
OBJstream os(runTime.globalPath()/outputName)
auto & name
const pointField & points
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.
void writeFaceConnectivity(ensightGeoFile &os, const ensightFaces::elemType etype, const label nTotal, const UIndirectList< face > &faces, bool parallel)
Write the regular face connectivity for specified type and and specified faces.
List< face > faceList
List of faces.
Definition faceListFwd.H:41
vectorField pointField
pointField is a vectorField.