Cantera  2.5.1
Reservoir.h
Go to the documentation of this file.
1 //! @file Reservoir.h
2 
3 // This file is part of Cantera. See License.txt in the top-level directory or
4 // at https://cantera.org/license.txt for license and copyright information.
5 
6 #ifndef CT_RESERVOIR_H
7 #define CT_RESERVOIR_H
8 
9 #include "ReactorBase.h"
10 
11 namespace Cantera
12 {
13 
14 class Reservoir : public ReactorBase
15 {
16 public:
17  Reservoir() {}
18 
19  virtual std::string typeStr() const {
20  return "Reservoir";
21  }
22 
23  /*!
24  * @deprecated To be changed after Cantera 2.5.
25  */
26  virtual int type() const {
27  warn_deprecated("Reservoir::type",
28  "To be changed after Cantera 2.5. "
29  "Return string instead of magic number; use "
30  "Reservoir::typeStr during transition");
31  return ReservoirType;
32  }
33  virtual void initialize(doublereal t0 = 0.0) {}
34 
35  void insert(ThermoPhase& contents) {
36  setThermoMgr(contents);
37  }
38 
39  void insert(shared_ptr<Solution> sol) {
40  setThermoMgr(*sol->thermo());
41  }
42 };
43 
44 }
45 
46 #endif
virtual void setThermoMgr(thermo_t &thermo)
Specify the mixture contained in the reactor.
Definition: ReactorBase.cpp:26
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
Definition: global.cpp:54
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:264
const int ReservoirType
Magic numbers.
Definition: ReactorBase.h:22