*** empty log message ***
This commit is contained in:
parent
ea1b61e3d9
commit
6da100c5d5
3 changed files with 133 additions and 0 deletions
47
Cantera/cxx/include/Edge.h
Normal file
47
Cantera/cxx/include/Edge.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#ifndef CXX_EDGE
|
||||
#define CXX_EDGE
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "kernel/EdgePhase.h"
|
||||
#include "kernel/EdgeKinetics.h"
|
||||
#include "kernel/importCTML.h"
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
class Edge :
|
||||
public EdgePhase, public EdgeKinetics
|
||||
{
|
||||
public:
|
||||
Edge(string infile, string id, vector<ThermoPhase*> phases)
|
||||
: m_ok(false), m_r(0) {
|
||||
|
||||
m_r = get_XML_File(infile);
|
||||
if (id == "-") id = "";
|
||||
|
||||
XML_Node* x = get_XML_Node("#"+id, m_r);
|
||||
if (!x)
|
||||
throw CanteraError("Edge","error in get_XML_Node");
|
||||
|
||||
importPhase(*x, this);
|
||||
phases.push_back(this);
|
||||
importKinetics(*x, phases, this);
|
||||
m_ok = true;
|
||||
}
|
||||
|
||||
|
||||
virtual ~Edge() {}
|
||||
|
||||
bool operator!() { return !m_ok;}
|
||||
bool ready() { return m_ok; }
|
||||
|
||||
protected:
|
||||
bool m_ok;
|
||||
XML_Node* m_r;
|
||||
|
||||
private:
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
43
Cantera/cxx/include/IncompressibleSolid.h
Normal file
43
Cantera/cxx/include/IncompressibleSolid.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef CXX_INCOMPRESSIBLE
|
||||
#define CXX_INCOMPRESSIBLE
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "kernel/ConstDensityThermo.h"
|
||||
#include "kernel/importCTML.h"
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
class IncompressibleSolid : public ConstDensityThermo
|
||||
{
|
||||
public:
|
||||
IncompressibleSolid(string infile, string id="") : m_ok(false), m_r(0) {
|
||||
|
||||
m_r = get_XML_File(infile);
|
||||
if (id == "-") id = "";
|
||||
m_ok = buildSolutionFromXML(*m_r, id, "phase", this, 0);
|
||||
if (!m_ok) throw CanteraError("IncompressibleSolid",
|
||||
"buildSolutionFromXML returned false");
|
||||
}
|
||||
|
||||
|
||||
virtual ~IncompressibleSolid() {}
|
||||
|
||||
bool operator!() { return !m_ok;}
|
||||
bool ready() { return m_ok; }
|
||||
|
||||
//friend ostream& operator<<(ostream& s, IdealGasMix& mix) {
|
||||
// string r = report(mix, true);
|
||||
// s << r;
|
||||
// return s;
|
||||
|
||||
protected:
|
||||
bool m_ok;
|
||||
XML_Node* m_r;
|
||||
|
||||
private:
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
43
Cantera/cxx/include/Metal.h
Normal file
43
Cantera/cxx/include/Metal.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef CXX_METAL
|
||||
#define CXX_METAL
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "kernel/MetalPhase.h"
|
||||
#include "kernel/importCTML.h"
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
class Metal : public MetalPhase
|
||||
{
|
||||
public:
|
||||
Metal(string infile, string id="") : m_ok(false), m_r(0) {
|
||||
|
||||
m_r = get_XML_File(infile);
|
||||
if (id == "-") id = "";
|
||||
m_ok = buildSolutionFromXML(*m_r, id, "phase", this, 0);
|
||||
if (!m_ok) throw CanteraError("Metal",
|
||||
"buildSolutionFromXML returned false");
|
||||
}
|
||||
|
||||
|
||||
virtual ~Metal() {}
|
||||
|
||||
bool operator!() { return !m_ok;}
|
||||
bool ready() { return m_ok; }
|
||||
|
||||
//friend ostream& operator<<(ostream& s, IdealGasMix& mix) {
|
||||
// string r = report(mix, true);
|
||||
// s << r;
|
||||
// return s;
|
||||
|
||||
protected:
|
||||
bool m_ok;
|
||||
XML_Node* m_r;
|
||||
|
||||
private:
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue