1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::fileFormats::TRIsurfaceFormat
28 Provide a means of reading/writing .tri format.
31 For efficiency, the zones are sorted before creating the faces.
32 The class is thus derived from MeshedSurface.
37 \*---------------------------------------------------------------------------*/
39 #ifndef TRIsurfaceFormat_H
40 #define TRIsurfaceFormat_H
42 #include "TRIsurfaceFormatCore.H"
43 #include "MeshedSurface.H"
44 #include "MeshedSurfaceProxy.H"
45 #include "UnsortedMeshedSurface.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 /*---------------------------------------------------------------------------*\
55 Class TRIsurfaceFormat Declaration
56 \*---------------------------------------------------------------------------*/
59 class TRIsurfaceFormat
61 public MeshedSurface<Face>
63 // Private Member Functions
65 static inline void writeShell
73 //- Disallow default bitwise copy construct
74 TRIsurfaceFormat(const TRIsurfaceFormat<Face>&);
76 //- Disallow default bitwise assignment
77 void operator=(const TRIsurfaceFormat<Face>&);
84 //- Construct from file name
85 TRIsurfaceFormat(const fileName&);
90 //- Read file and return surface
91 static autoPtr<MeshedSurface<Face> > New(const fileName& name)
93 return autoPtr<MeshedSurface<Face> >
95 new TRIsurfaceFormat<Face>(name)
101 virtual ~TRIsurfaceFormat()
107 //- Write surface mesh components by proxy
108 static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
110 //- Write UnsortedMeshedSurface,
111 // by default the output is not sorted by zones
112 static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
115 virtual bool read(const fileName&);
118 virtual void write(const fileName& name) const
120 write(name, MeshedSurfaceProxy<Face>(*this));
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 } // End namespace fileFormats
128 } // End namespace Foam
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 # include "TRIsurfaceFormat.C"
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 // ************************************************************************* //