1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::fileFormats::OFSsurfaceFormat
28 Provide a means of reading/writing the single-file OpenFOAM surface format.
31 This class provides more methods than the regular surface format interface.
36 \*---------------------------------------------------------------------------*/
38 #ifndef OFSsurfaceFormat_H
39 #define OFSsurfaceFormat_H
43 #include "MeshedSurface.H"
44 #include "MeshedSurfaceProxy.H"
45 #include "UnsortedMeshedSurface.H"
46 #include "OFSsurfaceFormatCore.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class OFSsurfaceFormat Declaration
57 \*---------------------------------------------------------------------------*/
60 class OFSsurfaceFormat
62 public MeshedSurface<Face>,
63 public OFSsurfaceFormatCore
65 // Private Member Functions
67 //- Disallow default bitwise copy construct
68 OFSsurfaceFormat(const OFSsurfaceFormat<Face>&);
70 //- Disallow default bitwise assignment
71 void operator=(const OFSsurfaceFormat<Face>&);
78 //- Construct from file name
79 OFSsurfaceFormat(const fileName&);
84 //- Read file and return surface
85 static autoPtr<MeshedSurface<Face> > New(const fileName& name)
87 return autoPtr<MeshedSurface<Face> >
89 new OFSsurfaceFormat<Face>(name)
95 virtual ~OFSsurfaceFormat()
102 //- Read surface mesh components
111 //- Read MeshedSurface
118 //- Read UnsortedMeshedSurface
119 // The output is sorted by zones
123 UnsortedMeshedSurface<Face>&
126 //- Write surface mesh components by proxy
127 static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
130 virtual bool read(const fileName&);
133 virtual void write(const fileName& name) const
135 write(name, MeshedSurfaceProxy<Face>(*this));
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace fileFormats
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 # include "OFSsurfaceFormat.C"
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 // ************************************************************************* //