ReactionList.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2019-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::ReactionList
29
30Description
31 List of templated reactions
32
33SourceFiles
34 ReactionList.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef ReactionList_H
39#define ReactionList_H
40
41#include "PtrList.H"
42#include "SLPtrList.H"
43#include "speciesTable.H"
44#include "fileName.H"
45#include "Reaction.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class ReactionList Declaration
54\*---------------------------------------------------------------------------*/
55
56template<class ThermoType>
57class ReactionList
58:
59 public SLPtrList<Reaction<ThermoType>>
60{
61 // Private Data
62
63 //- Reference to the table of species
64 const speciesTable& species_;
65
66 //- Reference to the thermo database
67 const ReactionTable<ThermoType>& thermoDb_;
68
69 //- The dictionary used for construction
70 const dictionary dict_;
71
72
73 // Private Member Functions
74
75 //- No copy assignment
76 void operator=(const ReactionList&) = delete;
77
78
79public:
80
81 // Constructors
82
83 //- Construct empty list
85 (
86 const speciesTable& species,
87 const ReactionTable<ThermoType>& thermoDatabase
88 );
89
90 //- Construct from dictionary
92 (
93 const speciesTable& species,
94 const ReactionTable<ThermoType>& thermoDatabase,
95 const dictionary& dict
96 );
97
98 //- Construct copy
99 ReactionList(const ReactionList<ThermoType>& reactions);
100
101
102 //- Destructor
103 ~ReactionList() = default;
104
105
106 // Public Member Functions
107
108 //- Read reactions from dictionary
109 bool readReactionDict();
110
111 //- Write
112 void write(Ostream& os) const;
113};
114
115// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116
117} // End namespace Foam
118
119// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121#ifdef NoRepository
122 #include "ReactionList.C"
123#endif
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127#endif
128
129// ************************************************************************* //
Non-intrusive singly-linked pointer list.
Template class for non-intrusive linked PtrLists.
Definition: LPtrList.H:75
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
List of templated reactions.
Definition: ReactionList.H:59
ReactionList(const ReactionList< ThermoType > &reactions)
Construct copy.
~ReactionList()=default
Destructor.
bool readReactionDict()
Read reactions from dictionary.
Definition: ReactionList.C:77
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
dictionary dict