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-2024 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 Foam_NASedgeFormat_H
46 #define Foam_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 public:
68 
69  // Constructors
70 
71  //- Construct from file name
72  explicit NASedgeFormat(const fileName& filename);
73 
74 
75  // Selectors
76 
77  //- Read file and return edge mesh
78  static autoPtr<edgeMesh> New(const fileName& name)
79  {
81  }
82 
83 
84  //- Destructor
85  virtual ~NASedgeFormat() = default;
86 
87 
88  // Member Functions
89 
90  //- Read from a file
91  virtual bool read(const fileName& filename) override;
92 };
93 
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 } // End namespace fileFormats
98 } // End namespace Foam
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 #endif
103 
104 // ************************************************************************* //
A class for handling file names.
Definition: fileName.H:72
Core routines used when reading/writing NASTRAN files.
Definition: NASCore.H:53
virtual bool read(const fileName &filename) override
Read from a file.
Definition: NASedgeFormat.C:38
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
static autoPtr< edgeMesh > New(const fileName &name)
Read file and return edge mesh.
Definition: NASedgeFormat.H:77
NASedgeFormat(const fileName &filename)
Construct from file name.
Definition: NASedgeFormat.C:29
Mesh data needed to do the Finite Area discretisation.
Definition: edgeFaMesh.H:47
virtual ~NASedgeFormat()=default
Destructor.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Namespace for OpenFOAM.