FreeFOAM The Cross-Platform CFD Toolkit
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) 1991-2010 OpenCFD Ltd.
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 <surfMesh/MeshedSurface.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
89  void operator=(const STARCDsurfaceFormat<Face>&);
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
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  {
128  write(name, MeshedSurfaceProxy<Face>(*this));
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 // ************************ vim: set sw=4 sts=4 et: ************************ //