BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / thermophysicalModels / reactionThermo / chemistryReaders / foamChemistryReader / foamChemistryReader.C
blob0efe8e2b8a5ec839bd63619bce637c3cd9d7475c
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 \*---------------------------------------------------------------------------*/
26 #include "foamChemistryReader.H"
27 #include "IFstream.H"
28 #include "addToRunTimeSelectionTable.H"
30 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
32 template<class ThermoType>
33 Foam::speciesTable& Foam::foamChemistryReader<ThermoType>::setSpecies
35     const dictionary& dict,
36     speciesTable& species
39     wordList s(dict.lookup("species"));
40     species.transfer(s);
41     return species;
45 // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
47 template<class ThermoType>
48 Foam::foamChemistryReader<ThermoType>::foamChemistryReader
50     const fileName& reactionsFileName,
51     speciesTable& species,
52     const fileName& thermoFileName
55     chemistryReader<ThermoType>(),
56     chemDict_
57     (
58         IFstream
59         (
60             fileName(reactionsFileName).expand()
61         )()
62     ),
63     thermoDict_
64     (
65         IFstream
66         (
67             fileName(thermoFileName).expand()
68         )()
69     ),
70     speciesTable_(setSpecies(chemDict_, species)),
71     speciesThermo_(thermoDict_),
72     reactions_(speciesTable_, speciesThermo_, chemDict_)
76 template<class ThermoType>
77 Foam::foamChemistryReader<ThermoType>::foamChemistryReader
79     const dictionary& thermoDict,
80     speciesTable& species
83     chemistryReader<ThermoType>(),
84     chemDict_
85     (
86         IFstream
87         (
88             fileName(thermoDict.lookup("foamChemistryFile")).expand()
89         )()
90     ),
91     thermoDict_
92     (
93         IFstream
94         (
95             fileName(thermoDict.lookup("foamChemistryThermoFile")).expand()
96         )()
97     ),
98     speciesThermo_(thermoDict_),
99     speciesTable_(setSpecies(chemDict_, species)),
100     reactions_(speciesTable_, speciesThermo_, chemDict_)
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //