1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::fileFormats::STARCDsurfaceFormat
28 Read/write the surface shells from pro-STAR vrt/cel files.
31 Uses the extension @a .inp (input) to denote the format.
34 Foam::meshReaders::STARCD
39 \*---------------------------------------------------------------------------*/
41 #ifndef STARCDsurfaceFormat_H
42 #define STARCDsurfaceFormat_H
44 #include "MeshedSurface.H"
45 #include "MeshedSurfaceProxy.H"
46 #include "UnsortedMeshedSurface.H"
47 #include "STARCDsurfaceFormatCore.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 /*---------------------------------------------------------------------------*\
57 Class STARCDsurfaceFormat Declaration
58 \*---------------------------------------------------------------------------*/
61 class STARCDsurfaceFormat
63 public MeshedSurface<Face>,
64 public STARCDsurfaceFormatCore
68 //- STAR-CD identifier for shell shapes (2d elements)
69 static const int starcdShellShape_ = 3;
71 //- STAR-CD identifier for shell type (shells vs. baffles)
72 static const int starcdShellType_ = 4;
75 // Private Member Functions
77 static inline void writeShell
82 const label cellTableId
85 //- Disallow default bitwise copy construct
86 STARCDsurfaceFormat(const STARCDsurfaceFormat<Face>&);
88 //- Disallow default bitwise assignment
89 void operator=(const STARCDsurfaceFormat<Face>&);
96 //- Construct from file name
97 STARCDsurfaceFormat(const fileName&);
102 //- Read file and return surface
103 static autoPtr<MeshedSurface<Face> > New(const fileName& name)
105 return autoPtr<MeshedSurface<Face> >
107 new STARCDsurfaceFormat<Face>(name)
113 virtual ~STARCDsurfaceFormat()
119 //- Write surface mesh components by proxy
120 static void write(const fileName&, const MeshedSurfaceProxy<Face>&);
123 virtual bool read(const fileName&);
126 virtual void write(const fileName& name) const
128 write(name, MeshedSurfaceProxy<Face>(*this));
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 } // End namespace fileFormats
136 } // End namespace Foam
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 # include "STARCDsurfaceFormat.C"
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 // ************************************************************************* //