BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / edgeMesh / edgeFormats / starcd / STARCDedgeFormat.H
blob228824e8fcfeb0454791846efbabf800a46990d1
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.
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.
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.
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/>.
24 Class
25     Foam::fileFormats::STARCDedgeFormat
27 Description
28     Read/write the lines from pro-STAR vrt/cel files.
30 Note
31     Uses the extension \a .inp (input) to denote the format.
33 See Also
34     Foam::meshReaders::STARCD
36 SourceFiles
37     STARCDedgeFormat.C
39 \*---------------------------------------------------------------------------*/
41 #ifndef STARCDedgeFormat_H
42 #define STARCDedgeFormat_H
44 #include "edgeMesh.H"
45 #include "STARCDCore.H"
47 #include "IFstream.H"
48 #include "Ostream.H"
49 #include "OFstream.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 namespace Foam
55 namespace fileFormats
58 /*---------------------------------------------------------------------------*\
59                       Class STARCDedgeFormat Declaration
60 \*---------------------------------------------------------------------------*/
62 class STARCDedgeFormat
64     public edgeMesh,
65     public STARCDCore
67     // Private Data
69         //- STAR-CD identifier for line shapes (1d elements)
70         static const int starcdLineShape_ = 2;
72         //- STAR-CD identifier for line type
73         static const int starcdLineType_  = 5;
76     // Private Member Functions
78         static inline void writeLines
79         (
80             Ostream&,
81             const edgeList&
82         );
84         //- Disallow default bitwise copy construct
85         STARCDedgeFormat(const STARCDedgeFormat&);
87         //- Disallow default bitwise assignment
88         void operator=(const STARCDedgeFormat&);
91 protected:
93     // Protected Member Functions
95     static void writeCase
96     (
97         Ostream&,
98         const pointField&,
99         const label nEdges
100     );
102 public:
104     // Constructors
106         //- Construct from file name
107         STARCDedgeFormat(const fileName&);
110     // Selectors
112         //- Read file and return edgeMesh
113         static autoPtr<edgeMesh> New(const fileName& name)
114         {
115             return autoPtr<edgeMesh>
116             (
117                 new STARCDedgeFormat(name)
118             );
119         }
122     //- Destructor
123     virtual ~STARCDedgeFormat()
124     {}
127     // Member Functions
129         //- Write edge mesh
130         static void write(const fileName&, const edgeMesh&);
132         //- Read from file
133         virtual bool read(const fileName&);
135         //- Write object
136         virtual void write(const fileName& name) const
137         {
138             write(name, *this);
139         }
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 } // End namespace fileFormats
146 } // End namespace Foam
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 #endif
153 // ************************************************************************* //