OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

NASsurfaceFormat.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::fileFormats::NASsurfaceFormat
00027 
00028 Description
00029     Nastran surface reader.
00030 
00031     - Uses the Ansa "$ANSA_NAME" or the Hypermesh "$HMNAME COMP" extensions
00032       to obtain zone names.
00033     - Handles Nastran short and long formats, but not free format.
00034     - Properly handles the Nastran compact floating point notation: \n
00035     @verbatim
00036         GRID          28        10.20269-.030265-2.358-8
00037     @endverbatim
00038 
00039 SourceFiles
00040     NASsurfaceFormat.C
00041 
00042 \*---------------------------------------------------------------------------*/
00043 
00044 #ifndef NASsurfaceFormat_H
00045 #define NASsurfaceFormat_H
00046 
00047 #include "MeshedSurface.H"
00048 #include "MeshedSurfaceProxy.H"
00049 #include "UnsortedMeshedSurface.H"
00050 #include "NASsurfaceFormatCore.H"
00051 
00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00053 
00054 namespace Foam
00055 {
00056 namespace fileFormats
00057 {
00058 
00059 /*---------------------------------------------------------------------------*\
00060                       Class NASsurfaceFormat Declaration
00061 \*---------------------------------------------------------------------------*/
00062 
00063 template<class Face>
00064 class NASsurfaceFormat
00065 :
00066     public MeshedSurface<Face>,
00067     public NASsurfaceFormatCore
00068 {
00069     // Private Member Functions
00070 
00071         //- Disallow default bitwise copy construct
00072         NASsurfaceFormat(const NASsurfaceFormat<Face>&);
00073 
00074         //- Disallow default bitwise assignment
00075         void operator=(const NASsurfaceFormat<Face>&);
00076 
00077 
00078 public:
00079 
00080     // Constructors
00081 
00082         //- Construct from file name
00083         NASsurfaceFormat(const fileName&);
00084 
00085 
00086     // Selectors
00087 
00088         //- Read file and return surface
00089         static autoPtr<MeshedSurface<Face> > New(const fileName& name)
00090         {
00091             return autoPtr<MeshedSurface<Face> >
00092             (
00093                 new NASsurfaceFormat<Face>(name)
00094             );
00095         }
00096 
00097 
00098     // Destructor
00099 
00100         virtual ~NASsurfaceFormat()
00101         {}
00102 
00103 
00104     // Member Functions
00105 
00106         //- Read from a file
00107         virtual bool read(const fileName&);
00108 };
00109 
00110 
00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00112 
00113 } // End namespace fileFormats
00114 } // End namespace Foam
00115 
00116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00117 
00118 #ifdef NoRepository
00119 #   include "NASsurfaceFormat.C"
00120 #endif
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 #endif
00125 
00126 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd