OpenFOAM
12
The OpenFOAM Foundation
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-2019 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
bool
read(
const
fileName
&);
77
78
79
public
:
80
81
// Constructors
82
83
//- Read from file, filling in the information
84
TRIsurfaceFormatCore
(
const
fileName
&);
85
86
//- Disallow default bitwise copy construction
87
TRIsurfaceFormatCore
(
const
TRIsurfaceFormatCore
&) =
delete
;
88
89
90
//- Destructor
91
~TRIsurfaceFormatCore
();
92
93
94
// Member Functions
95
96
//- File read was already sorted
97
bool
sorted
()
const
98
{
99
return
sorted_;
100
}
101
102
//- Flush all values
103
void
clear
()
104
{
105
sorted_ =
true
;
106
points_.
clear
();
107
zoneIds_.
clear
();
108
sizes_.
clear
();
109
}
110
111
//- Return full access to the points
112
pointField
&
points
()
113
{
114
return
points_;
115
}
116
117
//- Return full access to the zones
118
List<label>
&
zoneIds
()
119
{
120
return
zoneIds_;
121
}
122
123
//- The list of zone sizes in the order of their first appearance
124
List<label>
&
sizes
()
125
{
126
return
sizes_;
127
}
128
129
130
// Member Operators
131
132
//- Disallow default bitwise assignment
133
void
operator=
(
const
TRIsurfaceFormatCore
&) =
delete
;
134
};
135
136
137
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139
}
// End namespace fileFormats
140
}
// End namespace Foam
141
142
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144
#endif
145
146
// ************************************************************************* //
IFstream.H
OFstream.H
Ostream.H
Foam::Field< vector >
Foam::List< label >
Foam::List::clear
void clear()
Clear the list, i.e. set size to zero.
Definition:
ListI.H:125
Foam::fileFormats::TRIsurfaceFormatCore
Internal class used by the TRIsurfaceFormat.
Definition:
TRIsurfaceFormatCore.H:58
Foam::fileFormats::TRIsurfaceFormatCore::zoneIds
List< label > & zoneIds()
Return full access to the zones.
Definition:
TRIsurfaceFormatCore.H:117
Foam::fileFormats::TRIsurfaceFormatCore::points
pointField & points()
Return full access to the points.
Definition:
TRIsurfaceFormatCore.H:111
Foam::fileFormats::TRIsurfaceFormatCore::sorted
bool sorted() const
File read was already sorted.
Definition:
TRIsurfaceFormatCore.H:96
Foam::fileFormats::TRIsurfaceFormatCore::sizes
List< label > & sizes()
The list of zone sizes in the order of their first appearance.
Definition:
TRIsurfaceFormatCore.H:123
Foam::fileFormats::TRIsurfaceFormatCore::~TRIsurfaceFormatCore
~TRIsurfaceFormatCore()
Destructor.
Definition:
TRIsurfaceFormatCore.C:50
Foam::fileFormats::TRIsurfaceFormatCore::TRIsurfaceFormatCore
TRIsurfaceFormatCore(const fileName &)
Read from file, filling in the information.
Definition:
TRIsurfaceFormatCore.C:35
Foam::fileFormats::TRIsurfaceFormatCore::clear
void clear()
Flush all values.
Definition:
TRIsurfaceFormatCore.H:102
Foam::fileFormats::TRIsurfaceFormatCore::operator=
void operator=(const TRIsurfaceFormatCore &)=delete
Disallow default bitwise assignment.
Foam::fileFormats::surfaceFormatsCore
A collection of helper functions for reading/writing surface formats.
Definition:
surfaceFormatsCore.H:61
Foam::fileName
A class for handling file names.
Definition:
fileName.H:82
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:214
surfaceFormatsCore.H
triFace.H
src
surfMesh
surfaceFormats
tri
TRIsurfaceFormatCore.H
Generated by
1.9.1