1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
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::AC3DsurfaceFormat
28 Provide a means of reading/writing AC3D format.
30 http://www.inivis.com/ac3d/man/ac3dfileformat.html
33 On input, the faces are already organized as zones.
34 The output is always sorted by zones.
35 In the absence of zones, a single zone will be assigned.
40 \*---------------------------------------------------------------------------*/
42 #ifndef AC3DsurfaceFormat_H
43 #define AC3DsurfaceFormat_H
45 #include "MeshedSurface.H"
46 #include "MeshedSurfaceProxy.H"
47 #include "UnsortedMeshedSurface.H"
48 #include "AC3DsurfaceFormatCore.H"
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 /*---------------------------------------------------------------------------*\
58 Class AC3DsurfaceFormat Declaration
59 \*---------------------------------------------------------------------------*/
62 class AC3DsurfaceFormat
64 public MeshedSurface<Face>,
65 public AC3DsurfaceFormatCore
67 // Private Member Functions
69 //- Disallow default bitwise copy construct
70 AC3DsurfaceFormat(const AC3DsurfaceFormat<Face>&);
72 //- Disallow default bitwise assignment
73 void operator=(const AC3DsurfaceFormat<Face>&);
80 //- Construct from file name
81 AC3DsurfaceFormat(const fileName&);
86 //- Read file and return surface
87 static autoPtr<MeshedSurface<Face> > New(const fileName& name)
89 return autoPtr<MeshedSurface<Face> >
91 new AC3DsurfaceFormat<Face>(name)
97 virtual ~AC3DsurfaceFormat()
103 //- Write surface mesh components by proxy
104 static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
106 //- Write UnsortedMeshedSurface, the output is always sorted by zones.
107 static void write(const fileName&, const UnsortedMeshedSurface<Face>&);
110 virtual bool read(const fileName&);
113 virtual void write(const fileName& name) const
115 write(name, MeshedSurfaceProxy<Face>(*this));
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 } // End namespace fileFormats
123 } // End namespace Foam
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 # include "AC3DsurfaceFormat.C"
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 // ************************************************************************* //