Removed previously-deprecated array_fp typedef

This commit is contained in:
Ray Speth 2012-02-22 00:16:22 +00:00
parent 18bce3bc62
commit 437294ae00
52 changed files with 245 additions and 258 deletions

View file

@ -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<std::string, doublereal> 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<double> array_fp;
//! Vector of doubles.
typedef std::vector<double> vector_fp;
//! Vector of ints
typedef std::vector<int> array_int;
//! Vector of ints
typedef std::vector<int> 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.

View file

@ -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<size_t> m_revindex;
std::vector<std::string> m_rxneqn;
AqueousKineticsData* m_kdata;
array_fp m_conc;
array_fp m_grt;
vector_fp m_conc;
vector_fp m_grt;
private:

View file

@ -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<size_t> m_revindex;
std::vector<std::string> m_rxneqn;
GasKineticsData* m_kdata;
array_fp m_conc;
vector_fp m_conc;
void processFalloffReactions();
array_fp m_grt;
vector_fp m_grt;
private:

View file

@ -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;

View file

@ -116,7 +116,7 @@ public:
protected:
std::vector<R> m_rates;
std::vector<size_t> m_rxn;
array_fp m_const; // not used
vector_fp m_const; // not used
};

View file

@ -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<std::vector<size_t> > m_reac;
std::vector<std::vector<size_t> > m_prod;
DenseMatrix m_elatoms;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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 ------------------------------------------

View file

@ -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
/*!

View file

@ -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:

View file

@ -224,7 +224,7 @@ protected:
//! species index
size_t m_index;
//! array of polynomial coefficients
array_fp m_coeff;
vector_fp m_coeff;
};
}

View file

@ -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;
};

View file

@ -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.

View file

@ -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:
/**

View file

@ -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
/*!

View file

@ -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:

View file

@ -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:

View file

@ -278,7 +278,7 @@ private:
vector_fp m_visc;
vector_fp m_sqvisc;
array_fp m_molefracs;
vector_fp m_molefracs;
std::vector<std::vector<int> > m_poly;

View file

@ -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());

View file

@ -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]);

View file

@ -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

View file

@ -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));

View file

@ -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;

View file

@ -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;
}

View file

@ -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

View file

@ -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,

View file

@ -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

View file

@ -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;

View file

@ -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());
}
//====================================================================================================================

View file

@ -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]);

View file

@ -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]);

View file

@ -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,

View file

@ -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;
};

View file

@ -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();
}

View file

@ -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]);

View file

@ -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]);

View file

@ -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;
};

View file

@ -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);

View file

@ -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);

View file

@ -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]);

View file

@ -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

View file

@ -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() ;

View file

@ -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();

View file

@ -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;
}

View file

@ -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();

View file

@ -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);

View file

@ -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);