1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::fileFormats::OFFsurfaceFormat
29 Provide a means of reading/writing Geomview OFF polyList format.
33 The <a href="http://www.geoview.org">Geoview</a>
34 file format information:
35 http://www.geomview.org/docs/html/OFF.html#OFF
38 When reading, the optional @a colorspec is ignored.
39 When writing, it is set to the zone number (integer).
44 \*---------------------------------------------------------------------------*/
46 #ifndef OFFsurfaceFormat_H
47 #define OFFsurfaceFormat_H
49 #include "MeshedSurface.H"
50 #include "MeshedSurfaceProxy.H"
51 #include "UnsortedMeshedSurface.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 /*---------------------------------------------------------------------------*\
61 Class OFFsurfaceFormat Declaration
62 \*---------------------------------------------------------------------------*/
65 class OFFsurfaceFormat
67 public MeshedSurface<Face>
69 // Private Member Functions
71 //- Disallow default bitwise copy construct
72 OFFsurfaceFormat(const OFFsurfaceFormat&);
74 //- Disallow default bitwise assignment
75 void operator=(const OFFsurfaceFormat&);
82 //- Construct from file name
83 OFFsurfaceFormat(const fileName&);
88 //- Read file and return surface
89 static autoPtr<MeshedSurface<Face> > New(const fileName& name)
91 return autoPtr<MeshedSurface<Face> >
93 new OFFsurfaceFormat(name)
99 virtual ~OFFsurfaceFormat()
105 //- Write surface mesh components by proxy
106 static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
109 virtual bool read(const fileName&);
112 virtual void write(const fileName& name) const
114 write(name, MeshedSurfaceProxy<Face>(*this));
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 } // End namespace fileFormats
122 } // End namespace Foam
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 # include "OFFsurfaceFormat.C"
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 // ************************************************************************* //