Cantera  2.0
IncompressibleSolid.h
1 #ifndef CXX_INCOMPRESSIBLE
2 #define CXX_INCOMPRESSIBLE
3 
4 #include <string>
5 
8 
9 namespace Cantera
10 {
11 
12 class IncompressibleSolid : public ConstDensityThermo
13 {
14 public:
15  IncompressibleSolid(std::string infile,
16  std::string id="") : m_ok(false), m_r(0) {
17 
18  m_r = get_XML_File(infile);
19  if (id == "-") {
20  id = "";
21  }
22  m_ok = buildSolutionFromXML(*m_r, id, "phase", this, 0);
23  if (!m_ok) throw CanteraError("IncompressibleSolid",
24  "buildSolutionFromXML returned false");
25  }
26 
27  virtual ~IncompressibleSolid() {}
28 
29  bool operator!() {
30  return !m_ok;
31  }
32  bool ready() const {
33  return m_ok;
34  }
35 
36  //friend std::ostream& operator<<(std::ostream& s, IdealGasMix& mix) {
37  // std::string r = report(mix, true);
38  // s << r;
39  // return s;
40 
41 protected:
42  bool m_ok;
43  XML_Node* m_r;
44 
45 private:
46 };
47 }
48 
49 
50 #endif