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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::ReactionList
29 
30 Description
31  List of templated reactions
32 
33 SourceFiles
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 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class ReactionList Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class ThermoType>
57 class 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 
79 public:
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 // ************************************************************************* //
SLPtrList.H
Non-intrusive singly-linked pointer list.
speciesTable.H
Foam::LPtrList
Template class for non-intrusive linked PtrLists.
Definition: LPtrList.H:50
ReactionList.C
Foam::ReactionList::ReactionList
ReactionList(const speciesTable &species, const ReactionTable< ThermoType > &thermoDatabase)
Construct empty list.
Definition: ReactionList.C:35
Foam::ReactionList
List of templated reactions.
Definition: ReactionList.H:56
Foam::hashedWordList
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
Definition: hashedWordList.H:54
fileName.H
Foam::ReactionList::~ReactionList
~ReactionList()=default
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Reaction.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::HashPtrTable< ThermoType >
PtrList.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::ReactionList::readReactionDict
bool readReactionDict()
Read reactions from dictionary.
Definition: ReactionList.C:77
Foam::ReactionList::write
void write(Ostream &os) const
Write.
Definition: ReactionList.C:97