Cantera  2.1.2
IncompressibleSolid.h
Go to the documentation of this file.
1 //! @file IncompressibleSolid.h
2 #ifndef CXX_INCOMPRESSIBLE
3 #define CXX_INCOMPRESSIBLE
4 
7 
8 namespace Cantera
9 {
10 
11 class IncompressibleSolid : public ConstDensityThermo
12 {
13 public:
14  IncompressibleSolid(const std::string& infile,
15  std::string id="") : m_ok(false), m_r(0) {
16 
17  m_r = get_XML_File(infile);
18  if (id == "-") {
19  id = "";
20  }
21  m_ok = buildSolutionFromXML(*m_r, id, "phase", this, 0);
22  if (!m_ok) throw CanteraError("IncompressibleSolid",
23  "buildSolutionFromXML returned false");
24  }
25 
26  bool operator!() {
27  return !m_ok;
28  }
29  bool ready() const {
30  return m_ok;
31  }
32 
33  //friend std::ostream& operator<<(std::ostream& s, IdealGasMix& mix) {
34  // std::string r = report(mix, true);
35  // s << r;
36  // return s;
37 
38 protected:
39  bool m_ok;
40  XML_Node* m_r;
41 
42 private:
43 };
44 }
45 
46 
47 #endif
XML_Node * get_XML_File(const std::string &file, int debug)
Return a pointer to the XML tree for a Cantera input file.
Definition: global.cpp:144
Header for a Thermo manager for incompressible ThermoPhases (see Thermodynamic Properties and ConstDe...
bool buildSolutionFromXML(XML_Node &root, const std::string &id, const std::string &nm, ThermoPhase *th, Kinetics *k)
Build a single-phase ThermoPhase object with associated kinetics mechanism.
Definitions of global routines for the importing of data from XML files (see Input File Handling)...