1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2006-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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/>.
25 Foam::fileFormats::STARCDCore
28 Core routines used when reading/writing pro-STAR vrt/cel/bnd files.
33 \*---------------------------------------------------------------------------*/
39 #include "pointField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class fileFormats::STARCDCore Declaration
51 \*---------------------------------------------------------------------------*/
57 // Protected Member Functions
60 static bool readHeader(IFstream&, const word& fileSignature);
62 //- Write header for fileType (CELL|VERTEX|BOUNDARY)
63 static void writeHeader(Ostream&, const word& fileType);
93 // Public Member Functions
95 //- Read points from a (.vrt) file
96 // The file format is as follows:
99 // PROSTAR_VERTEX newline
102 // {version} 0 0 0 0 0 0 0 newline
105 // {vertexId} {x} {y} {z} newline
107 static bool readPoints(IFstream&, pointField&, labelList& ids);
109 //- Write header and points to (.vrt) file
110 static void writePoints(Ostream&, const pointField&);
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 } // End namespace fileFormats
124 } // End namespace Foam
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 // ************************************************************************* //