From e8d20443023fdc5e07b25aaccb6533b5c1d55a38 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Wed, 6 Aug 2003 17:14:46 +0000 Subject: [PATCH] Added a get_CTML_Tree() function. It was missing though there was an entry in ctml.h and IdealGasMix.h used it. --- Cantera/src/ctml.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Cantera/src/ctml.cpp b/Cantera/src/ctml.cpp index 4d9014234..6e6f06f40 100755 --- a/Cantera/src/ctml.cpp +++ b/Cantera/src/ctml.cpp @@ -370,4 +370,17 @@ namespace ctml { type = node["type"]; } + void get_CTML_Tree(XML_Node* m_r, string infile) { + string path = findInputFile(infile); + ifstream fin(path.c_str()); + if (!fin) { + throw CanteraError("get_CTML_Tree","could not open " + +path+" for reading."); + } + if (!m_r) { + throw CanteraError("get_CTML_Tree", + " Need to malloc XML_Node first"); + } + m_r->build(fin); + } }