00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 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 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your 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, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::fileFormats::NASsurfaceFormat 00026 00027 Description 00028 Nastran surface reader. 00029 00030 - Uses the Ansa "$ANSA_NAME" or the Hypermesh "$HMNAME COMP" extensions 00031 to obtain zone names. 00032 - Handles Nastran short and long formats, but not free format. 00033 - Properly handles the Nastran compact floating point notation: \n 00034 @verbatim 00035 GRID 28 10.20269-.030265-2.358-8 00036 @endverbatim 00037 00038 SourceFiles 00039 NASsurfaceFormat.C 00040 00041 \*---------------------------------------------------------------------------*/ 00042 00043 #ifndef NASsurfaceFormat_H 00044 #define NASsurfaceFormat_H 00045 00046 #include <surfMesh/MeshedSurface.H> 00047 #include <surfMesh/MeshedSurfaceProxy.H> 00048 #include <surfMesh/UnsortedMeshedSurface.H> 00049 #include "NASsurfaceFormatCore.H" 00050 00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00052 00053 namespace Foam 00054 { 00055 namespace fileFormats 00056 { 00057 00058 /*---------------------------------------------------------------------------*\ 00059 Class NASsurfaceFormat Declaration 00060 \*---------------------------------------------------------------------------*/ 00061 00062 template<class Face> 00063 class NASsurfaceFormat 00064 : 00065 public MeshedSurface<Face>, 00066 public NASsurfaceFormatCore 00067 { 00068 // Private Member Functions 00069 00070 //- Disallow default bitwise copy construct 00071 NASsurfaceFormat(const NASsurfaceFormat<Face>&); 00072 00073 //- Disallow default bitwise assignment 00074 void operator=(const NASsurfaceFormat<Face>&); 00075 00076 00077 public: 00078 00079 // Constructors 00080 00081 //- Construct from file name 00082 NASsurfaceFormat(const fileName&); 00083 00084 00085 // Selectors 00086 00087 //- Read file and return surface 00088 static autoPtr<MeshedSurface<Face> > New(const fileName& name) 00089 { 00090 return autoPtr<MeshedSurface<Face> > 00091 ( 00092 new NASsurfaceFormat<Face>(name) 00093 ); 00094 } 00095 00096 00097 // Destructor 00098 00099 virtual ~NASsurfaceFormat() 00100 {} 00101 00102 00103 // Member Functions 00104 00105 //- Read from a file 00106 virtual bool read(const fileName&); 00107 }; 00108 00109 00110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00111 00112 } // End namespace fileFormats 00113 } // End namespace Foam 00114 00115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00116 00117 #ifdef NoRepository 00118 # include "NASsurfaceFormat.C" 00119 #endif 00120 00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00122 00123 #endif 00124 00125 // ************************ vim: set sw=4 sts=4 et: ************************ //