From 5d8430431fcfcb44909a242c5984c0f179b00df8 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Fri, 4 May 2007 15:48:43 +0000 Subject: [PATCH] minor cleanup --- Cantera/cxx/include/Interface.h | 1 + Cantera/cxx/include/Metal.h | 2 +- Cantera/cxx/include/importPhase.h | 2 +- Cantera/cxx/include/thermo.h | 1 + Cantera/src/FILES | 11 -- .../src/{ => kinetics}/ReactionStoichMgr.cpp | 1 - test_problems/surfkin/Interface.h | 108 ------------------ 7 files changed, 4 insertions(+), 122 deletions(-) delete mode 100755 Cantera/src/FILES rename Cantera/src/{ => kinetics}/ReactionStoichMgr.cpp (99%) delete mode 100644 test_problems/surfkin/Interface.h diff --git a/Cantera/cxx/include/Interface.h b/Cantera/cxx/include/Interface.h index 3a86ee15e..1490a7a67 100644 --- a/Cantera/cxx/include/Interface.h +++ b/Cantera/cxx/include/Interface.h @@ -3,6 +3,7 @@ #include +#include "thermo" #include "kernel/SurfPhase.h" #include "kernel/InterfaceKinetics.h" #include "kernel/importKinetics.h" diff --git a/Cantera/cxx/include/Metal.h b/Cantera/cxx/include/Metal.h index 331aa7a74..87b4533b6 100644 --- a/Cantera/cxx/include/Metal.h +++ b/Cantera/cxx/include/Metal.h @@ -4,7 +4,7 @@ #include #include "kernel/MetalPhase.h" -#include "kernel/importCTML.h" +#include "kernel/importKinetics.h" namespace Cantera { diff --git a/Cantera/cxx/include/importPhase.h b/Cantera/cxx/include/importPhase.h index 1cf0e74fa..89bc01b3c 100644 --- a/Cantera/cxx/include/importPhase.h +++ b/Cantera/cxx/include/importPhase.h @@ -4,7 +4,7 @@ #include #include "kernel/ThermoPhase.h" -#include "kernel/importCTML.h" +#include "kernel/ThermoFactory.h" namespace Cantera { diff --git a/Cantera/cxx/include/thermo.h b/Cantera/cxx/include/thermo.h index 874db54ac..d16ad4702 100755 --- a/Cantera/cxx/include/thermo.h +++ b/Cantera/cxx/include/thermo.h @@ -10,5 +10,6 @@ #define CT_THERMO_INCL #include "kernel/ThermoFactory.h" +#include "importPhase.h" #endif diff --git a/Cantera/src/FILES b/Cantera/src/FILES deleted file mode 100755 index 36db64c7f..000000000 --- a/Cantera/src/FILES +++ /dev/null @@ -1,11 +0,0 @@ -CMD='cvs remove' -$CMD BasisOptimize.cpp -$CMD ChemEquil.cpp -$CMD ChemEquil.h -$CMD MultiPhase.cpp -$CMD MultiPhase.h -$CMD MultiPhaseEquil.cpp -$CMD MultiPhaseEquil.h -$CMD PropertyCalculator.h -$CMD equil.h -$CMD equilibrate.cpp diff --git a/Cantera/src/ReactionStoichMgr.cpp b/Cantera/src/kinetics/ReactionStoichMgr.cpp similarity index 99% rename from Cantera/src/ReactionStoichMgr.cpp rename to Cantera/src/kinetics/ReactionStoichMgr.cpp index 83499d311..67f09f37a 100644 --- a/Cantera/src/ReactionStoichMgr.cpp +++ b/Cantera/src/kinetics/ReactionStoichMgr.cpp @@ -19,7 +19,6 @@ #include "ReactionStoichMgr.h" #include "StoichManager.h" #include "ctexceptions.h" -#include "diagnostics.h" #include "ReactionData.h" using namespace std; diff --git a/test_problems/surfkin/Interface.h b/test_problems/surfkin/Interface.h deleted file mode 100644 index c17153690..000000000 --- a/test_problems/surfkin/Interface.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * $Id$ - */ -#ifndef CXX_INTERFACE_H -#define CXX_INTERFACE_H - -#include -#ifdef SRCDIRTREE -#include "SurfPhase.h" -#include "InterfaceKinetics.h" -#include "importCTML.h" -#else -#include "kernel/SurfPhase.h" -#include "kernel/InterfaceKinetics.h" -#include "kernel/importCTML.h" -#endif - -namespace Cantera { - - /** - * The class interface inherits from both SurfPhase and - * InterferFaceKinetics - */ - class Interface : - public SurfPhase, public InterfaceKinetics - { - public: - /** - * - * Constructor for the interface class: - * - * infile = name of the file to get information about the - * surface. - * id = name of the surface phase. - * phases = Pointer to the list of volume phases that participate - * in the interface - * - */ - Interface(std::string infile, std::string id, std::vector phases) - : m_ok(false), m_r(0) { - std::string path = findInputFile(infile); - std::ifstream fin(path.c_str()); - if (!fin) { - throw CanteraError("Interface","could not open " - +path+" for reading."); - } - - - /* - * Create a top level xml node - */ - m_r = new XML_Node("-"); - /* - * Fill the XML_Node with all of the information in the - * xml file - */ - m_r->build(fin); - - - /* - * Find the start of the surface phase data in the xml file - * Store a pointer to the position in the tree. - */ - XML_Node* x = get_XML_Node("#" + id, m_r); - if (!x) { - throw CanteraError("Interface","error in find_XML"); - } - - /* - * Import the values of the surface into the current object. - * Note, since the current object inherits from SurfPhase - * object, it contains all of the surfphase fields of the - * object. This operation fills all of those fields. - */ - importPhase(*x, this); - - phases.push_back(this); - importKinetics(*x, phases, this); - m_ok = true; - } - - /** - * Destructor for the Interface class. This is a virtual function, meaning - * that after, it finishes with this class, it will call the destructor - * functions for the two classes that Interface inherits from. - */ - virtual ~Interface() { - /* - * We created the XML data tree structure for the Interface object - * in the constructor. Here, we delete the top level. of the structure. - * I believe this delete all of the daughter elements as well. - */ - delete m_r; - } - - bool operator!() { return !m_ok;} - bool ready() const { return m_ok; } - - protected: - bool m_ok; - XML_Node* m_r; - - private: - }; -} - - -#endif