initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / reactionThermo / chemistryReaders / foamChemistryReader / foamChemistryReader.H
blob129cf1c811c180a18dcc6ba9a2bd6f65dda6b4f4
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::foamChemistryReader
28 Description
29     Chemistry reader for OpenFOAM format
31 SourceFiles
32     foamChemistryReader.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef foamChemistryReader_H
37 #define foamChemistryReader_H
39 #include "chemistryReader.H"
40 #include "fileName.H"
41 #include "typeInfo.H"
42 #include "HashPtrTable.H"
43 #include "SLPtrList.H"
44 #include "labelList.H"
45 #include "speciesTable.H"
46 #include "atomicWeights.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 namespace Foam
53 /*---------------------------------------------------------------------------*\
54                        Class foamChemistry Declaration
55 \*---------------------------------------------------------------------------*/
57 template<class ThermoType>
58 class foamChemistryReader
60     public chemistryReader<ThermoType>
62         //- Table of the thermodynamic data given in the foamChemistry file
63         HashPtrTable<ThermoType> speciesThermo_;
65         //- Table of species
66         speciesTable speciesTable_;
68         //- List of the reactions
69         SLPtrList<Reaction<ThermoType> > reactions_;
72     // Private Member Functions
74         //- Disallow default bitwise copy construct
75         foamChemistryReader(const foamChemistryReader&);
77         //- Disallow default bitwise assignment
78         void operator=(const foamChemistryReader&);
81 public:
83     //- Runtime type information
84     TypeName("foamChemistryReader");
87     // Constructors
89         //- Construct from foamChemistry and thermodynamics file names
90         foamChemistryReader
91         (
92             const fileName& reactionsFileName,
93             const fileName& thermoFileName
94         );
96         //- Construct by getting the foamChemistry and thermodynamics file names
97         //  from dictionary
98         foamChemistryReader(const dictionary& thermoDict);
101     //- Destructor
102     virtual ~foamChemistryReader()
103     {}
106     // Member functions
108         //- Table of species
109         const speciesTable& species() const
110         {
111             return speciesTable_;
112         }
114         //- Table of the thermodynamic data given in the foamChemistry file
115         const HashPtrTable<ThermoType>& speciesThermo() const
116         {
117             return speciesThermo_;
118         }
120         //- List of the reactions
121         const SLPtrList<Reaction<ThermoType> >& reactions() const
122         {
123             return reactions_;
124         }
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 } // End namespace Foam
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 #ifdef NoRepository
135 #   include "foamChemistryReader.C"
136 #endif
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 #endif
142 // ************************************************************************* //