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 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 "HashPtrTable.H"
45 #include "Reaction.H"
46 #include "fileName.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class ReactionList Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class ThermoType>
58 class ReactionList
59 :
60  public SLPtrList<Reaction<ThermoType>>
61 {
62  // Private data
63 
64  //- Reference to the table of species
65  const speciesTable& species_;
66 
67  //- Reference to the thermo database
68  const HashPtrTable<ThermoType>& thermoDb_;
69 
70  //- The dictionary used for construction
71  const dictionary dict_;
72 
73 
74  // Private Member Functions
75 
76  //- No copy assignment
77  void operator=(const ReactionList&) = delete;
78 
79 
80 public:
81 
82  // Constructors
83 
84  //- Construct null
86  (
87  const speciesTable& species,
88  const HashPtrTable<ThermoType>& thermoDatabase
89  );
90 
91  //- Construct from dictionary
93  (
94  const speciesTable& species,
95  const HashPtrTable<ThermoType>& thermoDatabase,
96  const dictionary& dict
97  );
98 
99  //- Construct copy
100  ReactionList(const ReactionList<ThermoType>& reactions);
101 
102 
103  //- Destructor
104  ~ReactionList() = default;
105 
106 
107  // Public Member Functions
108 
109  //- Read reactions from dictionary
110  bool readReactionDict();
111 
112  //- Write
113  void write(Ostream& os) const;
114 };
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #ifdef NoRepository
123  #include "ReactionList.C"
124 #endif
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
SLPtrList.H
Non-intrusive singly-linked pointer list.
speciesTable.H
Foam::ReactionList::ReactionList
ReactionList(const speciesTable &species, const HashPtrTable< ThermoType > &thermoDatabase)
Construct null.
Definition: ReactionList.C:37
Foam::LPtrList
Template class for non-intrusive linked PtrLists.
Definition: LPtrList.H:50
ReactionList.C
Foam::ReactionList
List of templated reactions.
Definition: ReactionList.H:57
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:121
Reaction.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::HashPtrTable< ThermoType >
HashPtrTable.H
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:79
Foam::ReactionList::write
void write(Ostream &os) const
Write.
Definition: ReactionList.C:99