diff --git a/include/cantera/base/ct_defs.h b/include/cantera/base/ct_defs.h index 4b9743609..b98fcf1f4 100644 --- a/include/cantera/base/ct_defs.h +++ b/include/cantera/base/ct_defs.h @@ -34,7 +34,7 @@ namespace Cantera #undef CHEMKIN_COMPATIBILITY_MODE -//! Creates a pointer to the start of the raw data for a ctvector +//! Creates a pointer to the start of the raw data for a vector #ifndef DATA_PTR #define DATA_PTR(vec) &vec[0] #endif @@ -166,25 +166,12 @@ const doublereal Tiny = 1.e-20; */ typedef std::map compositionMap; //! Turn on the use of stl vectors for the basic array type within cantera -#define USE_STL_VECTOR -#ifdef USE_STL_VECTOR -//! Vector of doubles. -/*! - * @deprecated array_fp is going away, because vector_fp means the same thing - */ -typedef std::vector array_fp; //! Vector of doubles. typedef std::vector vector_fp; //! Vector of ints typedef std::vector array_int; //! Vector of ints typedef std::vector vector_int; -#else -typedef ct::ctvector_fp array_fp; -typedef ct::ctvector_fp vector_fp; -typedef ct::ctvector_int array_int; -typedef ct::ctvector_int vector_int; -#endif //! typedef for a group of species. /*! * A group of species is a subset of the species in a phase. diff --git a/include/cantera/kinetics/AqueousKinetics.h b/include/cantera/kinetics/AqueousKinetics.h index de84cbc07..b87acd73d 100644 --- a/include/cantera/kinetics/AqueousKinetics.h +++ b/include/cantera/kinetics/AqueousKinetics.h @@ -53,17 +53,17 @@ public: doublereal m_logp_ref; doublereal m_logc_ref; - array_fp m_ropf; - array_fp m_ropr; - array_fp m_ropnet; - array_fp m_rfn_low; - array_fp m_rfn_high; + vector_fp m_ropf; + vector_fp m_ropr; + vector_fp m_ropnet; + vector_fp m_rfn_low; + vector_fp m_rfn_high; bool m_ROP_ok; doublereal m_temp; - array_fp m_rfn; + vector_fp m_rfn; - array_fp m_rkcn; + vector_fp m_rkcn; }; @@ -398,15 +398,15 @@ protected: * to account for the fact that we can have real-valued * stoichiometries. */ - array_fp m_dn; + vector_fp m_dn; std::vector m_revindex; std::vector m_rxneqn; AqueousKineticsData* m_kdata; - array_fp m_conc; - array_fp m_grt; + vector_fp m_conc; + vector_fp m_grt; private: diff --git a/include/cantera/kinetics/GasKinetics.h b/include/cantera/kinetics/GasKinetics.h index ec5b4002d..3e0bff502 100644 --- a/include/cantera/kinetics/GasKinetics.h +++ b/include/cantera/kinetics/GasKinetics.h @@ -56,19 +56,19 @@ public: doublereal m_logp_ref; doublereal m_logc_ref; doublereal m_logStandConc; - array_fp m_ropf; - array_fp m_ropr; - array_fp m_ropnet; - array_fp m_rfn_low; - array_fp m_rfn_high; + vector_fp m_ropf; + vector_fp m_ropr; + vector_fp m_ropnet; + vector_fp m_rfn_low; + vector_fp m_rfn_high; bool m_ROP_ok; doublereal m_temp; - array_fp m_rfn; - array_fp falloff_work; - array_fp concm_3b_values; - array_fp concm_falloff_values; - array_fp m_rkcn; + vector_fp m_rfn; + vector_fp falloff_work; + vector_fp concm_3b_values; + vector_fp concm_falloff_values; + vector_fp m_rkcn; }; @@ -429,16 +429,16 @@ protected: * to account for the fact that we can have real-valued * stoichiometries. */ - array_fp m_dn; + vector_fp m_dn; std::vector m_revindex; std::vector m_rxneqn; GasKineticsData* m_kdata; - array_fp m_conc; + vector_fp m_conc; void processFalloffReactions(); - array_fp m_grt; + vector_fp m_grt; private: diff --git a/include/cantera/kinetics/InterfaceKinetics.h b/include/cantera/kinetics/InterfaceKinetics.h index 32ae188d7..2956cff7e 100644 --- a/include/cantera/kinetics/InterfaceKinetics.h +++ b/include/cantera/kinetics/InterfaceKinetics.h @@ -54,9 +54,9 @@ public: doublereal m_logp0; doublereal m_logc0; - array_fp m_ropf; - array_fp m_ropr; - array_fp m_ropnet; + vector_fp m_ropf; + vector_fp m_ropr; + vector_fp m_ropnet; bool m_ROP_ok; diff --git a/include/cantera/kinetics/RateCoeffMgr.h b/include/cantera/kinetics/RateCoeffMgr.h index d416af0ff..8368ccec4 100644 --- a/include/cantera/kinetics/RateCoeffMgr.h +++ b/include/cantera/kinetics/RateCoeffMgr.h @@ -116,7 +116,7 @@ public: protected: std::vector m_rates; std::vector m_rxn; - array_fp m_const; // not used + vector_fp m_const; // not used }; diff --git a/include/cantera/kinetics/ReactionPath.h b/include/cantera/kinetics/ReactionPath.h index f0f9f4981..83a0aba49 100644 --- a/include/cantera/kinetics/ReactionPath.h +++ b/include/cantera/kinetics/ReactionPath.h @@ -310,7 +310,7 @@ protected: size_t m_nel; vector_fp m_ropf; vector_fp m_ropr; - array_fp m_x; + vector_fp m_x; std::vector > m_reac; std::vector > m_prod; DenseMatrix m_elatoms; diff --git a/include/cantera/thermo/AdsorbateThermo.h b/include/cantera/thermo/AdsorbateThermo.h index a690d467f..98b706400 100644 --- a/include/cantera/thermo/AdsorbateThermo.h +++ b/include/cantera/thermo/AdsorbateThermo.h @@ -192,7 +192,7 @@ protected: int m_index; size_t m_nFreqs; //! array of vib frequencies - array_fp m_freq; + vector_fp m_freq; doublereal m_be; diff --git a/include/cantera/thermo/ConstDensityThermo.h b/include/cantera/thermo/ConstDensityThermo.h index 6cd38c290..a708e6013 100644 --- a/include/cantera/thermo/ConstDensityThermo.h +++ b/include/cantera/thermo/ConstDensityThermo.h @@ -214,7 +214,7 @@ public: * Length: m_kk. */ virtual void getPureGibbs(doublereal* gpure) const { - const array_fp& gibbsrt = gibbs_RT(); + const vector_fp& gibbsrt = gibbs_RT(); scale(gibbsrt.begin(), gibbsrt.end(), gpure, _RT()); } @@ -225,7 +225,7 @@ public: * Length: m_kk. */ void getEnthalpy_RT(doublereal* hrt) const { - const array_fp& _h = enthalpy_RT(); + const vector_fp& _h = enthalpy_RT(); std::copy(_h.begin(), _h.end(), hrt); } @@ -236,7 +236,7 @@ public: * Length: m_kk. */ void getEntropy_R(doublereal* sr) const { - const array_fp& _s = entropy_R(); + const vector_fp& _s = entropy_R(); std::copy(_s.begin(), _s.end(), sr); } @@ -247,7 +247,7 @@ public: * Length: m_kk. */ virtual void getGibbs_RT(doublereal* grt) const { - const array_fp& gibbsrt = gibbs_RT(); + const vector_fp& gibbsrt = gibbs_RT(); std::copy(gibbsrt.begin(), gibbsrt.end(), grt); } @@ -259,7 +259,7 @@ public: * Length: m_kk. */ void getCp_R(doublereal* cpr) const { - const array_fp& _cpr = cp_R(); + const vector_fp& _cpr = cp_R(); std::copy(_cpr.begin(), _cpr.end(), cpr); } @@ -269,7 +269,7 @@ public: //! Returns a reference to the vector of nondimensional //! enthalpies of the reference state at the current temperature //! of the solution and the reference pressure for the species. - const array_fp& enthalpy_RT() const { + const vector_fp& enthalpy_RT() const { _updateThermo(); return m_h0_RT; } @@ -277,7 +277,7 @@ public: //! Returns a reference to the vector of nondimensional //! Gibbs Free Energies of the reference state at the current temperature //! of the solution and the reference pressure for the species. - const array_fp& gibbs_RT() const { + const vector_fp& gibbs_RT() const { _updateThermo(); return m_g0_RT; } @@ -285,7 +285,7 @@ public: //! Returns a reference to the vector of exponentials of the nondimensional //! Gibbs Free Energies of the reference state at the current temperature //! of the solution and the reference pressure for the species. - const array_fp& expGibbs_RT() const { + const vector_fp& expGibbs_RT() const { _updateThermo(); for (size_t k = 0; k != m_kk; k++) { m_expg0_RT[k] = std::exp(m_g0_RT[k]); @@ -296,7 +296,7 @@ public: //! Returns a reference to the vector of nondimensional //! entropies of the reference state at the current temperature //! of the solution and the reference pressure for each species. - const array_fp& entropy_R() const { + const vector_fp& entropy_R() const { _updateThermo(); return m_s0_R; } @@ -305,7 +305,7 @@ public: //! constant pressure heat capacities of the reference state //! at the current temperature of the solution //! and reference pressure for each species. - const array_fp& cp_R() const { + const vector_fp& cp_R() const { _updateThermo(); return m_cp0_R; } @@ -433,31 +433,31 @@ protected: mutable doublereal m_tlast; //! Temporary storage for dimensionless reference state enthalpies - mutable array_fp m_h0_RT; + mutable vector_fp m_h0_RT; //! Temporary storage for dimensionless reference state heat capacities - mutable array_fp m_cp0_R; + mutable vector_fp m_cp0_R; //! Temporary storage for dimensionless reference state gibbs energies - mutable array_fp m_g0_RT; + mutable vector_fp m_g0_RT; //! Temporary storage for dimensionless reference state entropies - mutable array_fp m_s0_R; + mutable vector_fp m_s0_R; //! currently unsed /*! * @deprecated */ - mutable array_fp m_expg0_RT; + mutable vector_fp m_expg0_RT; //! Currently unused /* * @deprecated */ - mutable array_fp m_pe; + mutable vector_fp m_pe; //! Temporary array containing internally calculated partial pressures - mutable array_fp m_pp; + mutable vector_fp m_pp; //! Current pressure (Pa) doublereal m_press; diff --git a/include/cantera/thermo/DebyeHuckel.h b/include/cantera/thermo/DebyeHuckel.h index e67d8a882..6b8ba7787 100644 --- a/include/cantera/thermo/DebyeHuckel.h +++ b/include/cantera/thermo/DebyeHuckel.h @@ -1553,13 +1553,13 @@ protected: * Species molar volumes \f$ m^3 kmol^-1 \f$ * -> m_speciesSize in Constituents.h */ - //array_fp m_speciesMolarVolume; + //vector_fp m_speciesMolarVolume; /** * a_k = Size of the ionic species in the DH formulation * units = meters */ - array_fp m_Aionic; + vector_fp m_Aionic; /** * Current value of the ionic strength on the molality scale @@ -1665,7 +1665,7 @@ protected: * to extend DH to higher molalities. * B_dot is specific to the major ionic pair. */ - array_fp m_B_Dot; + vector_fp m_B_Dot; /** * m_npActCoeff -> These are coefficients to describe @@ -1673,7 +1673,7 @@ protected: * due to the electrolyte becoming stronger (the so-called * salt-out effect) */ - array_fp m_npActCoeff; + vector_fp m_npActCoeff; //! Pointer to the Water standard state object @@ -1741,16 +1741,16 @@ protected: * mutable because we change this if the composition * or temperature or pressure changes. */ - mutable array_fp m_lnActCoeffMolal; + mutable vector_fp m_lnActCoeffMolal; //! Derivative of log act coeff wrt T - mutable array_fp m_dlnActCoeffMolaldT; + mutable vector_fp m_dlnActCoeffMolaldT; //! 2nd Derivative of log act coeff wrt T - mutable array_fp m_d2lnActCoeffMolaldT2; + mutable vector_fp m_d2lnActCoeffMolaldT2; //! Derivative of log act coeff wrt P - mutable array_fp m_dlnActCoeffMolaldP; + mutable vector_fp m_dlnActCoeffMolaldP; private: doublereal err(std::string msg) const; diff --git a/include/cantera/thermo/HMWSoln.h b/include/cantera/thermo/HMWSoln.h index 44c6d3b08..e5158bd74 100644 --- a/include/cantera/thermo/HMWSoln.h +++ b/include/cantera/thermo/HMWSoln.h @@ -2440,13 +2440,13 @@ private: * Species molar volumes \f$ m^3 kmol^-1 \f$ * -> m_speciesSize in Constituents.h */ - //array_fp m_speciesMolarVolume; + //vector_fp m_speciesMolarVolume; /** * a_k = Size of the ionic species in the DH formulation * units = meters */ - array_fp m_Aionic; + vector_fp m_Aionic; /** * Current value of the ionic strength on the molality scale diff --git a/include/cantera/thermo/IdealGasPhase.h b/include/cantera/thermo/IdealGasPhase.h index af85ef3b0..55960d01b 100644 --- a/include/cantera/thermo/IdealGasPhase.h +++ b/include/cantera/thermo/IdealGasPhase.h @@ -788,7 +788,7 @@ public: * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ - const array_fp& enthalpy_RT_ref() const { + const vector_fp& enthalpy_RT_ref() const { _updateThermo(); return m_h0_RT; } @@ -798,7 +798,7 @@ public: * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ - const array_fp& gibbs_RT_ref() const { + const vector_fp& gibbs_RT_ref() const { _updateThermo(); return m_g0_RT; } @@ -808,7 +808,7 @@ public: * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ - const array_fp& expGibbs_RT_ref() const { + const vector_fp& expGibbs_RT_ref() const { _updateThermo(); for (size_t k = 0; k != m_kk; k++) { m_expg0_RT[k] = std::exp(m_g0_RT[k]); @@ -821,7 +821,7 @@ public: * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ - const array_fp& entropy_R_ref() const { + const vector_fp& entropy_R_ref() const { _updateThermo(); return m_s0_R; } @@ -831,7 +831,7 @@ public: * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ - const array_fp& cp_R_ref() const { + const vector_fp& cp_R_ref() const { _updateThermo(); return m_cp0_R; } @@ -912,31 +912,31 @@ protected: mutable doublereal m_logc0; //! Temporary storage for dimensionless reference state enthalpies - mutable array_fp m_h0_RT; + mutable vector_fp m_h0_RT; //! Temporary storage for dimensionless reference state heat capacities - mutable array_fp m_cp0_R; + mutable vector_fp m_cp0_R; //! Temporary storage for dimensionless reference state gibbs energies - mutable array_fp m_g0_RT; + mutable vector_fp m_g0_RT; //! Temporary storage for dimensionless reference state entropies - mutable array_fp m_s0_R; + mutable vector_fp m_s0_R; //! currently unsed /*! * @deprecated */ - mutable array_fp m_expg0_RT; + mutable vector_fp m_expg0_RT; //! Currently unused /* * @deprecated */ - mutable array_fp m_pe; + mutable vector_fp m_pe; //! Temporary array containing internally calculated partial pressures - mutable array_fp m_pp; + mutable vector_fp m_pp; private: diff --git a/include/cantera/thermo/IdealMolalSoln.h b/include/cantera/thermo/IdealMolalSoln.h index cc4a9d439..5a193a88f 100644 --- a/include/cantera/thermo/IdealMolalSoln.h +++ b/include/cantera/thermo/IdealMolalSoln.h @@ -890,7 +890,7 @@ protected: /** * Species molar volume \f$ m^3 kmol^-1 \f$ */ - array_fp m_speciesMolarVolume; + vector_fp m_speciesMolarVolume; /** * The standard concentrations can have three different forms diff --git a/include/cantera/thermo/IdealSolidSolnPhase.h b/include/cantera/thermo/IdealSolidSolnPhase.h index cfbd6c120..8ac644f04 100644 --- a/include/cantera/thermo/IdealSolidSolnPhase.h +++ b/include/cantera/thermo/IdealSolidSolnPhase.h @@ -841,7 +841,7 @@ public: * to see if a recalculation of the reference thermodynamics * functions needs to be done. */ - const array_fp& enthalpy_RT_ref() const; + const vector_fp& enthalpy_RT_ref() const; /** * Returns a reference to the vector of nondimensional @@ -850,7 +850,7 @@ public: * to see if a recalculation of the reference thermodynamics * functions needs to be done. */ - const array_fp& gibbs_RT_ref() const { + const vector_fp& gibbs_RT_ref() const { _updateThermo(); return m_g0_RT; } @@ -862,7 +862,7 @@ public: * to see if a recalculation of the reference thermodynamics * functions needs to be done. */ - const array_fp& expGibbs_RT_ref() const; + const vector_fp& expGibbs_RT_ref() const; /** * Returns a reference to the vector of nondimensional @@ -871,7 +871,7 @@ public: * to see if a recalculation of the reference thermodynamics * functions needs to be done. */ - const array_fp& entropy_R_ref() const; + const vector_fp& entropy_R_ref() const; /** * Returns a reference to the vector of nondimensional @@ -880,7 +880,7 @@ public: * to see if a recalculation of the reference thermodynamics * functions needs to be done. */ - const array_fp& cp_R_ref() const { + const vector_fp& cp_R_ref() const { _updateThermo(); return m_cp0_R; } @@ -1057,7 +1057,7 @@ protected: /** * Species molar volumes \f$ m^3 kmol^-1 \f$ */ - array_fp m_speciesMolarVolume; + vector_fp m_speciesMolarVolume; /** * Value of the temperature at which the thermodynamics functions @@ -1068,41 +1068,41 @@ protected: /** * Vector containing the species reference enthalpies at T = m_tlast */ - mutable array_fp m_h0_RT; + mutable vector_fp m_h0_RT; /** * Vector containing the species reference constant pressure * heat capacities at T = m_tlast */ - mutable array_fp m_cp0_R; + mutable vector_fp m_cp0_R; /** * Vector containing the species reference Gibbs functions * at T = m_tlast */ - mutable array_fp m_g0_RT; + mutable vector_fp m_g0_RT; /** * Vector containing the species reference entropies * at T = m_tlast */ - mutable array_fp m_s0_R; + mutable vector_fp m_s0_R; /** * Vector containing the species reference exp(-G/RT) functions * at T = m_tlast */ - mutable array_fp m_expg0_RT; + mutable vector_fp m_expg0_RT; /** * Vector of potential energies for the species. */ - mutable array_fp m_pe; + mutable vector_fp m_pe; /** * Temporary array used in equilibrium calculations */ - mutable array_fp m_pp; + mutable vector_fp m_pp; private: /// @name Utility Functions ------------------------------------------ diff --git a/include/cantera/thermo/LatticePhase.h b/include/cantera/thermo/LatticePhase.h index 4f80f180a..45af48049 100644 --- a/include/cantera/thermo/LatticePhase.h +++ b/include/cantera/thermo/LatticePhase.h @@ -807,14 +807,14 @@ public: * Enthalpies of the species. * Length: m_kk */ - const array_fp& enthalpy_RT_ref() const; + const vector_fp& enthalpy_RT_ref() const; //! Returns a reference to the dimensionless reference state Gibbs free energy vector. /*! * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ - const array_fp& gibbs_RT_ref() const; + const vector_fp& gibbs_RT_ref() const; //! Returns the vector of nondimensional //! Gibbs Free Energies of the reference state at the current temperature @@ -840,14 +840,14 @@ public: * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ - const array_fp& entropy_R_ref() const; + const vector_fp& entropy_R_ref() const; //! Returns a reference to the dimensionless reference state Heat Capacity vector. /*! * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ - const array_fp& cp_R_ref() const; + const vector_fp& cp_R_ref() const; //@} /// @name Utilities for Initialization of the Object @@ -987,16 +987,16 @@ protected: mutable doublereal m_tlast; //! Reference state enthalpies / RT - mutable array_fp m_h0_RT; + mutable vector_fp m_h0_RT; //! Temporary storage for the reference state heat capacities - mutable array_fp m_cp0_R; + mutable vector_fp m_cp0_R; //! Temporary storage for the reference state gibbs energies - mutable array_fp m_g0_RT; + mutable vector_fp m_g0_RT; //! Temporary storage for the reference state entropies at the current temperature - mutable array_fp m_s0_R; + mutable vector_fp m_s0_R; //! String name for the species which represents a vacency @@ -1010,7 +1010,7 @@ protected: /** * Species molar volumes \f$ m^3 kmol^-1 \f$ */ - array_fp m_speciesMolarVolume; + vector_fp m_speciesMolarVolume; //! Site Density of the lattice solid /*! diff --git a/include/cantera/thermo/MixtureFugacityTP.h b/include/cantera/thermo/MixtureFugacityTP.h index 2a8aa36d1..57c86f01a 100644 --- a/include/cantera/thermo/MixtureFugacityTP.h +++ b/include/cantera/thermo/MixtureFugacityTP.h @@ -946,16 +946,16 @@ protected: mutable doublereal m_logc0; //! Temporary storage for dimensionless reference state enthalpies - mutable array_fp m_h0_RT; + mutable vector_fp m_h0_RT; //! Temporary storage for dimensionless reference state heat capacities - mutable array_fp m_cp0_R; + mutable vector_fp m_cp0_R; //! Temporary storage for dimensionless reference state gibbs energies - mutable array_fp m_g0_RT; + mutable vector_fp m_g0_RT; //! Temporary storage for dimensionless reference state entropies - mutable array_fp m_s0_R; + mutable vector_fp m_s0_R; spinodalFunc* fdpdv_; private: diff --git a/include/cantera/thermo/Nasa9Poly1.h b/include/cantera/thermo/Nasa9Poly1.h index 502ca4f29..6e7b8c338 100644 --- a/include/cantera/thermo/Nasa9Poly1.h +++ b/include/cantera/thermo/Nasa9Poly1.h @@ -224,7 +224,7 @@ protected: //! species index size_t m_index; //! array of polynomial coefficients - array_fp m_coeff; + vector_fp m_coeff; }; } diff --git a/include/cantera/thermo/NasaPoly1.h b/include/cantera/thermo/NasaPoly1.h index 12a1c6ce9..ddd5eba50 100644 --- a/include/cantera/thermo/NasaPoly1.h +++ b/include/cantera/thermo/NasaPoly1.h @@ -55,7 +55,7 @@ public: //! Empty constructor NasaPoly1() : m_lowT(0.0), m_highT(0.0), - m_Pref(0.0), m_index(0), m_coeff(array_fp(7)) {} + m_Pref(0.0), m_index(0), m_coeff(vector_fp(7)) {} //! constructor used in templated instantiations @@ -73,7 +73,7 @@ public: m_highT(thigh), m_Pref(pref), m_index(n), - m_coeff(array_fp(7)) { + m_coeff(vector_fp(7)) { std::copy(coeffs, coeffs + 7, m_coeff.begin()); } @@ -86,7 +86,7 @@ public: m_highT(b.m_highT), m_Pref(b.m_Pref), m_index(b.m_index), - m_coeff(array_fp(7)) { + m_coeff(vector_fp(7)) { std::copy(b.m_coeff.begin(), b.m_coeff.begin() + 7, m_coeff.begin()); @@ -322,7 +322,7 @@ protected: //! species index size_t m_index; //! array of polynomial coefficients - array_fp m_coeff; + vector_fp m_coeff; }; diff --git a/include/cantera/thermo/Phase.h b/include/cantera/thermo/Phase.h index 914b15aa0..0308c5abd 100644 --- a/include/cantera/thermo/Phase.h +++ b/include/cantera/thermo/Phase.h @@ -483,7 +483,7 @@ public: * Return a const reference to the internal vector of * molecular weights. */ - const array_fp& molecularWeights() const; + const vector_fp& molecularWeights() const; /** * Get the mole fractions by name. diff --git a/include/cantera/thermo/SingleSpeciesTP.h b/include/cantera/thermo/SingleSpeciesTP.h index 3762a80e5..01e1e47b9 100644 --- a/include/cantera/thermo/SingleSpeciesTP.h +++ b/include/cantera/thermo/SingleSpeciesTP.h @@ -739,11 +739,11 @@ protected: mutable doublereal m_tlast; //! Dimensionless enthalpy at the (mtlast, m_p0) - mutable array_fp m_h0_RT; + mutable vector_fp m_h0_RT; //! Dimensionless heat capacity at the (mtlast, m_p0) - mutable array_fp m_cp0_R; + mutable vector_fp m_cp0_R; //! Dimensionless entropy at the (mtlast, m_p0) - mutable array_fp m_s0_R; + mutable vector_fp m_s0_R; protected: /** diff --git a/include/cantera/thermo/State.h b/include/cantera/thermo/State.h index 062c23a8b..fa5f38c3f 100644 --- a/include/cantera/thermo/State.h +++ b/include/cantera/thermo/State.h @@ -90,7 +90,7 @@ public: /// Return a read-only reference to the array of molecular /// weights. - const array_fp& molecularWeights() const { + const vector_fp& molecularWeights() const { return m_molwts; } @@ -367,7 +367,7 @@ protected: * * @param mw Vector of molecular weights of the species. */ - void init(const array_fp& mw); //, density_is_independent = true); + void init(const vector_fp& mw); //, density_is_independent = true); /** * m_kk is the number of species in the phase @@ -411,23 +411,23 @@ private: * m_ym[k] = mole fraction of species k divided by the * mean molecular weight of mixture. */ - mutable array_fp m_ym; + mutable vector_fp m_ym; /** * m_y[k] = mass fraction of species k */ - mutable array_fp m_y; + mutable vector_fp m_y; /** * m_molwts[k] = molecular weight of species k (kg kmol-1) */ - array_fp m_molwts; + vector_fp m_molwts; /** * m_rmolwts[k] = inverse of the molecular weight of species k * units = kmol kg-1. */ - array_fp m_rmolwts; + vector_fp m_rmolwts; //! State Change variable /*! diff --git a/include/cantera/thermo/StoichSubstance.h b/include/cantera/thermo/StoichSubstance.h index 99e1eafa2..e57d3e660 100644 --- a/include/cantera/thermo/StoichSubstance.h +++ b/include/cantera/thermo/StoichSubstance.h @@ -397,9 +397,9 @@ protected: doublereal m_p0; mutable doublereal m_tlast; - mutable array_fp m_h0_RT; - mutable array_fp m_cp0_R; - mutable array_fp m_s0_R; + mutable vector_fp m_h0_RT; + mutable vector_fp m_cp0_R; + mutable vector_fp m_s0_R; private: diff --git a/include/cantera/thermo/SurfPhase.h b/include/cantera/thermo/SurfPhase.h index c90d543c7..6d3499e9d 100644 --- a/include/cantera/thermo/SurfPhase.h +++ b/include/cantera/thermo/SurfPhase.h @@ -661,19 +661,19 @@ protected: mutable doublereal m_tlast; //! Temporary storage for the reference state enthalpies - mutable array_fp m_h0; + mutable vector_fp m_h0; //! Temporary storage for the reference state entropies - mutable array_fp m_s0; + mutable vector_fp m_s0; //! Temporary storage for the reference state heat capacities - mutable array_fp m_cp0; + mutable vector_fp m_cp0; //! Temporary storage for the reference state gibbs energies - mutable array_fp m_mu0; + mutable vector_fp m_mu0; //! Temporary work array - mutable array_fp m_work; + mutable vector_fp m_work; //! Potential energy of each species in the surface phase /*! @@ -684,14 +684,14 @@ protected: * * @deprecated */ - mutable array_fp m_pe; + mutable vector_fp m_pe; //! vector storing the log of the size of each species. /*! * The size of each species is defined as the number of surface * sites each species occupies. */ - mutable array_fp m_logsize; + mutable vector_fp m_logsize; private: diff --git a/include/cantera/transport/MultiTransport.h b/include/cantera/transport/MultiTransport.h index d7bf625d1..b4fcae14d 100644 --- a/include/cantera/transport/MultiTransport.h +++ b/include/cantera/transport/MultiTransport.h @@ -278,7 +278,7 @@ private: vector_fp m_visc; vector_fp m_sqvisc; - array_fp m_molefracs; + vector_fp m_molefracs; std::vector > m_poly; diff --git a/src/kinetics/AqueousKinetics.cpp b/src/kinetics/AqueousKinetics.cpp index 8d842f448..428d55453 100644 --- a/src/kinetics/AqueousKinetics.cpp +++ b/src/kinetics/AqueousKinetics.cpp @@ -423,9 +423,9 @@ void AqueousKinetics::updateROP() const vector_fp& rf = m_kdata->m_rfn; const vector_fp& m_rkc = m_kdata->m_rkcn; - array_fp& ropf = m_kdata->m_ropf; - array_fp& ropr = m_kdata->m_ropr; - array_fp& ropnet = m_kdata->m_ropnet; + vector_fp& ropf = m_kdata->m_ropf; + vector_fp& ropr = m_kdata->m_ropr; + vector_fp& ropnet = m_kdata->m_ropnet; // copy rate coefficients into ropf copy(rf.begin(), rf.end(), ropf.begin()); @@ -474,7 +474,7 @@ getFwdRateConstants(doublereal* kfwd) // copy rate coefficients into ropf const vector_fp& rf = m_kdata->m_rfn; - array_fp& ropf = m_kdata->m_ropf; + vector_fp& ropf = m_kdata->m_ropf; copy(rf.begin(), rf.end(), ropf.begin()); diff --git a/src/kinetics/GRI_30_Kinetics.cpp b/src/kinetics/GRI_30_Kinetics.cpp index ad7e26ede..e03f76573 100644 --- a/src/kinetics/GRI_30_Kinetics.cpp +++ b/src/kinetics/GRI_30_Kinetics.cpp @@ -72,8 +72,8 @@ void GRI_30_Kinetics::gri30_updateROP() const vector_fp& rf = m_kdata->m_rfn; const vector_fp& rkc = m_kdata->m_rkcn; - array_fp& ropf = m_kdata->m_ropf; - array_fp& ropnet = m_kdata->m_ropnet; + vector_fp& ropf = m_kdata->m_ropf; + vector_fp& ropnet = m_kdata->m_ropnet; copy(rf.begin(), rf.end(), ropf.begin()); m_3b_concm.multiply(&ropf[0], &m_kdata->concm_3b_values[0]); diff --git a/src/kinetics/GasKinetics.cpp b/src/kinetics/GasKinetics.cpp index f260cffa9..48b45bb57 100644 --- a/src/kinetics/GasKinetics.cpp +++ b/src/kinetics/GasKinetics.cpp @@ -499,13 +499,13 @@ void GasKinetics::getDestructionRates(doublereal* ddot) void GasKinetics::processFalloffReactions() { const vector_fp& fc = m_kdata->concm_falloff_values; - const array_fp& m_rf_low = m_kdata->m_rfn_low; - const array_fp& m_rf_high = m_kdata->m_rfn_high; + const vector_fp& m_rf_low = m_kdata->m_rfn_low; + const vector_fp& m_rf_high = m_kdata->m_rfn_high; // use m_ropr for temporary storage of reduced pressure - array_fp& pr = m_kdata->m_ropr; + vector_fp& pr = m_kdata->m_ropr; - array_fp& ropf = m_kdata->m_ropf; + vector_fp& ropf = m_kdata->m_ropf; for (size_t i = 0; i < m_nfall; i++) { pr[i] = fc[i] * m_rf_low[i] / m_rf_high[i]; @@ -536,9 +536,9 @@ void GasKinetics::updateROP() const vector_fp& rf = m_kdata->m_rfn; const vector_fp& m_rkc = m_kdata->m_rkcn; - array_fp& ropf = m_kdata->m_ropf; - array_fp& ropr = m_kdata->m_ropr; - array_fp& ropnet = m_kdata->m_ropnet; + vector_fp& ropf = m_kdata->m_ropf; + vector_fp& ropr = m_kdata->m_ropr; + vector_fp& ropnet = m_kdata->m_ropnet; // copy rate coefficients into ropf copy(rf.begin(), rf.end(), ropf.begin()); @@ -595,7 +595,7 @@ getFwdRateConstants(doublereal* kfwd) // copy rate coefficients into ropf const vector_fp& rf = m_kdata->m_rfn; - array_fp& ropf = m_kdata->m_ropf; + vector_fp& ropf = m_kdata->m_ropf; copy(rf.begin(), rf.end(), ropf.begin()); // multiply ropf by enhanced 3b conc for all 3b rxns diff --git a/src/kinetics/InterfaceKinetics.cpp b/src/kinetics/InterfaceKinetics.cpp index f7c97b43a..5daa335ff 100644 --- a/src/kinetics/InterfaceKinetics.cpp +++ b/src/kinetics/InterfaceKinetics.cpp @@ -698,9 +698,9 @@ void InterfaceKinetics::updateROP() const vector_fp& rf = m_kdata->m_rfn; const vector_fp& m_rkc = m_kdata->m_rkcn; - array_fp& ropf = m_kdata->m_ropf; - array_fp& ropr = m_kdata->m_ropr; - array_fp& ropnet = m_kdata->m_ropnet; + vector_fp& ropf = m_kdata->m_ropf; + vector_fp& ropr = m_kdata->m_ropr; + vector_fp& ropnet = m_kdata->m_ropnet; // copy rate coefficients into ropf copy(rf.begin(), rf.end(), ropf.begin()); @@ -804,9 +804,9 @@ InterfaceKinetics::adjustRatesForIntermediatePhases() { doublereal sFac = 1.0; - array_fp& ropf = m_kdata->m_ropf; - array_fp& ropr = m_kdata->m_ropr; - array_fp& ropnet = m_kdata->m_ropnet; + vector_fp& ropf = m_kdata->m_ropf; + vector_fp& ropr = m_kdata->m_ropr; + vector_fp& ropnet = m_kdata->m_ropnet; getCreatingRates(DATA_PTR(m_speciestmpP)); getDestructionRates(DATA_PTR(m_speciestmpD)); diff --git a/src/thermo/ConstDensityThermo.cpp b/src/thermo/ConstDensityThermo.cpp index a32594495..7f9c96c23 100644 --- a/src/thermo/ConstDensityThermo.cpp +++ b/src/thermo/ConstDensityThermo.cpp @@ -138,7 +138,7 @@ void ConstDensityThermo::getChemPotentials(doublereal* mu) const molarDensity(); doublereal xx; doublereal rt = temperature() * GasConstant; - const array_fp& g_RT = gibbs_RT(); + const vector_fp& g_RT = gibbs_RT(); for (size_t k = 0; k < m_kk; k++) { xx = std::max(SmallNumber, moleFraction(k)); mu[k] = rt*(g_RT[k] + log(xx)) + vdp; diff --git a/src/thermo/Constituents.cpp b/src/thermo/Constituents.cpp index 1d6109876..9645276ac 100644 --- a/src/thermo/Constituents.cpp +++ b/src/thermo/Constituents.cpp @@ -260,7 +260,7 @@ doublereal Constituents::molecularWeight(size_t k) const * * units = kg / kmol. */ -const array_fp& Constituents::molecularWeights() const +const vector_fp& Constituents::molecularWeights() const { return m_weight; } diff --git a/src/thermo/IdealGasPhase.cpp b/src/thermo/IdealGasPhase.cpp index 676991497..8d56617b9 100644 --- a/src/thermo/IdealGasPhase.cpp +++ b/src/thermo/IdealGasPhase.cpp @@ -197,7 +197,7 @@ void IdealGasPhase::getActivityCoefficients(doublereal* ac) const */ void IdealGasPhase::getStandardChemPotentials(doublereal* muStar) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); scale(gibbsrt.begin(), gibbsrt.end(), muStar, _RT()); double tmp = log(pressure() /m_spthermo->refPressure()); tmp *= GasConstant * temperature(); @@ -214,7 +214,7 @@ void IdealGasPhase::getChemPotentials(doublereal* mu) const //doublereal logp = log(pressure()/m_spthermo->refPressure()); doublereal xx; doublereal rt = temperature() * GasConstant; - //const array_fp& g_RT = gibbs_RT_ref(); + //const vector_fp& g_RT = gibbs_RT_ref(); for (size_t k = 0; k < m_kk; k++) { xx = std::max(SmallNumber, moleFraction(k)); mu[k] += rt*(log(xx)); @@ -227,7 +227,7 @@ void IdealGasPhase::getChemPotentials(doublereal* mu) const */ void IdealGasPhase::getPartialMolarEnthalpies(doublereal* hbar) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); doublereal rt = GasConstant * temperature(); scale(_h.begin(), _h.end(), hbar, rt); } @@ -238,7 +238,7 @@ void IdealGasPhase::getPartialMolarEnthalpies(doublereal* hbar) const */ void IdealGasPhase::getPartialMolarEntropies(doublereal* sbar) const { - const array_fp& _s = entropy_R_ref(); + const vector_fp& _s = entropy_R_ref(); doublereal r = GasConstant; scale(_s.begin(), _s.end(), sbar, r); doublereal logp = log(pressure()/m_spthermo->refPressure()); @@ -254,7 +254,7 @@ void IdealGasPhase::getPartialMolarEntropies(doublereal* sbar) const */ void IdealGasPhase::getPartialMolarIntEnergies(doublereal* ubar) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); doublereal rt = GasConstant * temperature(); for (size_t k = 0; k < m_kk; k++) { ubar[k] = rt * (_h[k] - 1.0); @@ -266,7 +266,7 @@ void IdealGasPhase::getPartialMolarIntEnergies(doublereal* ubar) const */ void IdealGasPhase::getPartialMolarCp(doublereal* cpbar) const { - const array_fp& _cp = cp_R_ref(); + const vector_fp& _cp = cp_R_ref(); scale(_cp.begin(), _cp.end(), cpbar, GasConstant); } @@ -291,7 +291,7 @@ void IdealGasPhase::getPartialMolarVolumes(doublereal* vbar) const */ void IdealGasPhase::getEnthalpy_RT(doublereal* hrt) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); copy(_h.begin(), _h.end(), hrt); } @@ -302,7 +302,7 @@ void IdealGasPhase::getEnthalpy_RT(doublereal* hrt) const */ void IdealGasPhase::getEntropy_R(doublereal* sr) const { - const array_fp& _s = entropy_R_ref(); + const vector_fp& _s = entropy_R_ref(); copy(_s.begin(), _s.end(), sr); double tmp = log(pressure() /m_spthermo->refPressure()); for (size_t k = 0; k < m_kk; k++) { @@ -316,7 +316,7 @@ void IdealGasPhase::getEntropy_R(doublereal* sr) const */ void IdealGasPhase::getGibbs_RT(doublereal* grt) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); copy(gibbsrt.begin(), gibbsrt.end(), grt); double tmp = log(pressure() /m_spthermo->refPressure()); for (size_t k = 0; k < m_kk; k++) { @@ -331,7 +331,7 @@ void IdealGasPhase::getGibbs_RT(doublereal* grt) const */ void IdealGasPhase::getPureGibbs(doublereal* gpure) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); scale(gibbsrt.begin(), gibbsrt.end(), gpure, _RT()); double tmp = log(pressure() /m_spthermo->refPressure()); tmp *= _RT(); @@ -347,7 +347,7 @@ void IdealGasPhase::getPureGibbs(doublereal* gpure) const */ void IdealGasPhase::getIntEnergy_RT(doublereal* urt) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); for (size_t k = 0; k < m_kk; k++) { urt[k] = _h[k] - 1.0; } @@ -360,7 +360,7 @@ void IdealGasPhase::getIntEnergy_RT(doublereal* urt) const */ void IdealGasPhase::getCp_R(doublereal* cpr) const { - const array_fp& _cpr = cp_R_ref(); + const vector_fp& _cpr = cp_R_ref(); copy(_cpr.begin(), _cpr.end(), cpr); } @@ -389,7 +389,7 @@ void IdealGasPhase::getStandardVolumes(doublereal* vol) const */ void IdealGasPhase::getEnthalpy_RT_ref(doublereal* hrt) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); copy(_h.begin(), _h.end(), hrt); } @@ -400,7 +400,7 @@ void IdealGasPhase::getEnthalpy_RT_ref(doublereal* hrt) const */ void IdealGasPhase::getGibbs_RT_ref(doublereal* grt) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); copy(gibbsrt.begin(), gibbsrt.end(), grt); } @@ -412,7 +412,7 @@ void IdealGasPhase::getGibbs_RT_ref(doublereal* grt) const */ void IdealGasPhase::getGibbs_ref(doublereal* g) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); scale(gibbsrt.begin(), gibbsrt.end(), g, _RT()); } @@ -423,7 +423,7 @@ void IdealGasPhase::getGibbs_ref(doublereal* g) const */ void IdealGasPhase::getEntropy_R_ref(doublereal* er) const { - const array_fp& _s = entropy_R_ref(); + const vector_fp& _s = entropy_R_ref(); copy(_s.begin(), _s.end(), er); } @@ -434,7 +434,7 @@ void IdealGasPhase::getEntropy_R_ref(doublereal* er) const */ void IdealGasPhase::getIntEnergy_RT_ref(doublereal* urt) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); for (size_t k = 0; k < m_kk; k++) { urt[k] = _h[k] - 1.0; } @@ -447,7 +447,7 @@ void IdealGasPhase::getIntEnergy_RT_ref(doublereal* urt) const */ void IdealGasPhase::getCp_R_ref(doublereal* cprt) const { - const array_fp& _cpr = cp_R_ref(); + const vector_fp& _cpr = cp_R_ref(); copy(_cpr.begin(), _cpr.end(), cprt); } @@ -494,7 +494,7 @@ void IdealGasPhase::initThermo() void IdealGasPhase::setToEquilState(const doublereal* mu_RT) { double tmp, tmp2; - const array_fp& grt = gibbs_RT_ref(); + const vector_fp& grt = gibbs_RT_ref(); /* * Within the method, we protect against inf results if the diff --git a/src/thermo/IdealSolidSolnPhase.cpp b/src/thermo/IdealSolidSolnPhase.cpp index f3a1a110f..0227644c6 100644 --- a/src/thermo/IdealSolidSolnPhase.cpp +++ b/src/thermo/IdealSolidSolnPhase.cpp @@ -656,7 +656,7 @@ getChemPotentials(doublereal* mu) const doublereal delta_p = m_Pcurrent - m_Pref; doublereal xx; doublereal RT = temperature() * GasConstant; - const array_fp& g_RT = gibbs_RT_ref(); + const vector_fp& g_RT = gibbs_RT_ref(); for (size_t k = 0; k < m_kk; k++) { xx = std::max(SmallNumber, moleFraction(k)); mu[k] = RT * (g_RT[k] + log(xx)) @@ -687,7 +687,7 @@ getChemPotentials_RT(doublereal* mu) const doublereal RT = temperature() * GasConstant; doublereal delta_pdRT = (m_Pcurrent - m_Pref) / RT; doublereal xx; - const array_fp& g_RT = gibbs_RT_ref(); + const vector_fp& g_RT = gibbs_RT_ref(); for (size_t k = 0; k < m_kk; k++) { xx = std::max(SmallNumber, moleFraction(k)); mu[k] = (g_RT[k] + log(xx)) @@ -716,7 +716,7 @@ getChemPotentials_RT(doublereal* mu) const */ void IdealSolidSolnPhase::getPartialMolarEnthalpies(doublereal* hbar) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); doublereal rt = GasConstant * temperature(); scale(_h.begin(), _h.end(), hbar, rt); } @@ -741,7 +741,7 @@ void IdealSolidSolnPhase::getPartialMolarEnthalpies(doublereal* hbar) const void IdealSolidSolnPhase:: getPartialMolarEntropies(doublereal* sbar) const { - const array_fp& _s = entropy_R_ref(); + const vector_fp& _s = entropy_R_ref(); doublereal r = GasConstant; doublereal xx; for (size_t k = 0; k < m_kk; k++) { @@ -806,7 +806,7 @@ getPartialMolarVolumes(doublereal* vbar) const void IdealSolidSolnPhase:: getPureGibbs(doublereal* gpure) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); doublereal RT = _RT(); const doublereal* const gk = DATA_PTR(gibbsrt); doublereal delta_p = (m_Pcurrent - m_Pref); @@ -833,7 +833,7 @@ getPureGibbs(doublereal* gpure) const void IdealSolidSolnPhase:: getGibbs_RT(doublereal* grt) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); doublereal RT = _RT(); const doublereal* const gk = DATA_PTR(gibbsrt); doublereal delta_prt = (m_Pcurrent - m_Pref)/ RT; @@ -860,7 +860,7 @@ getGibbs_RT(doublereal* grt) const void IdealSolidSolnPhase:: getEnthalpy_RT(doublereal* hrt) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); doublereal delta_prt = ((m_Pcurrent - m_Pref) / (GasConstant * temperature())); for (size_t k = 0; k < m_kk; k++) { @@ -882,7 +882,7 @@ getEnthalpy_RT(doublereal* hrt) const */ void IdealSolidSolnPhase::getEntropy_R(doublereal* sr) const { - const array_fp& _s = entropy_R_ref(); + const vector_fp& _s = entropy_R_ref(); copy(_s.begin(), _s.end(), sr); } @@ -900,7 +900,7 @@ void IdealSolidSolnPhase::getEntropy_R(doublereal* sr) const */ void IdealSolidSolnPhase::getIntEnergy_RT(doublereal* urt) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); doublereal prefrt = m_Pref / (GasConstant * temperature()); for (size_t k = 0; k < m_kk; k++) { urt[k] = _h[k] - prefrt * m_speciesMolarVolume[k]; @@ -925,7 +925,7 @@ void IdealSolidSolnPhase::getIntEnergy_RT(doublereal* urt) const */ void IdealSolidSolnPhase::getCp_R(doublereal* cpr) const { - const array_fp& _cpr = cp_R_ref(); + const vector_fp& _cpr = cp_R_ref(); copy(_cpr.begin(), _cpr.end(), cpr); } @@ -996,7 +996,7 @@ void IdealSolidSolnPhase::getGibbs_ref(doublereal* g) const */ void IdealSolidSolnPhase::getIntEnergy_RT_ref(doublereal* urt) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); doublereal prefrt = m_Pref / (GasConstant * temperature()); for (size_t k = 0; k < m_kk; k++) { urt[k] = _h[k] - prefrt * m_speciesMolarVolume[k]; @@ -1038,7 +1038,7 @@ void IdealSolidSolnPhase::getCp_R_ref(doublereal* cpr) const * to see if a recalculation of the reference thermodynamics * functions needs to be done. */ -const array_fp& IdealSolidSolnPhase::enthalpy_RT_ref() const +const vector_fp& IdealSolidSolnPhase::enthalpy_RT_ref() const { _updateThermo(); return m_h0_RT; @@ -1051,7 +1051,7 @@ const array_fp& IdealSolidSolnPhase::enthalpy_RT_ref() const * to see if a recalculation of the reference thermodynamics * functions needs to be done. */ -const array_fp& IdealSolidSolnPhase::expGibbs_RT_ref() const +const vector_fp& IdealSolidSolnPhase::expGibbs_RT_ref() const { _updateThermo(); for (size_t k = 0; k != m_kk; k++) { @@ -1067,7 +1067,7 @@ const array_fp& IdealSolidSolnPhase::expGibbs_RT_ref() const * to see if a recalculation of the reference thermodynamics * functions needs to be done. */ -const array_fp& IdealSolidSolnPhase::entropy_R_ref() const +const vector_fp& IdealSolidSolnPhase::entropy_R_ref() const { _updateThermo(); return m_s0_R; @@ -1365,7 +1365,7 @@ initLengths() void IdealSolidSolnPhase:: setToEquilState(const doublereal* lambda_RT) { - const array_fp& grt = gibbs_RT_ref(); + const vector_fp& grt = gibbs_RT_ref(); // set the pressure and composition to be consistent with // the temperature, diff --git a/src/thermo/IdealSolnGasVPSS.cpp b/src/thermo/IdealSolnGasVPSS.cpp index 1cbcd604a..f713b19de 100644 --- a/src/thermo/IdealSolnGasVPSS.cpp +++ b/src/thermo/IdealSolnGasVPSS.cpp @@ -432,7 +432,7 @@ void IdealSolnGasVPSS::setToEquilState(const doublereal* mu_RT) { double tmp, tmp2; updateStandardStateThermo(); - const array_fp& grt = m_VPSS_ptr->Gibbs_RT_ref(); + const vector_fp& grt = m_VPSS_ptr->Gibbs_RT_ref(); /* * Within the method, we protect against inf results if the diff --git a/src/thermo/LatticePhase.cpp b/src/thermo/LatticePhase.cpp index 3781ccb28..d86b774c4 100644 --- a/src/thermo/LatticePhase.cpp +++ b/src/thermo/LatticePhase.cpp @@ -309,7 +309,7 @@ void LatticePhase::getChemPotentials(doublereal* mu) const doublereal delta_p = m_Pcurrent - m_Pref; doublereal xx; doublereal RT = temperature() * GasConstant; - const array_fp& g_RT = gibbs_RT_ref(); + const vector_fp& g_RT = gibbs_RT_ref(); for (size_t k = 0; k < m_kk; k++) { xx = std::max(SmallNumber, moleFraction(k)); mu[k] = RT * (g_RT[k] + log(xx)) @@ -320,14 +320,14 @@ void LatticePhase::getChemPotentials(doublereal* mu) const //==================================================================================================================== void LatticePhase::getPartialMolarEnthalpies(doublereal* hbar) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); doublereal rt = GasConstant * temperature(); scale(_h.begin(), _h.end(), hbar, rt); } //==================================================================================================================== void LatticePhase::getPartialMolarEntropies(doublereal* sbar) const { - const array_fp& _s = entropy_R_ref(); + const vector_fp& _s = entropy_R_ref(); doublereal r = GasConstant; doublereal xx; for (size_t k = 0; k < m_kk; k++) { @@ -351,13 +351,13 @@ void LatticePhase::getPartialMolarVolumes(doublereal* vbar) const //==================================================================================================================== void LatticePhase::getStandardChemPotentials(doublereal* mu0) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); scale(gibbsrt.begin(), gibbsrt.end(), mu0, _RT()); } //==================================================================================================================== void LatticePhase::getPureGibbs(doublereal* gpure) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); doublereal delta_p = (m_Pcurrent - m_Pref); double RT = GasConstant * temperature(); for (size_t k = 0; k < m_kk; k++) { @@ -367,7 +367,7 @@ void LatticePhase::getPureGibbs(doublereal* gpure) const //==================================================================================================================== void LatticePhase::getEnthalpy_RT(doublereal* hrt) const { - const array_fp& _h = enthalpy_RT_ref(); + const vector_fp& _h = enthalpy_RT_ref(); doublereal delta_prt = ((m_Pcurrent - m_Pref) / (GasConstant * temperature())); for (size_t k = 0; k < m_kk; k++) { hrt[k] = _h[k] + delta_prt * m_speciesMolarVolume[k]; @@ -376,13 +376,13 @@ void LatticePhase::getEnthalpy_RT(doublereal* hrt) const //==================================================================================================================== void LatticePhase::getEntropy_R(doublereal* sr) const { - const array_fp& _s = entropy_R_ref(); + const vector_fp& _s = entropy_R_ref(); std::copy(_s.begin(), _s.end(), sr); } //==================================================================================================================== void LatticePhase::getGibbs_RT(doublereal* grt) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); doublereal RT = _RT(); doublereal delta_prt = (m_Pcurrent - m_Pref)/ RT; for (size_t k = 0; k < m_kk; k++) { @@ -401,7 +401,7 @@ void LatticePhase::getGibbs_ref(doublereal* g) const void LatticePhase::getCp_R(doublereal* cpr) const { - const array_fp& _cpr = cp_R_ref(); + const vector_fp& _cpr = cp_R_ref(); std::copy(_cpr.begin(), _cpr.end(), cpr); } //=================================================================================================================== @@ -416,7 +416,7 @@ void LatticePhase::getStandardVolumes(doublereal* vbar) const * @return Output vector of nondimensional reference state Enthalpies of the species. * Length: m_kk */ -const array_fp& LatticePhase::enthalpy_RT_ref() const +const vector_fp& LatticePhase::enthalpy_RT_ref() const { _updateThermo(); return m_h0_RT; @@ -427,7 +427,7 @@ const array_fp& LatticePhase::enthalpy_RT_ref() const * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ -const array_fp& LatticePhase::gibbs_RT_ref() const +const vector_fp& LatticePhase::gibbs_RT_ref() const { _updateThermo(); return m_g0_RT; @@ -446,7 +446,7 @@ void LatticePhase::getGibbs_RT_ref(doublereal* grt) const * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ -const array_fp& LatticePhase::entropy_R_ref() const +const vector_fp& LatticePhase::entropy_R_ref() const { _updateThermo(); return m_s0_R; @@ -457,7 +457,7 @@ const array_fp& LatticePhase::entropy_R_ref() const * This function is part of the layer that checks/recalculates the reference * state thermo functions. */ -const array_fp& LatticePhase::cp_R_ref() const +const vector_fp& LatticePhase::cp_R_ref() const { _updateThermo(); return m_cp0_R; diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index 47e1c5341..a4a7f8264 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -394,7 +394,7 @@ void MixtureFugacityTP::getGibbs_RT_ref(doublereal* grt) const */ void MixtureFugacityTP::getGibbs_ref(doublereal* g) const { - const array_fp& gibbsrt = gibbs_RT_ref(); + const vector_fp& gibbsrt = gibbs_RT_ref(); scale(gibbsrt.begin(), gibbsrt.end(), g, _RT()); } //==================================================================================================================== diff --git a/src/thermo/MolalityVPSSTP.cpp b/src/thermo/MolalityVPSSTP.cpp index b23a10698..3bbca08f9 100644 --- a/src/thermo/MolalityVPSSTP.cpp +++ b/src/thermo/MolalityVPSSTP.cpp @@ -853,12 +853,12 @@ std::string MolalityVPSSTP::report(bool show_thermo) const s += p; size_t kk = nSpecies(); - array_fp x(kk); - array_fp molal(kk); - array_fp mu(kk); - array_fp muss(kk); - array_fp acMolal(kk); - array_fp actMolal(kk); + vector_fp x(kk); + vector_fp molal(kk); + vector_fp mu(kk); + vector_fp muss(kk); + vector_fp acMolal(kk); + vector_fp actMolal(kk); getMoleFractions(&x[0]); getMolalities(&molal[0]); getChemPotentials(&mu[0]); diff --git a/src/thermo/MolarityIonicVPSSTP.cpp b/src/thermo/MolarityIonicVPSSTP.cpp index 43d7a9a01..2aaaa15aa 100644 --- a/src/thermo/MolarityIonicVPSSTP.cpp +++ b/src/thermo/MolarityIonicVPSSTP.cpp @@ -780,12 +780,12 @@ std::string MolarityIonicVPSSTP::report(bool show_thermo) const s += p; size_t kk = nSpecies(); - array_fp x(kk); - array_fp molal(kk); - array_fp mu(kk); - array_fp muss(kk); - array_fp acMolal(kk); - array_fp actMolal(kk); + vector_fp x(kk); + vector_fp molal(kk); + vector_fp mu(kk); + vector_fp muss(kk); + vector_fp acMolal(kk); + vector_fp actMolal(kk); getMoleFractions(&x[0]); getChemPotentials(&mu[0]); diff --git a/src/thermo/Nasa9Poly1.cpp b/src/thermo/Nasa9Poly1.cpp index 445ebe458..a6bc4f0f8 100644 --- a/src/thermo/Nasa9Poly1.cpp +++ b/src/thermo/Nasa9Poly1.cpp @@ -64,7 +64,7 @@ namespace Cantera //! Empty constructor Nasa9Poly1::Nasa9Poly1() : m_lowT(0.0), m_highT(0.0), - m_Pref(1.0E5), m_index(0), m_coeff(array_fp(9)) {} + m_Pref(1.0E5), m_index(0), m_coeff(vector_fp(9)) {} // constructor used in templated instantiations @@ -83,7 +83,7 @@ Nasa9Poly1::Nasa9Poly1(size_t n, doublereal tlow, doublereal thigh, m_highT(thigh), m_Pref(pref), m_index(n), - m_coeff(array_fp(9)) + m_coeff(vector_fp(9)) { std::copy(coeffs, coeffs + 9, m_coeff.begin()); } @@ -97,7 +97,7 @@ Nasa9Poly1::Nasa9Poly1(const Nasa9Poly1& b) : m_highT(b.m_highT), m_Pref(b.m_Pref), m_index(b.m_index), - m_coeff(array_fp(9)) + m_coeff(vector_fp(9)) { std::copy(b.m_coeff.begin(), b.m_coeff.begin() + 9, diff --git a/src/thermo/NasaPoly2.h b/src/thermo/NasaPoly2.h index bd44c6036..5991cae02 100644 --- a/src/thermo/NasaPoly2.h +++ b/src/thermo/NasaPoly2.h @@ -62,7 +62,7 @@ public: mnp_low(0), mnp_high(0), m_index(0), - m_coeff(array_fp(15)) { + m_coeff(vector_fp(15)) { } //! Full Constructor @@ -82,7 +82,7 @@ public: mnp_low(0), mnp_high(0), m_index(n), - m_coeff(array_fp(15)) { + m_coeff(vector_fp(15)) { std::copy(coeffs, coeffs + 15, m_coeff.begin()); m_midT = coeffs[0]; @@ -104,7 +104,7 @@ public: mnp_low(0), mnp_high(0), m_index(b.m_index), - m_coeff(array_fp(15)) { + m_coeff(vector_fp(15)) { std::copy(b.m_coeff.begin(), b.m_coeff.begin() + 15, @@ -321,7 +321,7 @@ protected: //! species index size_t m_index; //! array of polynomial coefficients - array_fp m_coeff; + vector_fp m_coeff; }; diff --git a/src/thermo/Phase.cpp b/src/thermo/Phase.cpp index a33524ed4..dc89c13a4 100644 --- a/src/thermo/Phase.cpp +++ b/src/thermo/Phase.cpp @@ -350,7 +350,7 @@ void Phase::setState_RY(doublereal rho, doublereal* y) */ void Phase::getMolecularWeights(vector_fp& weights) const { - const array_fp& mw = Constituents::molecularWeights(); + const vector_fp& mw = Constituents::molecularWeights(); if (weights.size() < mw.size()) { weights.resize(mw.size()); } @@ -363,7 +363,7 @@ void Phase::getMolecularWeights(vector_fp& weights) const */ void Phase::getMolecularWeights(int iwt, doublereal* weights) const { - const array_fp& mw = Constituents::molecularWeights(); + const vector_fp& mw = Constituents::molecularWeights(); copy(mw.begin(), mw.end(), weights); } @@ -372,7 +372,7 @@ void Phase::getMolecularWeights(int iwt, doublereal* weights) const */ void Phase::getMolecularWeights(doublereal* weights) const { - const array_fp& mw = Constituents::molecularWeights(); + const vector_fp& mw = Constituents::molecularWeights(); copy(mw.begin(), mw.end(), weights); } @@ -380,7 +380,7 @@ void Phase::getMolecularWeights(doublereal* weights) const * Return a const reference to the internal vector of * molecular weights. */ -const array_fp& Phase::molecularWeights() const +const vector_fp& Phase::molecularWeights() const { return Constituents::molecularWeights(); } diff --git a/src/thermo/PseudoBinaryVPSSTP.cpp b/src/thermo/PseudoBinaryVPSSTP.cpp index 169d4a159..6098bb97d 100644 --- a/src/thermo/PseudoBinaryVPSSTP.cpp +++ b/src/thermo/PseudoBinaryVPSSTP.cpp @@ -321,12 +321,12 @@ std::string PseudoBinaryVPSSTP::report(bool show_thermo) const s += p; size_t kk = nSpecies(); - array_fp x(kk); - array_fp molal(kk); - array_fp mu(kk); - array_fp muss(kk); - array_fp acMolal(kk); - array_fp actMolal(kk); + vector_fp x(kk); + vector_fp molal(kk); + vector_fp mu(kk); + vector_fp muss(kk); + vector_fp acMolal(kk); + vector_fp actMolal(kk); getMoleFractions(&x[0]); getChemPotentials(&mu[0]); diff --git a/src/thermo/PureFluidPhase.cpp b/src/thermo/PureFluidPhase.cpp index 75bf55374..b5e10a7f4 100644 --- a/src/thermo/PureFluidPhase.cpp +++ b/src/thermo/PureFluidPhase.cpp @@ -620,9 +620,9 @@ std::string PureFluidPhase::report(bool show_thermo) const } size_t kk = nSpecies(); - array_fp x(kk); - array_fp y(kk); - array_fp mu(kk); + vector_fp x(kk); + vector_fp y(kk); + vector_fp mu(kk); getMoleFractions(&x[0]); getMassFractions(&y[0]); getChemPotentials(&mu[0]); diff --git a/src/thermo/ShomatePoly.h b/src/thermo/ShomatePoly.h index 126714eb5..4be98d3e7 100644 --- a/src/thermo/ShomatePoly.h +++ b/src/thermo/ShomatePoly.h @@ -105,7 +105,7 @@ public: m_lowT(b.m_lowT), m_highT(b.m_highT), m_Pref(b.m_Pref), - m_coeff(array_fp(7)), + m_coeff(vector_fp(7)), m_index(b.m_index) { std::copy(b.m_coeff.begin(), b.m_coeff.begin() + 7, @@ -356,7 +356,7 @@ protected: //! Reference pressure (Pa) doublereal m_Pref; //! Array of coeffcients - array_fp m_coeff; + vector_fp m_coeff; //! Species Index size_t m_index; @@ -463,7 +463,7 @@ public: m_Pref(b.m_Pref), msp_low(0), msp_high(0), - m_coeff(array_fp(15)), + m_coeff(vector_fp(15)), m_index(b.m_index) { std::copy(b.m_coeff.begin(), b.m_coeff.begin() + 15, @@ -696,7 +696,7 @@ protected: //! Pointer to the Shomate polynomial for the high temperature region. ShomatePoly* msp_high; //! Array of the original coefficients. - array_fp m_coeff; + vector_fp m_coeff; //! Species index size_t m_index; }; diff --git a/src/thermo/SpeciesThermoFactory.cpp b/src/thermo/SpeciesThermoFactory.cpp index a7d18f06c..30acb28bb 100644 --- a/src/thermo/SpeciesThermoFactory.cpp +++ b/src/thermo/SpeciesThermoFactory.cpp @@ -371,7 +371,7 @@ static void installNasaThermoFromXML(std::string speciesName, // The NasaThermo species property manager expects the // coefficients in a different order, so rearrange them. - array_fp c(15); + vector_fp c(15); c[0] = tmid; c[1] = c0[5]; @@ -445,7 +445,7 @@ static void installNasa96ThermoFromXML(std::string speciesName, SpeciesThermo& s throw CanteraError("installNasaThermo", "non-continuous temperature ranges."); } - array_fp c(15); + vector_fp c(15); c[0] = tmid; c[1] = c0[5]; c[2] = c0[6]; @@ -537,7 +537,7 @@ static void installMinEQ3asShomateThermoFromXML(std::string speciesName, const XML_Node* MinEQ3node) { - array_fp coef(15), c0(7, 0.0); + vector_fp coef(15), c0(7, 0.0); std::string astring = (*MinEQ3node)["Tmin"]; doublereal tmin0 = strSItoDbl(astring); astring = (*MinEQ3node)["Tmax"]; @@ -668,7 +668,7 @@ static void installShomateThermoFromXML(std::string speciesName, SpeciesThermo& throw CanteraError("installShomateThermoFromXML", "non-continuous temperature ranges."); } - array_fp c(15); + vector_fp c(15); c[0] = tmid; copy(c0.begin(), c0.begin()+7, c.begin() + 1); copy(c1.begin(), c1.begin()+7, c.begin() + 8); diff --git a/src/thermo/State.cpp b/src/thermo/State.cpp index 2d0a88901..f21265fb5 100644 --- a/src/thermo/State.cpp +++ b/src/thermo/State.cpp @@ -263,7 +263,7 @@ void State::setMolarDensity(const doublereal molarDensity) m_dens = molarDensity*meanMolecularWeight(); } -void State::init(const array_fp& mw) +void State::init(const vector_fp& mw) { m_kk = mw.size(); m_molwts.resize(m_kk); diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp index 036c6fc63..be47fbe5e 100644 --- a/src/thermo/ThermoPhase.cpp +++ b/src/thermo/ThermoPhase.cpp @@ -1294,9 +1294,9 @@ std::string ThermoPhase::report(bool show_thermo) const } size_t kk = nSpecies(); - array_fp x(kk); - array_fp y(kk); - array_fp mu(kk); + vector_fp x(kk); + vector_fp y(kk); + vector_fp mu(kk); getMoleFractions(&x[0]); getMassFractions(&y[0]); getChemPotentials(&mu[0]); diff --git a/src/transport/AqueousTransport.cpp b/src/transport/AqueousTransport.cpp index 2d7bc322d..12bb992ac 100644 --- a/src/transport/AqueousTransport.cpp +++ b/src/transport/AqueousTransport.cpp @@ -364,7 +364,7 @@ void AqueousTransport::getSpeciesFluxesExt(size_t ldf, doublereal* const fluxes) getMixDiffCoeffs(DATA_PTR(m_spwork)); - const array_fp& mw = m_thermo->molecularWeights(); + const vector_fp& mw = m_thermo->molecularWeights(); const doublereal* y = m_thermo->massFractions(); doublereal rhon = m_thermo->molarDensity(); // Unroll wrt ndim diff --git a/src/transport/LiquidTranInteraction.cpp b/src/transport/LiquidTranInteraction.cpp index bcb6f0f0d..bb1eedddc 100644 --- a/src/transport/LiquidTranInteraction.cpp +++ b/src/transport/LiquidTranInteraction.cpp @@ -820,8 +820,8 @@ void LTI_StokesEinstein::getMatrixTransProp(DenseMatrix& mat, doublereal* specie size_t nsp = m_thermo->nSpecies(); doublereal temp = m_thermo->temperature(); - array_fp viscSpec(nsp); - array_fp radiusSpec(nsp); + vector_fp viscSpec(nsp); + vector_fp radiusSpec(nsp); for (size_t k = 0; k < nsp; k++) { viscSpec[k] = m_viscosity[k]->getSpeciesTransProp() ; diff --git a/src/transport/MixTransport.cpp b/src/transport/MixTransport.cpp index e6dc17bd6..6f974bef0 100644 --- a/src/transport/MixTransport.cpp +++ b/src/transport/MixTransport.cpp @@ -420,7 +420,7 @@ void MixTransport::getSpeciesFluxes(size_t ndim, getMixDiffCoeffs(DATA_PTR(m_spwork)); - const array_fp& mw = m_thermo->molecularWeights(); + const vector_fp& mw = m_thermo->molecularWeights(); const doublereal* y = m_thermo->massFractions(); doublereal rhon = m_thermo->molarDensity(); diff --git a/src/transport/MultiTransport.cpp b/src/transport/MultiTransport.cpp index 1949b2e9e..91b8adef0 100644 --- a/src/transport/MultiTransport.cpp +++ b/src/transport/MultiTransport.cpp @@ -1040,7 +1040,7 @@ void MultiTransport::_update_thermal_T() * Chemkin has traditionally subtracted 1.5 here (SAND86-8246). * The original Dixon-Lewis paper subtracted 1.5 here. */ - const array_fp& cp = ((IdealGasPhase*)m_thermo)->cp_R_ref(); + const vector_fp& cp = ((IdealGasPhase*)m_thermo)->cp_R_ref(); for (size_t k = 0; k < m_nsp; k++) { m_cinternal[k] = cp[k] - 2.5; } diff --git a/src/transport/SimpleTransport.cpp b/src/transport/SimpleTransport.cpp index 5f5a2e63a..4eaf561b2 100644 --- a/src/transport/SimpleTransport.cpp +++ b/src/transport/SimpleTransport.cpp @@ -784,7 +784,7 @@ void SimpleTransport::getSpeciesFluxesExt(size_t ldf, doublereal* fluxes) getMixDiffCoeffs(DATA_PTR(m_spwork)); - const array_fp& mw = m_thermo->molecularWeights(); + const vector_fp& mw = m_thermo->molecularWeights(); const doublereal* y = m_thermo->massFractions(); doublereal concTotal = m_thermo->molarDensity(); diff --git a/test_problems/surfSolverTest/surfaceSolver.cpp b/test_problems/surfSolverTest/surfaceSolver.cpp index 36584a98a..c9cbc7111 100644 --- a/test_problems/surfSolverTest/surfaceSolver.cpp +++ b/test_problems/surfSolverTest/surfaceSolver.cpp @@ -100,7 +100,7 @@ void printBulk(ostream& oooo, << " (kmol/m^3) (kmol/m^2/s) " << endl; double sum = 0.0; double Wsum = 0.0; - const array_fp& molecW = bulkPhaseTP->molecularWeights(); + const vector_fp& molecW = bulkPhaseTP->molecularWeights(); int nspBulk = bulkPhaseTP->nSpecies(); for (int k = 0; k < nspBulk; k++) { kstart = iKin_ptr->kineticsSpeciesIndex(k, 1); diff --git a/test_problems/surfSolverTest/surfaceSolver2.cpp b/test_problems/surfSolverTest/surfaceSolver2.cpp index 50a09cc84..9d8ed1236 100644 --- a/test_problems/surfSolverTest/surfaceSolver2.cpp +++ b/test_problems/surfSolverTest/surfaceSolver2.cpp @@ -99,7 +99,7 @@ void printBulk(ostream& oooo,ThermoPhase* bulkPhaseTP, InterfaceKinetics* iKin_p << " (kmol/m^3) (kmol/m^2/s) " << endl; double sum = 0.0; double Wsum = 0.0; - const array_fp& molecW = bulkPhaseTP->molecularWeights(); + const vector_fp& molecW = bulkPhaseTP->molecularWeights(); int nspBulk = bulkPhaseTP->nSpecies(); for (int k = 0; k < nspBulk; k++) { kstart = iKin_ptr->kineticsSpeciesIndex(k, 1);