OpenFOAM
6
The OpenFOAM Foundation
src
surfMesh
surfaceFormats
tri
TRIsurfaceFormatCore.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Class
25
Foam::fileFormats::TRIsurfaceFormatCore
26
27
Description
28
Internal class used by the TRIsurfaceFormat
29
30
SourceFiles
31
TRIsurfaceFormatCore.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef TRIsurfaceFormatCore_H
36
#define TRIsurfaceFormatCore_H
37
38
#include "
surfaceFormatsCore.H
"
39
#include "
triFace.H
"
40
41
#include "
IFstream.H
"
42
#include "
Ostream.H
"
43
#include "
OFstream.H
"
44
45
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47
namespace
Foam
48
{
49
namespace
fileFormats
50
{
51
52
/*---------------------------------------------------------------------------*\
53
Class TRIsurfaceFormatCore Declaration
54
\*---------------------------------------------------------------------------*/
55
56
class
TRIsurfaceFormatCore
57
:
58
public
surfaceFormatsCore
59
{
60
// Private Data
61
62
bool
sorted_;
63
64
//- The points supporting the facets
65
pointField
points_;
66
67
//- The zones associated with the faces
68
List<label>
zoneIds_;
69
70
//- The solid count, in the order of their first appearance
71
List<label>
sizes_;
72
73
74
// Private Member Functions
75
76
//- Disallow default bitwise copy construct
77
TRIsurfaceFormatCore
(
const
TRIsurfaceFormatCore
&);
78
79
//- Disallow default bitwise assignment
80
void
operator=(
const
TRIsurfaceFormatCore
&);
81
82
bool
read(
const
fileName
&);
83
84
85
public
:
86
87
// Constructors
88
89
//- Read from file, filling in the information
90
TRIsurfaceFormatCore
(
const
fileName
&);
91
92
93
//- Destructor
94
~TRIsurfaceFormatCore
();
95
96
97
// Member Functions
98
99
//- File read was already sorted
100
bool
sorted
()
const
101
{
102
return
sorted_;
103
}
104
105
//- Flush all values
106
void
clear
()
107
{
108
sorted_ =
true
;
109
points_.
clear
();
110
zoneIds_.
clear
();
111
sizes_.
clear
();
112
}
113
114
//- Return full access to the points
115
pointField
&
points
()
116
{
117
return
points_;
118
}
119
120
//- Return full access to the zones
121
List<label>
&
zoneIds
()
122
{
123
return
zoneIds_;
124
}
125
126
//- The list of zone sizes in the order of their first appearance
127
List<label>
&
sizes
()
128
{
129
return
sizes_;
130
}
131
};
132
133
134
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136
}
// End namespace fileFormats
137
}
// End namespace Foam
138
139
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141
#endif
142
143
// ************************************************************************* //
Foam::fileFormats::TRIsurfaceFormatCore::zoneIds
List< label > & zoneIds()
Return full access to the zones.
Definition:
TRIsurfaceFormatCore.H:120
Foam::fileName
A class for handling file names.
Definition:
fileName.H:69
Foam::List< label >
Foam::fileFormats::TRIsurfaceFormatCore::points
pointField & points()
Return full access to the points.
Definition:
TRIsurfaceFormatCore.H:114
Foam::fileFormats::TRIsurfaceFormatCore::sizes
List< label > & sizes()
The list of zone sizes in the order of their first appearance.
Definition:
TRIsurfaceFormatCore.H:126
Foam::Field< vector >
Foam::List::clear
void clear()
Clear the list, i.e. set size to zero.
Definition:
ListI.H:124
IFstream.H
OFstream.H
Ostream.H
Foam::fileFormats::TRIsurfaceFormatCore::clear
void clear()
Flush all values.
Definition:
TRIsurfaceFormatCore.H:105
Foam::fileFormats::TRIsurfaceFormatCore
Internal class used by the TRIsurfaceFormat.
Definition:
TRIsurfaceFormatCore.H:55
triFace.H
Foam::fileFormats::TRIsurfaceFormatCore::sorted
bool sorted() const
File read was already sorted.
Definition:
TRIsurfaceFormatCore.H:99
Foam::fileFormats::surfaceFormatsCore
A collection of helper functions for reading/writing surface formats.
Definition:
surfaceFormatsCore.H:60
surfaceFormatsCore.H
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:30
Foam::fileFormats::TRIsurfaceFormatCore::~TRIsurfaceFormatCore
~TRIsurfaceFormatCore()
Destructor.
Definition:
TRIsurfaceFormatCore.C:50
Generated by
1.8.13