diff --git a/include/cantera/Interface.h b/include/cantera/Interface.h index 60476a22a..b1d3a3117 100644 --- a/include/cantera/Interface.h +++ b/include/cantera/Interface.h @@ -12,11 +12,10 @@ namespace Cantera { //! An interface between multiple bulk phases. /*! - * This class is defined mostly for convenience. It inherits both from - * Cantera::SurfPhase and Cantera::InterfaceKinetics. It therefore - * represents a surface phase, and also acts as the kinetics - * manager to manage reactions occurring on the surface, possibly - * involving species from other phases. + * This class is defined mostly for convenience. It inherits both from SurfPhase + * and InterfaceKinetics. It therefore represents a surface phase, and also acts + * as the kinetics manager to manage reactions occurring on the surface, + * possibly involving species from other phases. */ class Interface : public SurfPhase, @@ -35,21 +34,21 @@ public: * surface phase */ Interface(const std::string& infile, std::string id, - std::vector otherPhases) : + std::vector otherPhases) : m_ok(false), m_r(0) { - m_r = Cantera::get_XML_File(infile); + m_r = get_XML_File(infile); if (id == "-") { id = ""; } - Cantera::XML_Node* x = Cantera::get_XML_Node("#"+id, m_r); + XML_Node* x = get_XML_Node("#"+id, m_r); if (!x) { - throw Cantera::CanteraError("Interface","error in get_XML_Node"); + throw CanteraError("Interface","error in get_XML_Node"); } - Cantera::importPhase(*x, this); + importPhase(*x, this); otherPhases.push_back(this); - Cantera::importKinetics(*x, otherPhases, this); + importKinetics(*x, otherPhases, this); m_ok = true; } @@ -58,8 +57,8 @@ public: * @param ii Interface object to be copied. */ Interface(const Interface& ii) : - Cantera::SurfPhase(ii), - Cantera::InterfaceKinetics(ii), + SurfPhase(ii), + InterfaceKinetics(ii), m_ok(ii.m_ok), m_r(ii.m_r) { } @@ -72,8 +71,8 @@ public: if (this == &right) { return *this; } - Cantera::SurfPhase::operator=(right); - Cantera::InterfaceKinetics::operator=(right); + SurfPhase::operator=(right); + InterfaceKinetics::operator=(right); m_ok = right.m_ok; m_r = right.m_r; return *this; @@ -98,7 +97,7 @@ protected: //! XML_Node pointer to the XML File object that contains the Surface and the Interfacial Reaction object //! description - Cantera::XML_Node* m_r; + XML_Node* m_r; }; //! Import an instance of class Interface from a specification in an input file. @@ -107,7 +106,7 @@ protected: */ inline Interface* importInterface(const std::string& infile, const std::string& id, - std::vector phases) + std::vector phases) { return new Interface(infile, id, phases); } diff --git a/include/cantera/base/ctexceptions.h b/include/cantera/base/ctexceptions.h index b64ce0453..fbb0194ae 100644 --- a/include/cantera/base/ctexceptions.h +++ b/include/cantera/base/ctexceptions.h @@ -267,7 +267,7 @@ void clear_FENV(); * @ingroup errorhandling */ #ifndef AssertTrace -# define AssertTrace(expr) ((expr) ? (void) 0 : throw Cantera::CanteraError(STR_TRACE, std::string("failed assert: ") + #expr)) +# define AssertTrace(expr) ((expr) ? (void) 0 : throw CanteraError(STR_TRACE, std::string("failed assert: ") + #expr)) #endif //! Assertion must be true or an error is thrown @@ -280,7 +280,7 @@ void clear_FENV(); * @ingroup errorhandling */ #ifndef AssertThrow -# define AssertThrow(expr, procedure) ((expr) ? (void) 0 : throw Cantera::CanteraError(procedure, std::string("failed assert: ") + #expr)) +# define AssertThrow(expr, procedure) ((expr) ? (void) 0 : throw CanteraError(procedure, std::string("failed assert: ") + #expr)) #endif //! Assertion must be true or an error is thrown @@ -298,7 +298,7 @@ void clear_FENV(); * @ingroup errorhandling */ #ifndef AssertThrowMsg -# define AssertThrowMsg(expr, procedure, message) ((expr) ? (void) 0 : throw Cantera::CanteraError(procedure + std::string(": at failed assert: \"") + std::string(#expr) + std::string("\""), message)) +# define AssertThrowMsg(expr, procedure, message) ((expr) ? (void) 0 : throw CanteraError(procedure + std::string(": at failed assert: \"") + std::string(#expr) + std::string("\""), message)) #endif #endif diff --git a/include/cantera/equil/MultiPhase.h b/include/cantera/equil/MultiPhase.h index 2e70b8458..408c4af63 100644 --- a/include/cantera/equil/MultiPhase.h +++ b/include/cantera/equil/MultiPhase.h @@ -709,7 +709,7 @@ private: * @param x Reference to a MultiPhase * @return returns a reference to the ostream */ -inline std::ostream& operator<<(std::ostream& s, Cantera::MultiPhase& x) +inline std::ostream& operator<<(std::ostream& s, MultiPhase& x) { size_t ip; for (ip = 0; ip < x.nPhases(); ip++) { diff --git a/include/cantera/kinetics/ExtraGlobalRxn.h b/include/cantera/kinetics/ExtraGlobalRxn.h index d737039b7..039d582c8 100644 --- a/include/cantera/kinetics/ExtraGlobalRxn.h +++ b/include/cantera/kinetics/ExtraGlobalRxn.h @@ -69,14 +69,14 @@ public: /*! * Kinetics object pointer */ - Cantera::Kinetics* m_kinetics; + Kinetics* m_kinetics; //! This kinetics operator is associated with multiple //! homogeneous and surface phases. /*! * This object owns the Kinetics object */ - Cantera::InterfaceKinetics* m_InterfaceKinetics; + InterfaceKinetics* m_InterfaceKinetics; int m_nKinSpecies; diff --git a/include/cantera/kinetics/RxnMolChange.h b/include/cantera/kinetics/RxnMolChange.h index 073823aa9..957c0f4e9 100644 --- a/include/cantera/kinetics/RxnMolChange.h +++ b/include/cantera/kinetics/RxnMolChange.h @@ -34,7 +34,7 @@ public: * @param kinPtr Pointer to the kinetics base class * @param irxn Specific reaction index. */ - RxnMolChange(Cantera::Kinetics* kinPtr, int irxn); + RxnMolChange(Kinetics* kinPtr, int irxn); //! Destructor ~RxnMolChange() {} @@ -44,7 +44,7 @@ public: * @param kinPtr Pointer to the kinetics base class * @param egr Specific reaction index. */ - RxnMolChange(Cantera::Kinetics* kinPtr, Cantera::ExtraGlobalRxn* egr); + RxnMolChange(Kinetics* kinPtr, ExtraGlobalRxn* egr); //! Vector of mole changes for each phase in the Kinetics object due to the current reaction /*! @@ -92,7 +92,7 @@ public: int m_nPhases; //! Shallow pointer pointing to the kinetics object - Cantera::Kinetics* m_kinBase; + Kinetics* m_kinBase; //! Reaction number within the kinetics object /*! @@ -111,7 +111,7 @@ public: /*! * This is 0, if the class refers to a single reaction in the kinetics object */ - Cantera::ExtraGlobalRxn* m_egr; + ExtraGlobalRxn* m_egr; }; } diff --git a/include/cantera/numerics/NonlinearSolver.h b/include/cantera/numerics/NonlinearSolver.h index b2a8551b4..307b09697 100644 --- a/include/cantera/numerics/NonlinearSolver.h +++ b/include/cantera/numerics/NonlinearSolver.h @@ -1127,10 +1127,10 @@ private: /*! * The Jacobian stored here is the raw matrix, before any row or column scaling is carried out */ - Cantera::GeneralMatrix* jacCopyPtr_; + GeneralMatrix* jacCopyPtr_; //! Hessian - Cantera::GeneralMatrix* HessianPtr_; + GeneralMatrix* HessianPtr_; /********************************************************************************************* * VARIABLES ASSOCIATED WITH STEPS AND ASSOCIATED DOUBLE DOGLEG PARAMETERS diff --git a/include/cantera/thermo/LatticeSolidPhase.h b/include/cantera/thermo/LatticeSolidPhase.h index 5283eed29..1c7d46714 100644 --- a/include/cantera/thermo/LatticeSolidPhase.h +++ b/include/cantera/thermo/LatticeSolidPhase.h @@ -593,7 +593,7 @@ public: * * @param phaseNode XML_Node for the current phase */ - virtual void installSlavePhases(Cantera::XML_Node* phaseNode); + virtual void installSlavePhases(XML_Node* phaseNode); //! Set equation of state parameter values from XML entries. /*! diff --git a/include/cantera/thermo/MixtureFugacityTP.h b/include/cantera/thermo/MixtureFugacityTP.h index ba1acc499..ec20c4eac 100644 --- a/include/cantera/thermo/MixtureFugacityTP.h +++ b/include/cantera/thermo/MixtureFugacityTP.h @@ -782,7 +782,7 @@ protected: //@} - class spinodalFunc : public Cantera::ResidEval + class spinodalFunc : public ResidEval { public: spinodalFunc(MixtureFugacityTP* tp); diff --git a/include/cantera/thermo/Nasa9PolyMultiTempRegion.h b/include/cantera/thermo/Nasa9PolyMultiTempRegion.h index 64ea1d1bf..a18c178ab 100644 --- a/include/cantera/thermo/Nasa9PolyMultiTempRegion.h +++ b/include/cantera/thermo/Nasa9PolyMultiTempRegion.h @@ -50,7 +50,7 @@ public: * Note, after the constructor, we will own the underlying * Nasa9Poly1 objects and be responsible for owning them. */ - Nasa9PolyMultiTempRegion(std::vector ®ionPts); + Nasa9PolyMultiTempRegion(std::vector ®ionPts); //! Copy constructor /*! diff --git a/include/cantera/thermo/ThermoPhase.h b/include/cantera/thermo/ThermoPhase.h index b3ee2a124..165bcaea4 100644 --- a/include/cantera/thermo/ThermoPhase.h +++ b/include/cantera/thermo/ThermoPhase.h @@ -1518,7 +1518,7 @@ public: * * @param phaseNode XML Element for the phase */ - virtual void installSlavePhases(Cantera::XML_Node* phaseNode); + virtual void installSlavePhases(XML_Node* phaseNode); //! Set the equation of state parameters /*! diff --git a/include/cantera/thermo/WaterProps.h b/include/cantera/thermo/WaterProps.h index f2277795d..1f90d1fbc 100644 --- a/include/cantera/thermo/WaterProps.h +++ b/include/cantera/thermo/WaterProps.h @@ -53,19 +53,18 @@ class PDSS_Water; * * Whether charge neutrality is necessary for a phase is also specified within * the ThermoPhase object, by the function call - * ThermoPhase::chargeNeutralityNecessary(). Note, that it is not necessary - * for the IdealGas phase, currently. However, it is necessary for liquid - * phases such as Cantera::DebyeHuckel and Cantera::HMWSoln for the proper - * specification of the chemical potentials. + * ThermoPhase::chargeNeutralityNecessary(). Note, that it is not necessary for + * the IdealGas phase, currently. However, it is necessary for liquid phases + * such as DebyeHuckel and HMWSoln for the proper specification of the chemical + * potentials. * * This equation, when applied to the \f$ \zeta_k \f$ equation described * above, results in a zero net change in the effective Gibbs free energy of * the phase. However, specific charged species in the phase may increase or * decrease their electrochemical potentials, which will have an effect on * interfacial reactions involving charged species, when there is a potential - * drop between phases. This effect is used within the - * Cantera::InterfaceKinetics and Cantera::EdgeKinetics kinetics objects - * classes. + * drop between phases. This effect is used within the InterfaceKinetics and + * EdgeKinetics kinetics objects classes. * *

Electrothermochemical Properties of Phases of Matter.

* diff --git a/include/cantera/transport/LiquidTransportParams.h b/include/cantera/transport/LiquidTransportParams.h index 79d15346c..96f89a896 100644 --- a/include/cantera/transport/LiquidTransportParams.h +++ b/include/cantera/transport/LiquidTransportParams.h @@ -26,7 +26,7 @@ public: LiquidTransportParams& operator=(const LiquidTransportParams& right); //! Species transport parameters - std::vector LTData; + std::vector LTData; //! Object that specifies the viscosity interaction for the mixture LiquidTranInteraction* viscosity; diff --git a/include/cantera/zeroD/FlowDevice.h b/include/cantera/zeroD/FlowDevice.h index ca4ae9e22..c4c2f828a 100644 --- a/include/cantera/zeroD/FlowDevice.h +++ b/include/cantera/zeroD/FlowDevice.h @@ -92,7 +92,7 @@ public: //! Set a function of a single variable that is used in determining the //! mass flow rate through the device. The meaning of this function //! depends on the parameterization of the derived type. - void setFunction(Cantera::Func1* f); + void setFunction(Func1* f); //! Set the fixed mass flow rate (kg/s) through the flow device. void setMassFlowRate(doublereal mdot) { @@ -101,7 +101,7 @@ public: protected: doublereal m_mdot; - Cantera::Func1* m_func; + Func1* m_func; vector_fp m_coeffs; int m_type; diff --git a/include/cantera/zeroD/ReactorFactory.h b/include/cantera/zeroD/ReactorFactory.h index 922003d8e..2a2aada8a 100644 --- a/include/cantera/zeroD/ReactorFactory.h +++ b/include/cantera/zeroD/ReactorFactory.h @@ -14,7 +14,7 @@ namespace Cantera { -class ReactorFactory : Cantera::FactoryBase +class ReactorFactory : FactoryBase { public: diff --git a/include/cantera/zeroD/ReactorNet.h b/include/cantera/zeroD/ReactorNet.h index 8a83a26cf..df244586b 100644 --- a/include/cantera/zeroD/ReactorNet.h +++ b/include/cantera/zeroD/ReactorNet.h @@ -20,7 +20,7 @@ namespace Cantera * a network of reactors (Reactor, ConstPressureReactor) connected by various * means, e.g. Wall, MassFlowController, Valve, PressureController. */ -class ReactorNet : public Cantera::FuncEval +class ReactorNet : public FuncEval { public: ReactorNet(); diff --git a/include/cantera/zeroD/Reservoir.h b/include/cantera/zeroD/Reservoir.h index 38407bd17..1cfc63135 100644 --- a/include/cantera/zeroD/Reservoir.h +++ b/include/cantera/zeroD/Reservoir.h @@ -20,7 +20,7 @@ public: } virtual void initialize(doublereal t0 = 0.0) {} - void insert(Cantera::ThermoPhase& contents) { + void insert(ThermoPhase& contents) { setThermoMgr(contents); } }; diff --git a/include/cantera/zeroD/Wall.h b/include/cantera/zeroD/Wall.h index e9c078c63..3380b41b6 100644 --- a/include/cantera/zeroD/Wall.h +++ b/include/cantera/zeroD/Wall.h @@ -83,8 +83,8 @@ public: //! Set the emissivity. void setEmissivity(doublereal epsilon) { if (epsilon > 1.0 || epsilon < 0.0) - throw Cantera::CanteraError("Wall::setEmissivity", - "emissivity must be between 0.0 and 1.0"); + throw CanteraError("Wall::setEmissivity", + "emissivity must be between 0.0 and 1.0"); m_emiss = epsilon; } @@ -93,7 +93,7 @@ public: } //! Set the wall velocity to a specified function of time - void setVelocity(Cantera::Func1* f=0) { + void setVelocity(Func1* f=0) { if (f) { m_vf = f; } @@ -110,7 +110,7 @@ public: } //! Specify the heat flux function \f$ q_0(t) \f$. - void setHeatFlux(Cantera::Func1* q) { + void setHeatFlux(Func1* q) { m_qf = q; } @@ -140,18 +140,18 @@ public: //! Specify the heterogeneous reaction mechanisms for each side of the //! wall. Passing a null pointer indicates that there is no reaction //! mechanism for the corresponding wall surface. - void setKinetics(Cantera::Kinetics* leftMechanism, - Cantera::Kinetics* rightMechanism); + void setKinetics(Kinetics* leftMechanism, + Kinetics* rightMechanism); //! Return a pointer to the surface phase object for the left //! (`leftright=0`) or right (`leftright=1`) wall surface. - Cantera::SurfPhase* surface(int leftright) { + SurfPhase* surface(int leftright) { return m_surf[leftright]; } //! Return a pointer to the surface kinetics object for the left //! (`leftright=0`) or right (`leftright=1`) wall surface. - Cantera::Kinetics* kinetics(int leftright) { + Kinetics* kinetics(int leftright) { return m_chem[leftright]; } @@ -190,17 +190,17 @@ public: protected: ReactorBase* m_left; ReactorBase* m_right; - Cantera::Kinetics* m_chem[2]; - Cantera::SurfPhase* m_surf[2]; + Kinetics* m_chem[2]; + SurfPhase* m_surf[2]; size_t m_nsp[2]; doublereal m_area, m_k, m_rrth; doublereal m_emiss; - Cantera::Func1* m_vf; - Cantera::Func1* m_qf; - Cantera::vector_fp m_leftcov, m_rightcov; + Func1* m_vf; + Func1* m_qf; + vector_fp m_leftcov, m_rightcov; std::vector m_pleft, m_pright; - Cantera::vector_fp m_leftmult_save, m_rightmult_save; + vector_fp m_leftmult_save, m_rightmult_save; }; } diff --git a/src/clib/ctfunc.cpp b/src/clib/ctfunc.cpp index 1f538641d..96f6fce91 100644 --- a/src/clib/ctfunc.cpp +++ b/src/clib/ctfunc.cpp @@ -88,7 +88,7 @@ extern "C" { } return FuncCabinet::add(r); } catch (...) { - return Cantera::handleAllExceptions(-1, ERR); + return handleAllExceptions(-1, ERR); } } @@ -168,7 +168,7 @@ extern "C" { copyString(FuncCabinet::item(i).write(arg), nm, lennm); return 0; } catch (...) { - return Cantera::handleAllExceptions(-1, ERR); + return handleAllExceptions(-1, ERR); } } diff --git a/src/equil/BasisOptimize.cpp b/src/equil/BasisOptimize.cpp index 051514847..4a2a8862c 100644 --- a/src/equil/BasisOptimize.cpp +++ b/src/equil/BasisOptimize.cpp @@ -5,13 +5,11 @@ #include "cantera/equil/MultiPhase.h" #include "cantera/numerics/ctlapack.h" -using namespace Cantera; using namespace std; namespace Cantera { int BasisOptimize_print_lvl = 0; -} //! Print a string within a given space limit. /*! @@ -25,10 +23,10 @@ int BasisOptimize_print_lvl = 0; */ static void print_stringTrunc(const char* str, int space, int alignment); -size_t Cantera::BasisOptimize(int* usedZeroedSpecies, bool doFormRxn, - MultiPhase* mphase, std::vector& orderVectorSpecies, - std::vector& orderVectorElements, - vector_fp& formRxnMatrix) +size_t BasisOptimize(int* usedZeroedSpecies, bool doFormRxn, MultiPhase* mphase, + std::vector& orderVectorSpecies, + std::vector& orderVectorElements, + vector_fp& formRxnMatrix) { size_t j, jj, k=0, kk, l, i, jl, ml; bool lindep; @@ -329,7 +327,7 @@ size_t Cantera::BasisOptimize(int* usedZeroedSpecies, bool doFormRxn, ct_dgetrs(ctlapack::NoTranspose, nComponents, nNonComponents, &sm[0], ne, &ipiv[0], &formRxnMatrix[0], ne, info); - if (DEBUG_MODE_ENABLED && Cantera::BasisOptimize_print_lvl >= 1) { + if (DEBUG_MODE_ENABLED && BasisOptimize_print_lvl >= 1) { writelog(" ---\n"); writelogf(" --- Number of Components = %d\n", nComponents); writelog(" --- Formula Matrix:\n"); @@ -421,10 +419,10 @@ static void print_stringTrunc(const char* str, int space, int alignment) } } -size_t Cantera::ElemRearrange(size_t nComponents, const vector_fp& elementAbundances, - MultiPhase* mphase, - std::vector& orderVectorSpecies, - std::vector& orderVectorElements) +size_t ElemRearrange(size_t nComponents, const vector_fp& elementAbundances, + MultiPhase* mphase, + std::vector& orderVectorSpecies, + std::vector& orderVectorElements) { size_t j, k, l, i, jl, ml, jr, ielem, jj, kk=0; @@ -631,3 +629,5 @@ size_t Cantera::ElemRearrange(size_t nComponents, const vector_fp& elementAbunda } while (jr < (nComponents-1)); return nComponents; } + +} diff --git a/src/equil/ChemEquil.cpp b/src/equil/ChemEquil.cpp index 51fbf00de..87d557f3b 100644 --- a/src/equil/ChemEquil.cpp +++ b/src/equil/ChemEquil.cpp @@ -16,10 +16,10 @@ using namespace std; #include -int Cantera::ChemEquil_print_lvl = 0; namespace Cantera { +int ChemEquil_print_lvl = 0; int _equilflag(const char* xy) { diff --git a/src/kinetics/ExtraGlobalRxn.cpp b/src/kinetics/ExtraGlobalRxn.cpp index 366f1a2d6..4a842909c 100644 --- a/src/kinetics/ExtraGlobalRxn.cpp +++ b/src/kinetics/ExtraGlobalRxn.cpp @@ -40,7 +40,6 @@ using namespace std; -using namespace Cantera; namespace Cantera { diff --git a/src/kinetics/Group.cpp b/src/kinetics/Group.cpp index 5e081aadb..c43dbb237 100644 --- a/src/kinetics/Group.cpp +++ b/src/kinetics/Group.cpp @@ -66,7 +66,7 @@ std::ostream& Group::fmt(std::ostream& s, return s; } -std::ostream& operator<<(std::ostream& s, const Cantera::Group& g) +std::ostream& operator<<(std::ostream& s, const Group& g) { if (g.valid()) { s << g.m_comp; diff --git a/src/kinetics/RxnMolChange.cpp b/src/kinetics/RxnMolChange.cpp index fe8859792..b3a24a9d3 100644 --- a/src/kinetics/RxnMolChange.cpp +++ b/src/kinetics/RxnMolChange.cpp @@ -23,12 +23,11 @@ #include #include -using namespace Cantera; using namespace std; namespace Cantera { -RxnMolChange::RxnMolChange(Cantera::Kinetics* kinPtr, int irxn) : +RxnMolChange::RxnMolChange(Kinetics* kinPtr, int irxn) : m_nPhases(0), m_kinBase(kinPtr), m_iRxn(irxn), @@ -55,7 +54,7 @@ RxnMolChange::RxnMolChange(Cantera::Kinetics* kinPtr, int irxn) : for (int kKin = 0; kKin < m_kk; kKin++) { iph = static_cast(m_kinBase->speciesPhaseIndex(kKin)); - Cantera::ThermoPhase& tpRef = m_kinBase->thermo(iph); + ThermoPhase& tpRef = m_kinBase->thermo(iph); int kLoc = kKin - static_cast(m_kinBase->kineticsSpeciesIndex(0, iph)); double rsc = m_kinBase->reactantStoichCoeff(kKin, irxn); double psc = m_kinBase->productStoichCoeff(kKin, irxn); @@ -70,7 +69,7 @@ RxnMolChange::RxnMolChange(Cantera::Kinetics* kinPtr, int irxn) : } for (iph = 0; iph < m_nPhases; iph++) { - Cantera::ThermoPhase& tpRef = m_kinBase->thermo(iph); + ThermoPhase& tpRef = m_kinBase->thermo(iph); m_phaseDims[iph] = static_cast(tpRef.nDim()); m_phaseTypes[iph] = tpRef.eosType(); if (m_phaseChargeChange[iph] != 0.0) { @@ -82,17 +81,17 @@ RxnMolChange::RxnMolChange(Cantera::Kinetics* kinPtr, int irxn) : } if (m_ChargeTransferInRxn) { - Cantera::InterfaceKinetics* iK = dynamic_cast(kinPtr); + InterfaceKinetics* iK = dynamic_cast(kinPtr); if (iK) { m_beta = iK->electrochem_beta(irxn); } else { - throw Cantera::CanteraError("RxnMolChange", "unknown condition on charge"); + throw CanteraError("RxnMolChange", "unknown condition on charge"); } } } -RxnMolChange::RxnMolChange(Cantera::Kinetics* kinPtr, Cantera::ExtraGlobalRxn* egr) : +RxnMolChange::RxnMolChange(Kinetics* kinPtr, ExtraGlobalRxn* egr) : m_nPhases(0), m_kinBase(kinPtr), m_iRxn(-1), diff --git a/src/numerics/CVodesIntegrator.cpp b/src/numerics/CVodesIntegrator.cpp index 2569aaf39..7f8c55417 100644 --- a/src/numerics/CVodesIntegrator.cpp +++ b/src/numerics/CVodesIntegrator.cpp @@ -67,14 +67,14 @@ extern "C" { try { double* ydata = NV_DATA_S(y); //N_VDATA(y); double* ydotdata = NV_DATA_S(ydot); //N_VDATA(ydot); - Cantera::FuncData* d = (Cantera::FuncData*)f_data; - Cantera::FuncEval* f = d->m_func; + FuncData* d = (FuncData*)f_data; + FuncEval* f = d->m_func; if (d->m_pars.size() == 0) { f->eval(t, ydata, ydotdata, NULL); } else { f->eval(t, ydata, ydotdata, DATA_PTR(d->m_pars)); } - } catch (Cantera::CanteraError& err) { + } catch (CanteraError& err) { std::cerr << err.what() << std::endl; return 1; // possibly recoverable error } catch (...) { diff --git a/src/numerics/solveProb.cpp b/src/numerics/solveProb.cpp index 9a0147de7..781e10181 100644 --- a/src/numerics/solveProb.cpp +++ b/src/numerics/solveProb.cpp @@ -103,7 +103,7 @@ int solveProb::solve(int ifunc, doublereal time_scale, #ifdef DEBUG_SOLVEPROB #ifdef DEBUG_SOLVEPROB_TIME - Cantera::clockWC wc; + clockWC wc; if (m_ioflag) { t1 = wc.secondsWC(); } diff --git a/src/thermo/LatticeSolidPhase.cpp b/src/thermo/LatticeSolidPhase.cpp index 1e9612a3e..c682b7e3c 100644 --- a/src/thermo/LatticeSolidPhase.cpp +++ b/src/thermo/LatticeSolidPhase.cpp @@ -325,7 +325,7 @@ void LatticeSolidPhase::getGibbs_ref(doublereal* g) const } } -void LatticeSolidPhase::installSlavePhases(Cantera::XML_Node* phaseNode) +void LatticeSolidPhase::installSlavePhases(XML_Node* phaseNode) { size_t kk = 0; size_t kstart = 0; diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index 135f74afc..f64f2730a 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -688,9 +688,9 @@ int MixtureFugacityTP::corr0(doublereal TKelvin, doublereal pres, doublereal& de doublereal densGas = densityCalc(TKelvin, pres, FLUID_GAS, densGasGuess); if (densGas <= 0.0) { if (retn == -1) { - throw Cantera::CanteraError("MixtureFugacityTP::corr0", - "Error occurred trying to find gas density at (T,P) = " - + Cantera::fp2str(TKelvin) + " " + Cantera::fp2str(pres)); + throw CanteraError("MixtureFugacityTP::corr0", + "Error occurred trying to find gas density at (T,P) = " + + fp2str(TKelvin) + " " + fp2str(pres)); } retn = -2; } else { diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index 759b82738..af0a19560 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -1420,7 +1420,7 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do doublereal val = acos(tmp); doublereal theta = val / 3.0; - doublereal oo = 2. * Cantera::Pi / 3.; + doublereal oo = 2. * Pi / 3.; doublereal alpha = xN + 2. * delta * cos(theta); doublereal beta = xN + 2. * delta * cos(theta + oo); diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp index 56a05bfce..e82e0b7fe 100644 --- a/src/thermo/ThermoPhase.cpp +++ b/src/thermo/ThermoPhase.cpp @@ -725,7 +725,7 @@ void ThermoPhase::initThermo() } xMol_Ref.resize(m_kk, 0.0); } -void ThermoPhase::installSlavePhases(Cantera::XML_Node* phaseNode) +void ThermoPhase::installSlavePhases(XML_Node* phaseNode) { } diff --git a/src/thermo/WaterPropsIAPWS.cpp b/src/thermo/WaterPropsIAPWS.cpp index d2a2de2ff..f6a9b615d 100644 --- a/src/thermo/WaterPropsIAPWS.cpp +++ b/src/thermo/WaterPropsIAPWS.cpp @@ -126,11 +126,11 @@ doublereal WaterPropsIAPWS::density(doublereal temperature, doublereal pressure, */ rhoguess = 1000.; } else if (phase == WATER_UNSTABLELIQUID || phase == WATER_UNSTABLEGAS) { - throw Cantera::CanteraError("WaterPropsIAPWS::density", - "Unstable Branch finder is untested"); + throw CanteraError("WaterPropsIAPWS::density", + "Unstable Branch finder is untested"); } else { - throw Cantera::CanteraError("WaterPropsIAPWS::density", - "unknown state: " + Cantera::int2str(phase)); + throw CanteraError("WaterPropsIAPWS::density", + "unknown state: " + int2str(phase)); } } } else { @@ -187,11 +187,11 @@ doublereal WaterPropsIAPWS::density_const(doublereal pressure, */ rhoguess = 1000.; } else if (phase == WATER_UNSTABLELIQUID || phase == WATER_UNSTABLEGAS) { - throw Cantera::CanteraError("WaterPropsIAPWS::density", - "Unstable Branch finder is untested"); + throw CanteraError("WaterPropsIAPWS::density", + "Unstable Branch finder is untested"); } else { - throw Cantera::CanteraError("WaterPropsIAPWS::density", - "unknown state: " + Cantera::int2str(phase)); + throw CanteraError("WaterPropsIAPWS::density", + "unknown state: " + int2str(phase)); } } } else { @@ -314,18 +314,18 @@ void WaterPropsIAPWS::corr(doublereal temperature, doublereal pressure, densLiq = density(temperature, pressure, WATER_LIQUID, densLiq); if (densLiq <= 0.0) { - throw Cantera::CanteraError("WaterPropsIAPWS::corr", - "Error occurred trying to find liquid density at (T,P) = " - + Cantera::fp2str(temperature) + " " + Cantera::fp2str(pressure)); + throw CanteraError("WaterPropsIAPWS::corr", + "Error occurred trying to find liquid density at (T,P) = " + + fp2str(temperature) + " " + fp2str(pressure)); } setState_TR(temperature, densLiq); doublereal gibbsLiqRT = m_phi->gibbs_RT(); densGas = density(temperature, pressure, WATER_GAS, densGas); if (densGas <= 0.0) { - throw Cantera::CanteraError("WaterPropsIAPWS::corr", - "Error occurred trying to find gas density at (T,P) = " - + Cantera::fp2str(temperature) + " " + Cantera::fp2str(pressure)); + throw CanteraError("WaterPropsIAPWS::corr", + "Error occurred trying to find gas density at (T,P) = " + + fp2str(temperature) + " " + fp2str(pressure)); } setState_TR(temperature, densGas); doublereal gibbsGasRT = m_phi->gibbs_RT(); @@ -339,18 +339,18 @@ void WaterPropsIAPWS::corr1(doublereal temperature, doublereal pressure, densLiq = density(temperature, pressure, WATER_LIQUID, densLiq); if (densLiq <= 0.0) { - throw Cantera::CanteraError("WaterPropsIAPWS::corr1", - "Error occurred trying to find liquid density at (T,P) = " - + Cantera::fp2str(temperature) + " " + Cantera::fp2str(pressure)); + throw CanteraError("WaterPropsIAPWS::corr1", + "Error occurred trying to find liquid density at (T,P) = " + + fp2str(temperature) + " " + fp2str(pressure)); } setState_TR(temperature, densLiq); doublereal prL = m_phi->phiR(); densGas = density(temperature, pressure, WATER_GAS, densGas); if (densGas <= 0.0) { - throw Cantera::CanteraError("WaterPropsIAPWS::corr1", - "Error occurred trying to find gas density at (T,P) = " - + Cantera::fp2str(temperature) + " " + Cantera::fp2str(pressure)); + throw CanteraError("WaterPropsIAPWS::corr1", + "Error occurred trying to find gas density at (T,P) = " + + fp2str(temperature) + " " + fp2str(pressure)); } setState_TR(temperature, densGas); doublereal prG = m_phi->phiR(); @@ -397,8 +397,8 @@ doublereal WaterPropsIAPWS::psat(doublereal temperature, int waterState) } else if (waterState == WATER_GAS) { setState_TR(temperature, densGas); } else { - throw Cantera::CanteraError("WaterPropsIAPWS::psat", - "unknown water state input: " + Cantera::int2str(waterState)); + throw CanteraError("WaterPropsIAPWS::psat", + "unknown water state input: " + int2str(waterState)); } return p; } @@ -525,8 +525,8 @@ doublereal WaterPropsIAPWS::densSpinodalWater() const } if (!conv) { - throw Cantera::CanteraError(" WaterPropsIAPWS::densSpinodalWater()", - " convergence failure"); + throw CanteraError("WaterPropsIAPWS::densSpinodalWater()", + "convergence failure"); } // Restore the original delta delta = delta_save; @@ -617,8 +617,8 @@ doublereal WaterPropsIAPWS::densSpinodalSteam() const } if (!conv) { - throw Cantera::CanteraError(" WaterPropsIAPWS::densSpinodalSteam()", - " convergence failure"); + throw CanteraError("WaterPropsIAPWS::densSpinodalSteam()", + "convergence failure"); } // Restore the original delta delta = delta_save; diff --git a/src/transport/LiquidTranInteraction.cpp b/src/transport/LiquidTranInteraction.cpp index b1bddf5a9..011b6b67f 100644 --- a/src/transport/LiquidTranInteraction.cpp +++ b/src/transport/LiquidTranInteraction.cpp @@ -460,7 +460,7 @@ void LTI_Pairwise_Interaction::setParameters(LiquidTransportParams& trParam) m_diagonals.resize(nsp, 0); for (size_t k = 0; k < nsp; k++) { - Cantera::LiquidTransportData& ltd = trParam.LTData[k]; + LiquidTransportData& ltd = trParam.LTData[k]; if (ltd.speciesDiffusivity) { m_diagonals[k] = ltd.speciesDiffusivity; } @@ -537,7 +537,7 @@ void LTI_StefanMaxwell_PPN::setParameters(LiquidTransportParams& trParam) } for (size_t k = 0; k < nsp; k++) { - Cantera::LiquidTransportData& ltd = trParam.LTData[k]; + LiquidTransportData& ltd = trParam.LTData[k]; m_ionCondSpecies[k] = ltd.ionConductivity; for (size_t j = 0; j < nsp2; j++) { m_mobRatSpecies[j][k] = ltd.mobilityRatio[j]; @@ -683,7 +683,7 @@ void LTI_StokesEinstein::setParameters(LiquidTransportParams& trParam) m_viscosity.resize(nsp, 0); m_hydroRadius.resize(nsp, 0); for (size_t k = 0; k < nsp; k++) { - Cantera::LiquidTransportData& ltd = trParam.LTData[k]; + LiquidTransportData& ltd = trParam.LTData[k]; m_viscosity[k] = ltd.viscosity; m_hydroRadius[k] = ltd.hydroRadius; } diff --git a/src/transport/LiquidTransport.cpp b/src/transport/LiquidTransport.cpp index 482b29341..e8e7721ec 100644 --- a/src/transport/LiquidTransport.cpp +++ b/src/transport/LiquidTransport.cpp @@ -267,7 +267,7 @@ bool LiquidTransport::initLiquid(LiquidTransportParams& tr) //for each species, assign viscosity model and coefficients for (size_t k = 0; k < m_nsp; k++) { - Cantera::LiquidTransportData& ltd = tr.LTData[k]; + LiquidTransportData& ltd = tr.LTData[k]; m_viscTempDep_Ns[k] = ltd.viscosity; ltd.viscosity = 0; m_ionCondTempDep_Ns[k] = ltd.ionConductivity; @@ -297,7 +297,7 @@ bool LiquidTransport::initLiquid(LiquidTransportParams& tr) m_diffTempDep_Ns.resize(m_nsp, 0); //for each species, assign viscosity model and coefficients for (size_t k = 0; k < m_nsp; k++) { - Cantera::LiquidTransportData& ltd = tr.LTData[k]; + LiquidTransportData& ltd = tr.LTData[k]; if (ltd.speciesDiffusivity != 0) { cout << "Warning: diffusion coefficient data for " << m_thermo->speciesName(k) diff --git a/src/transport/SimpleTransport.cpp b/src/transport/SimpleTransport.cpp index fa83eaacc..831a38787 100644 --- a/src/transport/SimpleTransport.cpp +++ b/src/transport/SimpleTransport.cpp @@ -192,7 +192,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr) for (size_t k = 0; k < m_nsp; k++) { spName = m_thermo->speciesName(k); - Cantera::LiquidTransportData& ltd = tr.LTData[k]; + LiquidTransportData& ltd = tr.LTData[k]; m_coeffVisc_Ns[k] = ltd.viscosity; ltd.viscosity = 0; } @@ -206,7 +206,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr) for (size_t k = 0; k < m_nsp; k++) { spName = m_thermo->speciesName(k); - Cantera::LiquidTransportData& ltd = tr.LTData[k]; + LiquidTransportData& ltd = tr.LTData[k]; m_coeffLambda_Ns[k] = ltd.thermalCond; ltd.thermalCond = 0; } @@ -222,7 +222,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr) for (size_t k = 0; k < m_nsp; k++) { spName = m_thermo->speciesName(k); - Cantera::LiquidTransportData& ltd = tr.LTData[k]; + LiquidTransportData& ltd = tr.LTData[k]; m_coeffDiff_Ns[k] = ltd.speciesDiffusivity; ltd.speciesDiffusivity = 0; diff --git a/src/zeroD/ReactorFactory.cpp b/src/zeroD/ReactorFactory.cpp index e5f18b1dd..070b65902 100644 --- a/src/zeroD/ReactorFactory.cpp +++ b/src/zeroD/ReactorFactory.cpp @@ -65,8 +65,8 @@ ReactorBase* ReactorFactory::newReactor(int ir) case IdealGasConstPressureReactorType: return new IdealGasConstPressureReactor(); default: - throw Cantera::CanteraError("ReactorFactory::newReactor", - "unknown reactor type!"); + throw CanteraError("ReactorFactory::newReactor", + "unknown reactor type!"); } return 0; } diff --git a/test_problems/VPsilane_test/silane_equil.cpp b/test_problems/VPsilane_test/silane_equil.cpp index 916cf0a18..f9f12ccec 100644 --- a/test_problems/VPsilane_test/silane_equil.cpp +++ b/test_problems/VPsilane_test/silane_equil.cpp @@ -15,7 +15,7 @@ int main(int argc, char** argv) _set_output_format(_TWO_DIGIT_EXPONENT); #endif try { - Cantera::IdealSolnGasVPSS gg("silane.xml", "silane"); + IdealSolnGasVPSS gg("silane.xml", "silane"); ThermoPhase* g = ≫ //ThermoPhase *g = newPhase("silane.xml", "silane"); cout.precision(4); diff --git a/test_problems/cathermo/DH_graph_1/DH_graph_1.cpp b/test_problems/cathermo/DH_graph_1/DH_graph_1.cpp index 0c093a2ee..0cccbb754 100644 --- a/test_problems/cathermo/DH_graph_1/DH_graph_1.cpp +++ b/test_problems/cathermo/DH_graph_1/DH_graph_1.cpp @@ -69,7 +69,7 @@ int main(int argc, char** argv) /* * This delete the file logger amongst other things. */ - Cantera::appdelete(); + appdelete(); return retn; diff --git a/test_problems/cathermo/HMW_dupl_test/HMW_dupl_test.cpp b/test_problems/cathermo/HMW_dupl_test/HMW_dupl_test.cpp index 230ac8a8f..a000153a4 100644 --- a/test_problems/cathermo/HMW_dupl_test/HMW_dupl_test.cpp +++ b/test_problems/cathermo/HMW_dupl_test/HMW_dupl_test.cpp @@ -27,7 +27,7 @@ int main(int argc, char** argv) /* * Load in and initialize the */ - Cantera::ThermoPhase* solid = newPhase("NaCl_Solid.xml","NaCl(S)"); + ThermoPhase* solid = newPhase("NaCl_Solid.xml","NaCl(S)"); size_t nsp = HMW->nSpecies(); @@ -274,14 +274,14 @@ int main(int argc, char** argv) hmwtbDupl = 0; delete solid; solid = 0; - Cantera::appdelete(); + appdelete(); return retn; } catch (CanteraError& err) { std::cout << err.what() << std::endl; - Cantera::appdelete(); + appdelete(); return -1; } }