Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
surfMesh
surfaceFormats
tri
TRIsurfaceFormat.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
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::TRIsurfaceFormat
26
27
Description
28
Provide a means of reading/writing .tri format.
29
30
Note
31
For efficiency, the zones are sorted before creating the faces.
32
The class is thus derived from MeshedSurface.
33
34
SourceFiles
35
TRIsurfaceFormat.C
36
37
\*---------------------------------------------------------------------------*/
38
39
#ifndef TRIsurfaceFormat_H
40
#define TRIsurfaceFormat_H
41
42
#include "
TRIsurfaceFormatCore.H
"
43
#include <
surfMesh/MeshedSurface.H
>
44
#include <
surfMesh/MeshedSurfaceProxy.H
>
45
#include <
surfMesh/UnsortedMeshedSurface.H
>
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
namespace
fileFormats
52
{
53
54
/*---------------------------------------------------------------------------*\
55
Class TRIsurfaceFormat Declaration
56
\*---------------------------------------------------------------------------*/
57
58
template
<
class
Face>
59
class
TRIsurfaceFormat
60
:
61
public
MeshedSurface
<Face>
62
{
63
// Private Member Functions
64
65
static
inline
void
writeShell
66
(
67
Ostream
&,
68
const
pointField
&,
69
const
Face&,
70
const
label zoneI
71
);
72
73
//- Disallow default bitwise copy construct
74
TRIsurfaceFormat
(
const
TRIsurfaceFormat<Face>
&);
75
76
//- Disallow default bitwise assignment
77
void
operator=(
const
TRIsurfaceFormat<Face>
&);
78
79
80
public
:
81
82
// Constructors
83
84
//- Construct from file name
85
TRIsurfaceFormat
(
const
fileName
&);
86
87
88
// Selectors
89
90
//- Read file and return surface
91
static
autoPtr<MeshedSurface<Face>
>
New
(
const
fileName
&
name
)
92
{
93
return
autoPtr<MeshedSurface<Face>
>
94
(
95
new
TRIsurfaceFormat<Face>
(
name
)
96
);
97
}
98
99
100
//- Destructor
101
virtual
~TRIsurfaceFormat
()
102
{}
103
104
105
// Member Functions
106
107
//- Write surface mesh components by proxy
108
static
void
write
(
const
fileName
&,
const
MeshedSurfaceProxy<Face>
&);
109
110
//- Write UnsortedMeshedSurface,
111
// by default the output is not sorted by zones
112
static
void
write
(
const
fileName
&,
const
UnsortedMeshedSurface<Face>
&);
113
114
//- Read from file
115
virtual
bool
read
(
const
fileName
&);
116
117
//- Write object
118
virtual
void
write
(
const
fileName
&
name
)
const
119
{
120
write
(name,
MeshedSurfaceProxy<Face>
(*
this
));
121
}
122
};
123
124
125
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127
}
// End namespace fileFormats
128
}
// End namespace Foam
129
130
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132
#ifdef NoRepository
133
# include "
TRIsurfaceFormat.C
"
134
#endif
135
136
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138
#endif
139
140
// ************************ vim: set sw=4 sts=4 et: ************************ //