diff --git a/include/cantera/base/ct_defs.h b/include/cantera/base/ct_defs.h index a146184bb..5a4cc8bab 100644 --- a/include/cantera/base/ct_defs.h +++ b/include/cantera/base/ct_defs.h @@ -179,24 +179,10 @@ typedef std::map compositionMap; //! Vector of doubles. typedef std::vector vector_fp; //! Vector of ints -typedef std::vector array_int; -//! Vector of ints typedef std::vector vector_int; -//! typedef for a group of species. -/*! - * A group of species is a subset of the species in a phase. - */ -typedef std::vector group_t; -//! typedef for a vector of groups of species. -/*! - * A grouplist of species is a vector of groups. - */ -typedef std::vector grouplist_t; -//! Typedef for a pointer to temporary work storage -typedef doublereal* workPtr; -//! typedef for a pointer to temporary work storage which is treated as constant -typedef const doublereal* const_workPtr; +//! A grouplist is a vector of groups of species +typedef std::vector > grouplist_t; //! index returned by functions to indicate "no position" const size_t npos = static_cast(-1); @@ -204,6 +190,3 @@ const size_t npos = static_cast(-1); } // namespace #endif - - - diff --git a/include/cantera/base/xml.h b/include/cantera/base/xml.h index 7d19d985d..e20bfa373 100644 --- a/include/cantera/base/xml.h +++ b/include/cantera/base/xml.h @@ -151,11 +151,6 @@ public: class XML_Node { public: - - //! Value_type for the lookup multimap m_childindex. This is a convenience definition - //! for manipulating the multimap - typedef std::pair CIPair; - //! Default constructor for XML_Node, representing a tree structure /*! * Constructor for an XML_Node, which is a node in a tree-like structure @@ -791,7 +786,6 @@ protected: * m_childindex[node.name()] = XML_Node *pointer * * This object helps to speed up searches. - * The value_type for this multimap is CIPair. */ std::multimap m_childindex; diff --git a/include/cantera/equil/MultiPhase.h b/include/cantera/equil/MultiPhase.h index 7335ec95e..174cc316b 100644 --- a/include/cantera/equil/MultiPhase.h +++ b/include/cantera/equil/MultiPhase.h @@ -61,18 +61,8 @@ class MultiPhase { public: - //! Shorthand for an index variable that can't be negative - typedef size_t index_t; - - //! Shorthand for a ThermoPhase - typedef ThermoPhase phase_t; - - //! shorthand for a 2D matrix - typedef DenseMatrix array_t; - - //! Shorthand for a vector of pointers to ThermoPhase's - typedef std::vector phase_list; + typedef size_t index_t; //! Constructor. /*! @@ -108,7 +98,7 @@ public: * @param phases Vector of pointers to phases * @param phaseMoles Vector of mole numbers in each phase (kmol) */ - void addPhases(phase_list& phases, const vector_fp& phaseMoles); + void addPhases(std::vector& phases, const vector_fp& phaseMoles); //! Add all phases present in 'mix' to this mixture. /*! @@ -125,7 +115,7 @@ public: * @param p pointer to the phase object * @param moles total number of moles of all species in this phase */ - void addPhase(phase_t* p, doublereal moles); + void addPhase(ThermoPhase* p, doublereal moles); /// Number of elements. size_t nElements() const { @@ -238,7 +228,7 @@ public: * * @return Reference to the %ThermoPhase object for the phase */ - phase_t& phase(index_t n); + ThermoPhase& phase(index_t n); //! Check that the specified phase index is in range //! Throws an exception if m is greater than nPhases() @@ -624,7 +614,7 @@ private: /** * Vector of the ThermoPhase Pointers. */ - std::vector m_phase; + std::vector m_phase; //! Global Stoichiometric Coefficient array /*! @@ -633,7 +623,7 @@ private: * global species index. * The value is the number of atoms of type m in species k. */ - array_t m_atoms; + DenseMatrix m_atoms; /** * Locally stored vector of mole fractions of all species diff --git a/include/cantera/equil/MultiPhaseEquil.h b/include/cantera/equil/MultiPhaseEquil.h index f1a6982ff..a95665588 100644 --- a/include/cantera/equil/MultiPhaseEquil.h +++ b/include/cantera/equil/MultiPhaseEquil.h @@ -33,12 +33,9 @@ class MultiPhaseEquil { public: - - typedef MultiPhase mix_t; typedef size_t index_t; - typedef DenseMatrix matrix_t; - MultiPhaseEquil(mix_t* mix, bool start=true, int loglevel = 0); + MultiPhaseEquil(MultiPhase* mix, bool start=true, int loglevel = 0); virtual ~MultiPhaseEquil() {} @@ -130,10 +127,10 @@ protected: index_t m_nel, m_nsp; index_t m_eloc; int m_iter; - mix_t* m_mix; + MultiPhase* m_mix; doublereal m_press, m_temp; std::vector m_order; - matrix_t m_N, m_A; + DenseMatrix m_N, m_A; vector_fp m_work, m_work2, m_work3; vector_fp m_moles, m_lastmoles, m_dxi; vector_fp m_deltaG_RT, m_mu; diff --git a/include/cantera/equil/vcs_MultiPhaseEquil.h b/include/cantera/equil/vcs_MultiPhaseEquil.h index d0ea7dcf7..fac1c1d58 100644 --- a/include/cantera/equil/vcs_MultiPhaseEquil.h +++ b/include/cantera/equil/vcs_MultiPhaseEquil.h @@ -270,17 +270,9 @@ int vcs_Cantera_update_vprob(Cantera::MultiPhase* mphase, class vcs_MultiPhaseEquil { public: - - //! Shorthand for the MultiPhase mixture object used by Cantera - //! to store information about multiple phases - typedef Cantera::MultiPhase mix_t; - //! Typedef for an index variable typedef size_t index_t; - //! Typedef for a dense 2d matrix. - typedef Cantera::DenseMatrix matrix_t; - //! Default empty constructor vcs_MultiPhaseEquil(); @@ -306,7 +298,7 @@ public: * - 5 Print more than a table for each iteration * */ - vcs_MultiPhaseEquil(mix_t* mix, int printLvl); + vcs_MultiPhaseEquil(Cantera::MultiPhase* mix, int printLvl); //! Destructor for the class virtual ~vcs_MultiPhaseEquil(); @@ -636,7 +628,7 @@ protected: /*! * Equilibrium solutions will be returned via this variable. */ - mix_t* m_mix; + Cantera::MultiPhase* m_mix; //! Print level from the VCSnonlinear package /*! @@ -657,10 +649,7 @@ protected: int m_printLvl; //! Stoichiometric matrix - /*! - * - */ - matrix_t m_N; + Cantera::DenseMatrix m_N; //! Iteration Count int m_iter; diff --git a/include/cantera/kinetics/FalloffFactory.h b/include/cantera/kinetics/FalloffFactory.h index c2d0924eb..bbb288014 100644 --- a/include/cantera/kinetics/FalloffFactory.h +++ b/include/cantera/kinetics/FalloffFactory.h @@ -63,7 +63,7 @@ public: * @param T Temperature [K]. * @param work storage space for intermediate results. */ - virtual void updateTemp(doublereal T, workPtr work) const {} + virtual void updateTemp(doublereal T, doublereal* work) const {} /** * The falloff function. This is defined so that the @@ -84,7 +84,7 @@ public: * * @return Returns the value of the falloff function \f$ F \f$ defined above */ - virtual doublereal F(doublereal pr, const_workPtr work) const =0; + virtual doublereal F(doublereal pr, const doublereal* work) const =0; /** * The size of the work array required. diff --git a/include/cantera/kinetics/FalloffMgr.h b/include/cantera/kinetics/FalloffMgr.h index 5804beea8..4dba3a54f 100644 --- a/include/cantera/kinetics/FalloffMgr.h +++ b/include/cantera/kinetics/FalloffMgr.h @@ -86,7 +86,7 @@ public: * @param t Temperature [K]. * @param work Work array. Must be dimensioned at least workSize(). */ - void updateTemp(doublereal t, workPtr work) { + void updateTemp(doublereal t, doublereal* work) { int i; for (i = 0; i < m_n; i++) { m_falloff[i]->updateTemp(t, @@ -98,7 +98,7 @@ public: * Given a vector of reduced pressures for each falloff reaction, * replace each entry by the value of the falloff function. */ - void pr_to_falloff(doublereal* values, const_workPtr work) { + void pr_to_falloff(doublereal* values, const doublereal* work) { doublereal pr; int i; for (i = 0; i < m_n0; i++) { diff --git a/include/cantera/kinetics/Kinetics.h b/include/cantera/kinetics/Kinetics.h index 9798dca8a..e6b93274d 100644 --- a/include/cantera/kinetics/Kinetics.h +++ b/include/cantera/kinetics/Kinetics.h @@ -132,10 +132,6 @@ class Kinetics { public: - - //! typedef for ThermoPhase - typedef ThermoPhase thermo_t; - /** * @name Constructors and General Information about Mechanism */ @@ -1104,11 +1100,6 @@ private: }; -//! typedef for the kinetics base class -typedef Kinetics kinetics_t; - } - - #endif diff --git a/include/cantera/kinetics/ReactionPath.h b/include/cantera/kinetics/ReactionPath.h index 4ca5dd38a..01612714f 100644 --- a/include/cantera/kinetics/ReactionPath.h +++ b/include/cantera/kinetics/ReactionPath.h @@ -31,9 +31,6 @@ class Path; class SpeciesNode { public: - - typedef std::vector path_list; - /// Default constructor SpeciesNode() : number(npos), name(""), value(0.0), visible(false), m_in(0.0), m_out(0.0) {} @@ -89,7 +86,7 @@ public: protected: doublereal m_in; doublereal m_out; - path_list m_paths; + std::vector m_paths; }; diff --git a/include/cantera/kinetics/ThirdBodyMgr.h b/include/cantera/kinetics/ThirdBodyMgr.h index abd43ecad..bd8c57dd5 100644 --- a/include/cantera/kinetics/ThirdBodyMgr.h +++ b/include/cantera/kinetics/ThirdBodyMgr.h @@ -34,7 +34,7 @@ public: enhanced, dflt)); } - void update(const vector_fp& conc, doublereal ctot, workPtr work) { + void update(const vector_fp& conc, doublereal ctot, doublereal* work) { typename std::vector<_E>::const_iterator b = m_concm.begin(); //doublereal* v = m_values.begin(); for (; b != m_concm.end(); ++b, ++work) { @@ -42,7 +42,7 @@ public: } } - void multiply(doublereal* output, const_workPtr work) { + void multiply(doublereal* output, const doublereal* work) { scatter_mult(work, work + m_n, output, m_reaction_index.begin()); } diff --git a/include/cantera/kinetics/importKinetics.h b/include/cantera/kinetics/importKinetics.h index 509fb0dee..740e15ba6 100644 --- a/include/cantera/kinetics/importKinetics.h +++ b/include/cantera/kinetics/importKinetics.h @@ -92,7 +92,7 @@ void checkRxnElementBalance(Kinetics& kin, * allowing the calling routine to skip this reaction * and continue. */ -bool getReagents(const XML_Node& rxn, kinetics_t& kin, int rp, +bool getReagents(const XML_Node& rxn, Kinetics& kin, int rp, std::string default_phase, std::vector& spnum, vector_fp& stoich, vector_fp& order, int rule); @@ -113,7 +113,7 @@ bool getReagents(const XML_Node& rxn, kinetics_t& kin, int rp, * * @ingroup kineticsmgr */ -void getRateCoefficient(const XML_Node& kf, kinetics_t& kin, +void getRateCoefficient(const XML_Node& kf, Kinetics& kin, ReactionData& rdata, int negA); diff --git a/include/cantera/numerics/ctlapack.h b/include/cantera/numerics/ctlapack.h index d5c3367e8..e21a0c516 100644 --- a/include/cantera/numerics/ctlapack.h +++ b/include/cantera/numerics/ctlapack.h @@ -13,12 +13,6 @@ #include "cantera/base/ct_defs.h" -typedef double doublereal; -typedef int integer; -typedef int ftnlen; - -//#include - // map BLAS names to names with or without a trailing underscore. #ifndef LAPACK_FTN_TRAILING_UNDERSCORE diff --git a/include/cantera/oneD/StFlow.h b/include/cantera/oneD/StFlow.h index cd9e95867..7014fb640 100644 --- a/include/cantera/oneD/StFlow.h +++ b/include/cantera/oneD/StFlow.h @@ -18,12 +18,8 @@ namespace Cantera { - -typedef IdealGasPhase igthermo_t; - class MultiJac; - //------------------------------------------ // constants //------------------------------------------ @@ -40,8 +36,6 @@ const int c_Mixav_Transport = 0; const int c_Multi_Transport = 1; const int c_Soret = 2; - - //----------------------------------------------------------- // Class StFlow //----------------------------------------------------------- @@ -66,7 +60,7 @@ public: /// will be used to evaluate all thermodynamic, kinetic, and transport /// properties. /// @param nsp Number of species. - StFlow(igthermo_t* ph = 0, size_t nsp = 1, size_t points = 1); + StFlow(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1); /// Destructor. virtual ~StFlow() {} @@ -81,7 +75,7 @@ public: thermo_t& phase() { return *m_thermo; } - kinetics_t& kinetics() { + Kinetics& kinetics() { return *m_kin; } @@ -92,12 +86,12 @@ public: * Set the thermo manager. Note that the flow equations assume * the ideal gas equation. */ - void setThermo(igthermo_t& th) { + void setThermo(IdealGasPhase& th) { m_thermo = &th; } /// Set the kinetics manager. The kinetics manager must - void setKinetics(kinetics_t& kin) { + void setKinetics(Kinetics& kin) { m_kin = &kin; } @@ -474,11 +468,11 @@ protected: size_t m_nsp; - igthermo_t* m_thermo; - kinetics_t* m_kin; - Transport* m_trans; + IdealGasPhase* m_thermo; + Kinetics* m_kin; + Transport* m_trans; - MultiJac* m_jac; + MultiJac* m_jac; bool m_ok; @@ -514,7 +508,7 @@ private: class AxiStagnFlow : public StFlow { public: - AxiStagnFlow(igthermo_t* ph = 0, size_t nsp = 1, size_t points = 1) : + AxiStagnFlow(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1) : StFlow(ph, nsp, points) { m_dovisc = true; } @@ -532,7 +526,7 @@ public: class FreeFlame : public StFlow { public: - FreeFlame(igthermo_t* ph = 0, size_t nsp = 1, size_t points = 1) : + FreeFlame(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1) : StFlow(ph, nsp, points) { m_dovisc = false; setID("flame"); @@ -568,8 +562,8 @@ private: }; */ -void importSolution(size_t points, doublereal* oldSoln, igthermo_t& oldmech, - size_t size_new, doublereal* newSoln, igthermo_t& newmech); +void importSolution(size_t points, doublereal* oldSoln, IdealGasPhase& oldmech, + size_t size_new, doublereal* newSoln, IdealGasPhase& newmech); } diff --git a/include/cantera/thermo/Crystal.h b/include/cantera/thermo/Crystal.h index 7b51dfafe..502415d11 100644 --- a/include/cantera/thermo/Crystal.h +++ b/include/cantera/thermo/Crystal.h @@ -15,11 +15,7 @@ namespace Cantera class Crystal : public MultiPhase { - public: - typedef LatticePhase lattice_t; - typedef vector lattice_list; - /// Constructor. The constructor takes no arguments, since /// phases are added using method addPhase. Crystal() : MultiPhase() {} @@ -29,21 +25,21 @@ public: /// phase objects. virtual ~Crystal() {} - void addLattices(lattice_list& lattices, + void addLattices(std::vector& lattices, const vector_fp& latticeSiteDensity); /// Add a phase to the mixture. /// @param p pointer to the phase object /// @param moles total number of moles of all species in this phase - void addLattice(lattice_t* lattice, doublereal siteDensity) { + void addLattice(LatticePhase* lattice, doublereal siteDensity) { MultiPhase::addPhase(lattice, siteDensity); } /// Return a reference to phase n. The state of phase n is /// also updated to match the state stored locally in the /// mixture object. - lattice_t& lattice(index_t n) { - return *(lattice_t*)&phase(n); + LatticePhase& lattice(index_t n) { + return *(LatticePhase*)&phase(n); } protected: diff --git a/include/cantera/thermo/HMWSoln.h b/include/cantera/thermo/HMWSoln.h index 98f5a8228..7caa4a494 100644 --- a/include/cantera/thermo/HMWSoln.h +++ b/include/cantera/thermo/HMWSoln.h @@ -3005,7 +3005,7 @@ private: * n = m_kk*i + j * m_CounterIJ[n] = counterIJ */ - mutable array_int m_CounterIJ; + mutable vector_int m_CounterIJ; /** * This is elambda, MEC diff --git a/include/cantera/thermo/Phase.h b/include/cantera/thermo/Phase.h index 4db630c1f..43ca90dc0 100644 --- a/include/cantera/thermo/Phase.h +++ b/include/cantera/thermo/Phase.h @@ -787,8 +787,6 @@ private: }; -//! typedef for the base Phase class -typedef Phase phase_t; } #endif diff --git a/include/cantera/thermo/ThermoPhase.h b/include/cantera/thermo/ThermoPhase.h index 2e199e8c0..5005177fc 100644 --- a/include/cantera/thermo/ThermoPhase.h +++ b/include/cantera/thermo/ThermoPhase.h @@ -1666,9 +1666,6 @@ private: }; -//! typedef for the ThermoPhase class -typedef ThermoPhase thermophase_t; - //! typedef for the ThermoPhase class typedef ThermoPhase thermo_t; @@ -1683,7 +1680,6 @@ typedef ThermoPhase thermo_t; */ DEPRECATED(std::string report(const ThermoPhase& th, const bool show_thermo = true)); - } #endif diff --git a/include/cantera/thermo/WaterPropsIAPWS.h b/include/cantera/thermo/WaterPropsIAPWS.h index cfca2056f..292fe1c23 100644 --- a/include/cantera/thermo/WaterPropsIAPWS.h +++ b/include/cantera/thermo/WaterPropsIAPWS.h @@ -15,8 +15,6 @@ #include "WaterPropsIAPWSphi.h" #include "cantera/base/config.h" -typedef double doublereal; - namespace Cantera { /** diff --git a/include/cantera/thermo/WaterPropsIAPWSphi.h b/include/cantera/thermo/WaterPropsIAPWSphi.h index 782b57465..7b5a18104 100644 --- a/include/cantera/thermo/WaterPropsIAPWSphi.h +++ b/include/cantera/thermo/WaterPropsIAPWSphi.h @@ -15,8 +15,6 @@ #include "cantera/base/config.h" -typedef double doublereal; - /*! * the WaterPropsIAPSWSphi class support low level calls for * the real description of water. diff --git a/include/cantera/transport/LiquidTransport.h b/include/cantera/transport/LiquidTransport.h index 0f531be51..6743f2d9b 100644 --- a/include/cantera/transport/LiquidTransport.h +++ b/include/cantera/transport/LiquidTransport.h @@ -90,11 +90,6 @@ class LiquidTransportParams; class LiquidTransport : public Transport { public: - - //! Typedef equating vector_fp with Coeff_T_ - typedef vector_fp Coeff_T_; - - //! Default constructor. /*! * This requires call to initLiquid(LiquidTransportParams& tr) diff --git a/include/cantera/transport/TransportBase.h b/include/cantera/transport/TransportBase.h index 45b35ded9..151a2a593 100644 --- a/include/cantera/transport/TransportBase.h +++ b/include/cantera/transport/TransportBase.h @@ -882,12 +882,6 @@ private: }; -//! General definition for the transport class -/*! - * \ingroup tranprops - */ -typedef Transport transport_t; - } #endif diff --git a/include/cantera/zeroD/ReactorBase.h b/include/cantera/zeroD/ReactorBase.h index 3cd0df488..f9b2130e5 100644 --- a/include/cantera/zeroD/ReactorBase.h +++ b/include/cantera/zeroD/ReactorBase.h @@ -11,9 +11,6 @@ /// Namespace for classes implementing zero-dimensional reactor networks. namespace Cantera { - -// typedef Thermo thermo_t; - class FlowDevice; class Wall; diff --git a/samples/cxx/bvp/stagnation.cpp b/samples/cxx/bvp/stagnation.cpp index 8eeee51e8..fe194950c 100644 --- a/samples/cxx/bvp/stagnation.cpp +++ b/samples/cxx/bvp/stagnation.cpp @@ -21,7 +21,7 @@ static void st_drawline() "------------------------------------------"); } -AxiStagnBVP::AxiStagnBVP(igthermo_t* ph, int nsp, int points) : +AxiStagnBVP::AxiStagnBVP(IdealGasPhase* ph, int nsp, int points) : Domain1D(nsp+4, points), m_inlet_u(0.0), m_inlet_V(0.0), diff --git a/src/converters/ckr_defs.h b/src/converters/ckr_defs.h index 0615076d2..042234407 100644 --- a/src/converters/ckr_defs.h +++ b/src/converters/ckr_defs.h @@ -21,7 +21,6 @@ namespace ckr typedef std::vector vector_fp; typedef std::vector vector_int; -//typedef vector vector_fp; // exceptions class CK_Exception diff --git a/src/equil/MultiPhase.cpp b/src/equil/MultiPhase.cpp index a0feadebf..ff7ca2f0b 100644 --- a/src/equil/MultiPhase.cpp +++ b/src/equil/MultiPhase.cpp @@ -100,7 +100,7 @@ addPhases(MultiPhase& mix) } //==================================================================================================================== void MultiPhase:: -addPhases(phase_list& phases, const vector_fp& phaseMoles) +addPhases(std::vector& phases, const vector_fp& phaseMoles) { index_t np = phases.size(); index_t n; @@ -111,7 +111,7 @@ addPhases(phase_list& phases, const vector_fp& phaseMoles) } //==================================================================================================================== void MultiPhase:: -addPhase(phase_t* p, doublereal moles) +addPhase(ThermoPhase* p, doublereal moles) { if (m_init) { throw CanteraError("addPhase", @@ -212,7 +212,7 @@ void MultiPhase::init() k = 0; // iterate over the phases for (ip = 0; ip < m_np; ip++) { - phase_t* p = m_phase[ip]; + ThermoPhase* p = m_phase[ip]; nsp = p->nSpecies(); mlocal = p->elementIndex(sym); for (kp = 0; kp < nsp; kp++) { @@ -257,7 +257,7 @@ void MultiPhase::init() // Return a reference to phase n. The state of phase n is // also updated to match the state stored locally in the // mixture object. -MultiPhase::phase_t& MultiPhase::phase(index_t n) +ThermoPhase& MultiPhase::phase(index_t n) { if (!m_init) { init(); @@ -503,7 +503,7 @@ void MultiPhase::setPhaseMoleFractions(const index_t n, const doublereal* const if (!m_init) { init(); } - phase_t* p = m_phase[n]; + ThermoPhase* p = m_phase[n]; p->setState_TPX(m_temp, m_press, x); size_t istart = m_spstart[n]; for (size_t k = 0; k < p->nSpecies(); k++) { @@ -559,7 +559,7 @@ void MultiPhase::getMoles(doublereal* molNum) const doublereal* dtmp = molNum; for (index_t ip = 0; ip < m_np; ip++) { doublereal phasemoles = m_moles[ip]; - phase_t* p = m_phase[ip]; + ThermoPhase* p = m_phase[ip]; index_t nsp = p->nSpecies(); for (ik = 0; ik < nsp; ik++) { *(dtmp++) *= phasemoles; @@ -579,7 +579,7 @@ void MultiPhase::setMoles(const doublereal* n) index_t ik, k = 0, nsp; doublereal phasemoles; for (ip = 0; ip < m_np; ip++) { - phase_t* p = m_phase[ip]; + ThermoPhase* p = m_phase[ip]; nsp = p->nSpecies(); phasemoles = 0.0; for (ik = 0; ik < nsp; ik++) { @@ -650,7 +650,7 @@ void MultiPhase::calcElemAbundances() const m_elemAbundances[eGlobal] = 0.0; } for (index_t ip = 0; ip < m_np; ip++) { - phase_t* p = m_phase[ip]; + ThermoPhase* p = m_phase[ip]; size_t nspPhase = p->nSpecies(); doublereal phasemoles = m_moles[ip]; for (ik = 0; ik < nspPhase; ik++) { @@ -1088,7 +1088,7 @@ void MultiPhase::getMoleFractions(doublereal* const x) const //==================================================================================================================== std::string MultiPhase::phaseName(const index_t iph) const { - const phase_t* tptr = m_phase[iph]; + const ThermoPhase* tptr = m_phase[iph]; return tptr->id(); } //==================================================================================================================== @@ -1096,7 +1096,7 @@ int MultiPhase::phaseIndex(const std::string& pName) const { std::string tmp; for (int iph = 0; iph < (int) m_np; iph++) { - const phase_t* tptr = m_phase[iph]; + const ThermoPhase* tptr = m_phase[iph]; tmp = tptr->id(); if (tmp == pName) { return iph; @@ -1142,7 +1142,7 @@ void MultiPhase::uploadMoleFractionsFromPhases() { index_t ip, loc = 0; for (ip = 0; ip < m_np; ip++) { - phase_t* p = m_phase[ip]; + ThermoPhase* p = m_phase[ip]; p->getMoleFractions(DATA_PTR(m_moleFractions) + loc); loc += p->nSpecies(); } diff --git a/src/equil/MultiPhaseEquil.cpp b/src/equil/MultiPhaseEquil.cpp index 84ca9ee10..db9140d48 100644 --- a/src/equil/MultiPhaseEquil.cpp +++ b/src/equil/MultiPhaseEquil.cpp @@ -52,7 +52,7 @@ static string coeffString(bool first, doublereal nu, string sym) /// @param start If true, the initial composition will be /// determined by a linear Gibbs minimization, otherwise the /// initial mixture composition will be used. -MultiPhaseEquil::MultiPhaseEquil(mix_t* mix, bool start, int loglevel) : m_mix(mix) +MultiPhaseEquil::MultiPhaseEquil(MultiPhase* mix, bool start, int loglevel) : m_mix(mix) { // the multi-phase mixture // m_mix = mix; @@ -813,7 +813,7 @@ doublereal MultiPhaseEquil::computeReactionSteps(vector_fp& dxi) // sum over solution phases doublereal sum = 0.0, psum; for (ip = 0; ip < m_np; ip++) { - phase_t& p = m_mix->phase(ip); + ThermoPhase& p = m_mix->phase(ip); if (p.nSpecies() > 1) { psum = 0.0; for (k = 0; k < m_nsp; k++) { diff --git a/src/equil/vcs_MultiPhaseEquil.cpp b/src/equil/vcs_MultiPhaseEquil.cpp index 9c38e9344..6b2b91214 100644 --- a/src/equil/vcs_MultiPhaseEquil.cpp +++ b/src/equil/vcs_MultiPhaseEquil.cpp @@ -50,7 +50,7 @@ vcs_MultiPhaseEquil::vcs_MultiPhaseEquil() : { } //==================================================================================================================== -vcs_MultiPhaseEquil::vcs_MultiPhaseEquil(mix_t* mix, int printLvl) : +vcs_MultiPhaseEquil::vcs_MultiPhaseEquil(Cantera::MultiPhase* mix, int printLvl) : m_vprob(0), m_mix(0), m_printLvl(printLvl), diff --git a/src/fortran/fct.cpp b/src/fortran/fct.cpp index 339e201e7..5a26856c4 100644 --- a/src/fortran/fct.cpp +++ b/src/fortran/fct.cpp @@ -1054,7 +1054,7 @@ extern "C" { } thermo_t* t = _fth(ith); - kinetics_t* k = _fkin(ikin); + Kinetics* k = _fkin(ikin); Kinetics& kin = *k; XML_Node* x, *r=0; diff --git a/src/kinetics/FalloffFactory.cpp b/src/kinetics/FalloffFactory.cpp index f57bab779..e2be6510d 100644 --- a/src/kinetics/FalloffFactory.cpp +++ b/src/kinetics/FalloffFactory.cpp @@ -109,7 +109,7 @@ public: * the temperature dependent part of the * parameterization. */ - virtual void updateTemp(doublereal T, workPtr work) const { + virtual void updateTemp(doublereal T, doublereal* work) const { doublereal Fcent = (1.0 - m_a) * exp(- T * m_rt3) + m_a * exp(- T * m_rt1); *work = log10(std::max(Fcent, SmallNumber)); @@ -120,7 +120,7 @@ public: * @param pr Value of the reduced pressure for this reaction * @param work Pointer to the previously saved work space */ - virtual doublereal F(doublereal pr, const_workPtr work) const { + virtual doublereal F(doublereal pr, const doublereal* work) const { doublereal lpr,f1,lgf, cc, nn; lpr = log10(std::max(pr,SmallNumber)); cc = -0.4 - 0.67 * (*work); @@ -252,7 +252,7 @@ public: * the temperature dependent part of the * parameterization. */ - virtual void updateTemp(doublereal T, workPtr work) const { + virtual void updateTemp(doublereal T, doublereal* work) const { doublereal Fcent = (1.0 - m_a) * exp(- T * m_rt3) + m_a * exp(- T * m_rt1) + exp(- m_t2 / T); @@ -264,7 +264,7 @@ public: * @param pr Value of the reduced pressure for this reaction * @param work Pointer to the previously saved work space */ - virtual doublereal F(doublereal pr, const_workPtr work) const { + virtual doublereal F(doublereal pr, const doublereal* work) const { doublereal lpr,f1,lgf, cc, nn; lpr = log10(std::max(pr,SmallNumber)); cc = -0.4 - 0.67 * (*work); @@ -364,7 +364,7 @@ public: * the temperature dependent part of the * parameterization. */ - virtual void updateTemp(doublereal T, workPtr work) const { + virtual void updateTemp(doublereal T, doublereal* work) const { *work = m_a * exp(- m_b / T); if (m_c != 0.0) { *work += exp(- T/m_c); @@ -376,7 +376,7 @@ public: * @param pr Value of the reduced pressure for this reaction * @param work Pointer to the previously saved work space */ - virtual doublereal F(doublereal pr, const_workPtr work) const { + virtual doublereal F(doublereal pr, const doublereal* work) const { doublereal lpr = log10(std::max(pr,SmallNumber)); doublereal xx = 1.0/(1.0 + lpr*lpr); doublereal ff = pow(*work , xx); @@ -475,7 +475,7 @@ public: * the temperature dependent part of the * parameterization. */ - virtual void updateTemp(doublereal T, workPtr work) const { + virtual void updateTemp(doublereal T, doublereal* work) const { *work = m_a * exp(- m_b / T); if (m_c != 0.0) { *work += exp(- T/m_c); @@ -488,7 +488,7 @@ public: * @param pr Value of the reduced pressure for this reaction * @param work Pointer to the previously saved work space */ - virtual doublereal F(doublereal pr, const_workPtr work) const { + virtual doublereal F(doublereal pr, const doublereal* work) const { doublereal lpr = log10(std::max(pr,SmallNumber)); doublereal xx = 1.0/(1.0 + lpr*lpr); return pow(*work, xx) * work[1]; @@ -616,7 +616,7 @@ public: * the temperature dependent part of the * parameterization. */ - virtual void updateTemp(doublereal T, workPtr work) const { + virtual void updateTemp(doublereal T, doublereal* work) const { work[0] = m_alpha0 + (m_alpha1 + m_alpha2*T)*T; // alpha work[1] = m_sigma0 + (m_sigma1 + m_sigma2*T)*T; // sigma doublereal Fcent = (1.0 - m_a) * exp(- T * m_rt3) @@ -629,7 +629,7 @@ public: * @param pr Value of the reduced pressure for this reaction * @param work Pointer to the previously saved work space */ - virtual doublereal F(doublereal pr, const_workPtr work) const { + virtual doublereal F(doublereal pr, const doublereal* work) const { doublereal lpr = log10(std::max(pr, SmallNumber)); doublereal x = (lpr - work[0])/work[1]; doublereal flog = work[2]/exp(x*x); diff --git a/src/kinetics/ReactionPath.cpp b/src/kinetics/ReactionPath.cpp index 89fe3bba1..e6a2ec9d9 100644 --- a/src/kinetics/ReactionPath.cpp +++ b/src/kinetics/ReactionPath.cpp @@ -705,7 +705,7 @@ void ReactionPathBuilder::findElements(Kinetics& kin) size_t k = 0; // iterate over the phases for (size_t ip = 0; ip < np; ip++) { - phase_t* p = &kin.thermo(ip); + ThermoPhase* p = &kin.thermo(ip); size_t nsp = p->nSpecies(); size_t mlocal = p->elementIndex(sym); for (size_t kp = 0; kp < nsp; kp++) { diff --git a/src/kinetics/importKinetics.cpp b/src/kinetics/importKinetics.cpp index ec95e3cc4..dff5369b1 100644 --- a/src/kinetics/importKinetics.cpp +++ b/src/kinetics/importKinetics.cpp @@ -177,7 +177,7 @@ void checkRxnElementBalance(Kinetics& kin, * allowing the calling routine to skip this reaction * and continue. */ -bool getReagents(const XML_Node& rxn, kinetics_t& kin, int rp, +bool getReagents(const XML_Node& rxn, Kinetics& kin, int rp, std::string default_phase, std::vector& spnum, vector_fp& stoich, vector_fp& order, int rule) { @@ -489,7 +489,7 @@ static void getFalloff(const node_t& f, ReactionData& rdata) * reaction mechanism is homogeneous, so that all species belong * to phase(0) of 'kin'. */ -static void getEfficiencies(const node_t& eff, kinetics_t& kin, ReactionData& rdata) +static void getEfficiencies(const node_t& eff, Kinetics& kin, ReactionData& rdata) { // set the default collision efficiency @@ -514,7 +514,7 @@ static void getEfficiencies(const node_t& eff, kinetics_t& kin, ReactionData& rd * * @param kf Reference to the XML Node named rateCoeff */ -void getRateCoefficient(const node_t& kf, kinetics_t& kin, +void getRateCoefficient(const node_t& kf, Kinetics& kin, ReactionData& rdata, int negA) { string type = kf.attrib("type"); diff --git a/src/oneD/StFlow.cpp b/src/oneD/StFlow.cpp index e35bdebad..c8ddc2e89 100644 --- a/src/oneD/StFlow.cpp +++ b/src/oneD/StFlow.cpp @@ -28,8 +28,8 @@ namespace Cantera * with the same number of grid points as in the old solution. */ void importSolution(size_t points, - doublereal* oldSoln, igthermo_t& oldmech, - size_t size_new, doublereal* newSoln, igthermo_t& newmech) + doublereal* oldSoln, IdealGasPhase& oldmech, + size_t size_new, doublereal* newSoln, IdealGasPhase& newmech) { // Number of components in old and new solutions @@ -86,7 +86,7 @@ static void st_drawline() "------------------------------------------"); } -StFlow::StFlow(igthermo_t* ph, size_t nsp, size_t points) : +StFlow::StFlow(IdealGasPhase* ph, size_t nsp, size_t points) : Domain1D(nsp+4, points), m_inlet_u(0.0), m_inlet_V(0.0), diff --git a/src/zeroD/FlowDevice.cpp b/src/zeroD/FlowDevice.cpp index dbef937d9..74db950ca 100644 --- a/src/zeroD/FlowDevice.cpp +++ b/src/zeroD/FlowDevice.cpp @@ -20,8 +20,8 @@ bool FlowDevice::install(ReactorBase& in, ReactorBase& out) m_out->addInlet(*this); // construct adapters between inlet and outlet species - phase_t* mixin = &m_in->contents(); - phase_t* mixout = &m_out->contents(); + ThermoPhase* mixin = &m_in->contents(); + ThermoPhase* mixout = &m_out->contents(); if (mixin == 0 || mixout == 0) { return false; } diff --git a/src/zeroD/Reactor.cpp b/src/zeroD/Reactor.cpp index 17644534c..c76d2f029 100644 --- a/src/zeroD/Reactor.cpp +++ b/src/zeroD/Reactor.cpp @@ -127,8 +127,7 @@ size_t Reactor::nSensParams() void Reactor::updateState(doublereal* y) { - - phase_t& mix = *m_thermo; // define for readability + ThermoPhase& mix = *m_thermo; // define for readability // The components of y are the total internal energy, // the total volume, and the mass of each species.