initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / surfMesh / surfaceFormats / nas / NASsurfaceFormat.H
blobbf57a568a5e74b5fd0bd9943819388840bfeaea0
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::fileFormats::NASsurfaceFormat
28 Description
29     Nastran surface reader.
31     - Uses the Ansa "$ANSA_NAME" or the Hypermesh "$HMNAME COMP" extensions
32       to obtain zone names.
33     - Handles Nastran short and long formats, but not free format.
34     - Properly handles the Nastran compact floating point notation: \n
35     @verbatim
36         GRID          28        10.20269-.030265-2.358-8
37     @endverbatim
39 SourceFiles
40     NASsurfaceFormat.C
42 \*---------------------------------------------------------------------------*/
44 #ifndef NASsurfaceFormat_H
45 #define NASsurfaceFormat_H
47 #include "MeshedSurface.H"
48 #include "MeshedSurfaceProxy.H"
49 #include "UnsortedMeshedSurface.H"
50 #include "NASsurfaceFormatCore.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 namespace Foam
56 namespace fileFormats
59 /*---------------------------------------------------------------------------*\
60                       Class NASsurfaceFormat Declaration
61 \*---------------------------------------------------------------------------*/
63 template<class Face>
64 class NASsurfaceFormat
66     public MeshedSurface<Face>,
67     public NASsurfaceFormatCore
69     // Private Member Functions
71         //- Disallow default bitwise copy construct
72         NASsurfaceFormat(const NASsurfaceFormat<Face>&);
74         //- Disallow default bitwise assignment
75         void operator=(const NASsurfaceFormat<Face>&);
78 public:
80     // Constructors
82         //- Construct from file name
83         NASsurfaceFormat(const fileName&);
86     // Selectors
88         //- Read file and return surface
89         static autoPtr<MeshedSurface<Face> > New(const fileName& name)
90         {
91             return autoPtr<MeshedSurface<Face> >
92             (
93                 new NASsurfaceFormat<Face>(name)
94             );
95         }
98     // Destructor
100         virtual ~NASsurfaceFormat()
101         {}
104     // Member Functions
106         //- Read from a file
107         virtual bool read(const fileName&);
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 } // End namespace fileFormats
114 } // End namespace Foam
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 #ifdef NoRepository
119 #   include "NASsurfaceFormat.C"
120 #endif
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 #endif
126 // ************************************************************************* //