|
|
|
AC3DsurfaceFormat.HGo 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::AC3DsurfaceFormat 00027 00028 Description 00029 Provide a means of reading/writing AC3D format. 00030 00031 http://www.inivis.com/ac3d/man/ac3dfileformat.html 00032 00033 Note 00034 On input, the faces are already organized as zones. 00035 The output is always sorted by zones. 00036 In the absence of zones, a single zone will be assigned. 00037 00038 SourceFiles 00039 AC3DsurfaceFormat.C 00040 00041 \*---------------------------------------------------------------------------*/ 00042 00043 #ifndef AC3DsurfaceFormat_H 00044 #define AC3DsurfaceFormat_H 00045 00046 #include "MeshedSurface.H" 00047 #include "MeshedSurfaceProxy.H" 00048 #include "UnsortedMeshedSurface.H" 00049 #include "AC3DsurfaceFormatCore.H" 00050 00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00052 00053 namespace Foam 00054 { 00055 namespace fileFormats 00056 { 00057 00058 /*---------------------------------------------------------------------------*\ 00059 Class AC3DsurfaceFormat Declaration 00060 \*---------------------------------------------------------------------------*/ 00061 00062 template<class Face> 00063 class AC3DsurfaceFormat 00064 : 00065 public MeshedSurface<Face>, 00066 public AC3DsurfaceFormatCore 00067 { 00068 // Private Member Functions 00069 00070 //- Disallow default bitwise copy construct 00071 AC3DsurfaceFormat(const AC3DsurfaceFormat<Face>&); 00072 00073 //- Disallow default bitwise assignment 00074 void operator=(const AC3DsurfaceFormat<Face>&); 00075 00076 00077 public: 00078 00079 // Constructors 00080 00081 //- Construct from file name 00082 AC3DsurfaceFormat(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 AC3DsurfaceFormat<Face>(name) 00093 ); 00094 } 00095 00096 00097 // Destructor 00098 00099 virtual ~AC3DsurfaceFormat() 00100 {} 00101 00102 00103 // Member Functions 00104 00105 //- Write surface mesh components by proxy 00106 static void write(const fileName&, const MeshedSurfaceProxy<Face>&); 00107 00108 //- Write UnsortedMeshedSurface, the output is always sorted by zones. 00109 static void write(const fileName&, const UnsortedMeshedSurface<Face>&); 00110 00111 //- Read from file 00112 virtual bool read(const fileName&); 00113 00114 //- Write object 00115 virtual void write(const fileName& name) const 00116 { 00117 write(name, MeshedSurfaceProxy<Face>(*this)); 00118 } 00119 }; 00120 00121 00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00123 00124 } // End namespace fileFormats 00125 } // End namespace Foam 00126 00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00128 00129 #ifdef NoRepository 00130 # include "AC3DsurfaceFormat.C" 00131 #endif 00132 00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00134 00135 #endif 00136 00137 // ************************************************************************* // |