NASsurfaceFormat.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::fileFormats::NASsurfaceFormat
26 
27 Description
28  Nastran surface reader.
29 
30  - Uses the Ansa "$ANSA_NAME" or the Hypermesh "$HMNAME COMP" extensions
31  to obtain zone names.
32  - Handles Nastran short and long formats, but not free format.
33  - Properly handles the Nastran compact floating point notation: \n
34  \verbatim
35  GRID 28 10.20269-.030265-2.358-8
36  \endverbatim
37 
38 SourceFiles
39  NASsurfaceFormat.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef NASsurfaceFormat_H
44 #define NASsurfaceFormat_H
45 
46 #include "MeshedSurface.H"
47 #include "MeshedSurfaceProxy.H"
48 #include "UnsortedMeshedSurface.H"
49 #include "NASCore.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace fileFormats
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class NASsurfaceFormat Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class Face>
63 class NASsurfaceFormat
64 :
65  public MeshedSurface<Face>,
66  public NASCore
67 {
68 public:
69 
70  // Constructors
71 
72  //- Construct from file name
73  NASsurfaceFormat(const fileName&);
74 
75  //- Disallow default bitwise copy construction
77 
78 
79  // Selectors
80 
81  //- Read file and return surface
83  {
85  (
87  );
88  }
89 
90 
91  //- Destructor
92  virtual ~NASsurfaceFormat()
93  {}
94 
95 
96  // Member Functions
97 
98  //- Read from a file
99  virtual bool read(const fileName&);
100 
101 
102  // Member Operators
103 
104  //- Disallow default bitwise assignment
105  void operator=(const NASsurfaceFormat<Face>&) = delete;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace fileFormats
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #ifdef NoRepository
117  #include "NASsurfaceFormat.C"
118 #endif
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
A class for handling file names.
Definition: fileName.H:79
Core routines used when reading/writing NASTRAN files.
Definition: NASCore.H:51
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Definition: MeshedSurface.H:72
virtual ~NASsurfaceFormat()
Destructor.
static autoPtr< MeshedSurface< Face > > New(const fileName &name)
Read file and return surface.
virtual bool read(const fileName &)
Read from a file.
void operator=(const NASsurfaceFormat< Face > &)=delete
Disallow default bitwise assignment.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
NASsurfaceFormat(const fileName &)
Construct from file name.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Namespace for OpenFOAM.