STARCDsurfaceFormat.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 | Copyright (C) 2011 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::STARCDsurfaceFormat
26 
27 Description
28  Read/write the surface shells from pro-STAR vrt/cel files.
29 
30 Note
31  Uses the extension \a .inp (input) to denote the format.
32 
33 See Also
34  Foam::meshReaders::STARCD
35 
36 SourceFiles
37  STARCDsurfaceFormat.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef STARCDsurfaceFormat_H
42 #define STARCDsurfaceFormat_H
43 
44 #include "MeshedSurface.H"
45 #include "MeshedSurfaceProxy.H"
46 #include "UnsortedMeshedSurface.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace fileFormats
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class STARCDsurfaceFormat Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class Face>
62 :
63  public MeshedSurface<Face>,
65 {
66  // Private Data
67 
68  //- STAR-CD identifier for shell shapes (2d elements)
69  static const int starcdShellShape_ = 3;
70 
71  //- STAR-CD identifier for shell type (shells vs. baffles)
72  static const int starcdShellType_ = 4;
73 
74 
75  // Private Member Functions
76 
77  static inline void writeShell
78  (
79  Ostream&,
80  const Face&,
81  const label cellId,
82  const label cellTableId
83  );
84 
85  //- Disallow default bitwise copy construct
87 
88  //- Disallow default bitwise assignment
90 
91 
92 public:
93 
94  // Constructors
95 
96  //- Construct from file name
98 
99 
100  // Selectors
101 
102  //- Read file and return surface
104  {
106  (
108  );
109  }
110 
111 
112  //- Destructor
113  virtual ~STARCDsurfaceFormat()
114  {}
115 
116 
117  // Member Functions
118 
119  //- Write surface mesh components by proxy
120  static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
121 
122  //- Read from file
123  virtual bool read(const fileName&);
124 
125  //- Write object
126  virtual void write(const fileName& name) const
127  {
129  }
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace fileFormats
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #ifdef NoRepository
141 # include "STARCDsurfaceFormat.C"
142 #endif
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
Foam::fileFormats::STARCDsurfaceFormat::STARCDsurfaceFormat
STARCDsurfaceFormat(const STARCDsurfaceFormat< Face > &)
Disallow default bitwise copy construct.
MeshedSurfaceProxy.H
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
STARCDsurfaceFormat.C
Foam::fileFormats::STARCDsurfaceFormat::~STARCDsurfaceFormat
virtual ~STARCDsurfaceFormat()
Destructor.
Definition: STARCDsurfaceFormat.H:112
Foam::fileFormats::STARCDsurfaceFormat::starcdShellType_
static const int starcdShellType_
STAR-CD identifier for shell type (shells vs. baffles)
Definition: STARCDsurfaceFormat.H:71
Foam::MeshedSurfaceProxy
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
Definition: MeshedSurface.H:73
UnsortedMeshedSurface.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::fileFormats::STARCDsurfaceFormat::operator=
void operator=(const STARCDsurfaceFormat< Face > &)
Disallow default bitwise assignment.
Foam::fileFormats::STARCDsurfaceFormat::read
virtual bool read(const fileName &)
Read from file.
Definition: STARCDsurfaceFormat.C:78
Foam::fileFormats::STARCDsurfaceFormat::write
static void write(const fileName &, const MeshedSurfaceProxy< Face > &)
Write surface mesh components by proxy.
Definition: STARCDsurfaceFormat.C:244
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::fileFormats::STARCDsurfaceFormat::New
static autoPtr< MeshedSurface< Face > > New(const fileName &name)
Read file and return surface.
Definition: STARCDsurfaceFormat.H:102
Foam::fileFormats::STARCDsurfaceFormat
Read/write the surface shells from pro-STAR vrt/cel files.
Definition: STARCDsurfaceFormat.H:60
cellId
label cellId
Definition: interrogateWallPatches.H:67
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::fileFormats::STARCDsurfaceFormat::write
virtual void write(const fileName &name) const
Write object.
Definition: STARCDsurfaceFormat.H:125
Foam::fileFormats::STARCDsurfaceFormatCore
Internal class used by the STARCDsurfaceFormat.
Definition: STARCDsurfaceFormatCore.H:54
Foam::fileFormats::STARCDsurfaceFormat::writeShell
static void writeShell(Ostream &, const Face &, const label cellId, const label cellTableId)
Definition: STARCDsurfaceFormat.C:33
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::fileFormats::STARCDsurfaceFormat::starcdShellShape_
static const int starcdShellShape_
STAR-CD identifier for shell shapes (2d elements)
Definition: STARCDsurfaceFormat.H:68
Foam::MeshedSurface
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Definition: MeshedSurface.H:72
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
MeshedSurface.H
STARCDsurfaceFormatCore.H