1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "rawSetWriter.H"
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
34 Foam::rawSetWriter<Type>::rawSetWriter()
40 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
43 Foam::rawSetWriter<Type>::~rawSetWriter()
47 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
50 Foam::fileName Foam::rawSetWriter<Type>::getFileName
52 const coordSet& points,
53 const wordList& valueSetNames
56 return this->getBaseName(points, valueSetNames) + ".xy";
61 void Foam::rawSetWriter<Type>::write
63 const coordSet& points,
64 const wordList& valueSetNames,
65 const List<const Field<Type>*>& valueSets,
69 // Collect sets into columns
70 List<const List<Type>*> columns(valueSets.size());
74 columns[i] = valueSets[i];
77 this->writeTable(points, columns, os);
82 void Foam::rawSetWriter<Type>::write
84 const bool writeTracks,
85 const PtrList<coordSet>& points,
86 const wordList& valueSetNames,
87 const List<List<Field<Type> > >& valueSets,
91 if (valueSets.size() != valueSetNames.size())
93 FatalErrorIn("rawSetWriter<Type>::write(..)")
94 << "Number of variables:" << valueSetNames.size() << endl
95 << "Number of valueSets:" << valueSets.size()
99 List<const List<Type>*> columns(valueSets.size());
101 forAll(points, trackI)
103 // Collect sets into columns
106 columns[i] = &valueSets[i][trackI];
109 this->writeTable(points[trackI], columns, os);
115 // ************************************************************************* //