NASedgeFormat.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2017 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::fileFormats::NASedgeFormat
29 
30 Description
31  Nastran edge reader.
32 
33  - Interprets "CBEAM", "CROD" and "PLOTEL" entries as edges.
34  - Handles Nastran short, long formats and comma-separated free format.
35  - Properly handles the Nastran compact floating point notation: \n
36  \verbatim
37  GRID 28 10.20269-.030265-2.358-8
38  \endverbatim
39 
40 SourceFiles
41  NASedgeFormat.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef NASedgeFormat_H
46 #define NASedgeFormat_H
47 
48 #include "edgeMesh.H"
49 #include "NASCore.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace fileFormats
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class NASedgeFormat Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class NASedgeFormat
63 :
64  public edgeMesh,
65  public NASCore
66 {
67  // Private Member Functions
68 
69  //- No copy construct
70  NASedgeFormat(const NASedgeFormat&) = delete;
71 
72  //- No copy assignment
73  void operator=(const NASedgeFormat&) = delete;
74 
75 public:
76 
77  // Constructors
78 
79  //- Construct from file name
80  NASedgeFormat(const fileName& filename);
81 
82 
83  // Selectors
84 
85  //- Read file and return edge mesh
86  static autoPtr<edgeMesh> New(const fileName& name)
87  {
89  }
90 
91 
92  //- Destructor
93  virtual ~NASedgeFormat() = default;
94 
95 
96  // Member Functions
97 
98  //- Read from a file
99  virtual bool read(const fileName& filename);
100 
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace fileFormats
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::fileFormats::NASCore
Core routines used when reading/writing NASTRAN files.
Definition: NASCore.H:58
Foam::fileFormats::NASedgeFormat::New
static autoPtr< edgeMesh > New(const fileName &name)
Read file and return edge mesh.
Definition: NASedgeFormat.H:85
edgeMesh.H
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::fileFormats::NASedgeFormat::read
virtual bool read(const fileName &filename)
Read from a file.
Definition: NASedgeFormat.C:45
Foam::fileFormats::NASedgeFormat
Nastran edge reader.
Definition: NASedgeFormat.H:61
NASCore.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fileFormats::NASedgeFormat::~NASedgeFormat
virtual ~NASedgeFormat()=default
Destructor.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::edgeMesh
Mesh data needed to do the Finite Area discretisation.
Definition: edgeFaMesh.H:52