Removed a number of unused / redundant typedefs

This commit is contained in:
Ray Speth 2012-03-15 19:51:57 +00:00
parent 83e1996295
commit ca4212cc57
34 changed files with 76 additions and 177 deletions

View file

@ -179,24 +179,10 @@ typedef std::map<std::string, doublereal> compositionMap;
//! 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;
//! typedef for a group of species.
/*!
* A group of species is a subset of the species in a phase.
*/
typedef std::vector<size_t> group_t;
//! typedef for a vector of groups of species.
/*!
* A grouplist of species is a vector of groups.
*/
typedef std::vector<group_t> grouplist_t;
//! Typedef for a pointer to temporary work storage
typedef doublereal* workPtr;
//! typedef for a pointer to temporary work storage which is treated as constant
typedef const doublereal* const_workPtr;
//! A grouplist is a vector of groups of species
typedef std::vector<std::vector<size_t> > grouplist_t;
//! index returned by functions to indicate "no position"
const size_t npos = static_cast<size_t>(-1);
@ -204,6 +190,3 @@ const size_t npos = static_cast<size_t>(-1);
} // namespace
#endif

View file

@ -151,11 +151,6 @@ public:
class XML_Node
{
public:
//! Value_type for the lookup multimap m_childindex. This is a convenience definition
//! for manipulating the multimap
typedef std::pair<const std::string, XML_Node*> CIPair;
//! Default constructor for XML_Node, representing a tree structure
/*!
* Constructor for an XML_Node, which is a node in a tree-like structure
@ -791,7 +786,6 @@ protected:
* m_childindex[node.name()] = XML_Node *pointer
*
* This object helps to speed up searches.
* The value_type for this multimap is CIPair.
*/
std::multimap<std::string, XML_Node*> m_childindex;

View file

@ -61,18 +61,8 @@ class MultiPhase
{
public:
//! Shorthand for an index variable that can't be negative
typedef size_t index_t;
//! Shorthand for a ThermoPhase
typedef ThermoPhase phase_t;
//! shorthand for a 2D matrix
typedef DenseMatrix array_t;
//! Shorthand for a vector of pointers to ThermoPhase's
typedef std::vector<phase_t*> phase_list;
typedef size_t index_t;
//! Constructor.
/*!
@ -108,7 +98,7 @@ public:
* @param phases Vector of pointers to phases
* @param phaseMoles Vector of mole numbers in each phase (kmol)
*/
void addPhases(phase_list& phases, const vector_fp& phaseMoles);
void addPhases(std::vector<ThermoPhase*>& phases, const vector_fp& phaseMoles);
//! Add all phases present in 'mix' to this mixture.
/*!
@ -125,7 +115,7 @@ public:
* @param p pointer to the phase object
* @param moles total number of moles of all species in this phase
*/
void addPhase(phase_t* p, doublereal moles);
void addPhase(ThermoPhase* p, doublereal moles);
/// Number of elements.
size_t nElements() const {
@ -238,7 +228,7 @@ public:
*
* @return Reference to the %ThermoPhase object for the phase
*/
phase_t& phase(index_t n);
ThermoPhase& phase(index_t n);
//! Check that the specified phase index is in range
//! Throws an exception if m is greater than nPhases()
@ -624,7 +614,7 @@ private:
/**
* Vector of the ThermoPhase Pointers.
*/
std::vector<phase_t*> m_phase;
std::vector<ThermoPhase*> m_phase;
//! Global Stoichiometric Coefficient array
/*!
@ -633,7 +623,7 @@ private:
* global species index.
* The value is the number of atoms of type m in species k.
*/
array_t m_atoms;
DenseMatrix m_atoms;
/**
* Locally stored vector of mole fractions of all species

View file

@ -33,12 +33,9 @@ class MultiPhaseEquil
{
public:
typedef MultiPhase mix_t;
typedef size_t index_t;
typedef DenseMatrix matrix_t;
MultiPhaseEquil(mix_t* mix, bool start=true, int loglevel = 0);
MultiPhaseEquil(MultiPhase* mix, bool start=true, int loglevel = 0);
virtual ~MultiPhaseEquil() {}
@ -130,10 +127,10 @@ protected:
index_t m_nel, m_nsp;
index_t m_eloc;
int m_iter;
mix_t* m_mix;
MultiPhase* m_mix;
doublereal m_press, m_temp;
std::vector<size_t> m_order;
matrix_t m_N, m_A;
DenseMatrix m_N, m_A;
vector_fp m_work, m_work2, m_work3;
vector_fp m_moles, m_lastmoles, m_dxi;
vector_fp m_deltaG_RT, m_mu;

View file

@ -270,17 +270,9 @@ int vcs_Cantera_update_vprob(Cantera::MultiPhase* mphase,
class vcs_MultiPhaseEquil
{
public:
//! Shorthand for the MultiPhase mixture object used by Cantera
//! to store information about multiple phases
typedef Cantera::MultiPhase mix_t;
//! Typedef for an index variable
typedef size_t index_t;
//! Typedef for a dense 2d matrix.
typedef Cantera::DenseMatrix matrix_t;
//! Default empty constructor
vcs_MultiPhaseEquil();
@ -306,7 +298,7 @@ public:
* - 5 Print more than a table for each iteration
*
*/
vcs_MultiPhaseEquil(mix_t* mix, int printLvl);
vcs_MultiPhaseEquil(Cantera::MultiPhase* mix, int printLvl);
//! Destructor for the class
virtual ~vcs_MultiPhaseEquil();
@ -636,7 +628,7 @@ protected:
/*!
* Equilibrium solutions will be returned via this variable.
*/
mix_t* m_mix;
Cantera::MultiPhase* m_mix;
//! Print level from the VCSnonlinear package
/*!
@ -657,10 +649,7 @@ protected:
int m_printLvl;
//! Stoichiometric matrix
/*!
*
*/
matrix_t m_N;
Cantera::DenseMatrix m_N;
//! Iteration Count
int m_iter;

View file

@ -63,7 +63,7 @@ public:
* @param T Temperature [K].
* @param work storage space for intermediate results.
*/
virtual void updateTemp(doublereal T, workPtr work) const {}
virtual void updateTemp(doublereal T, doublereal* work) const {}
/**
* The falloff function. This is defined so that the
@ -84,7 +84,7 @@ public:
*
* @return Returns the value of the falloff function \f$ F \f$ defined above
*/
virtual doublereal F(doublereal pr, const_workPtr work) const =0;
virtual doublereal F(doublereal pr, const doublereal* work) const =0;
/**
* The size of the work array required.

View file

@ -86,7 +86,7 @@ public:
* @param t Temperature [K].
* @param work Work array. Must be dimensioned at least workSize().
*/
void updateTemp(doublereal t, workPtr work) {
void updateTemp(doublereal t, doublereal* work) {
int i;
for (i = 0; i < m_n; i++) {
m_falloff[i]->updateTemp(t,
@ -98,7 +98,7 @@ public:
* Given a vector of reduced pressures for each falloff reaction,
* replace each entry by the value of the falloff function.
*/
void pr_to_falloff(doublereal* values, const_workPtr work) {
void pr_to_falloff(doublereal* values, const doublereal* work) {
doublereal pr;
int i;
for (i = 0; i < m_n0; i++) {

View file

@ -132,10 +132,6 @@ class Kinetics
{
public:
//! typedef for ThermoPhase
typedef ThermoPhase thermo_t;
/**
* @name Constructors and General Information about Mechanism
*/
@ -1104,11 +1100,6 @@ private:
};
//! typedef for the kinetics base class
typedef Kinetics kinetics_t;
}
#endif

View file

@ -31,9 +31,6 @@ class Path;
class SpeciesNode
{
public:
typedef std::vector<Path*> path_list;
/// Default constructor
SpeciesNode() : number(npos), name(""), value(0.0),
visible(false), m_in(0.0), m_out(0.0) {}
@ -89,7 +86,7 @@ public:
protected:
doublereal m_in;
doublereal m_out;
path_list m_paths;
std::vector<Path*> m_paths;
};

View file

@ -34,7 +34,7 @@ public:
enhanced, dflt));
}
void update(const vector_fp& conc, doublereal ctot, workPtr work) {
void update(const vector_fp& conc, doublereal ctot, doublereal* work) {
typename std::vector<_E>::const_iterator b = m_concm.begin();
//doublereal* v = m_values.begin();
for (; b != m_concm.end(); ++b, ++work) {
@ -42,7 +42,7 @@ public:
}
}
void multiply(doublereal* output, const_workPtr work) {
void multiply(doublereal* output, const doublereal* work) {
scatter_mult(work, work + m_n,
output, m_reaction_index.begin());
}

View file

@ -92,7 +92,7 @@ void checkRxnElementBalance(Kinetics& kin,
* allowing the calling routine to skip this reaction
* and continue.
*/
bool getReagents(const XML_Node& rxn, kinetics_t& kin, int rp,
bool getReagents(const XML_Node& rxn, Kinetics& kin, int rp,
std::string default_phase,
std::vector<size_t>& spnum, vector_fp& stoich,
vector_fp& order, int rule);
@ -113,7 +113,7 @@ bool getReagents(const XML_Node& rxn, kinetics_t& kin, int rp,
*
* @ingroup kineticsmgr
*/
void getRateCoefficient(const XML_Node& kf, kinetics_t& kin,
void getRateCoefficient(const XML_Node& kf, Kinetics& kin,
ReactionData& rdata, int negA);

View file

@ -13,12 +13,6 @@
#include "cantera/base/ct_defs.h"
typedef double doublereal;
typedef int integer;
typedef int ftnlen;
//#include <vecLib/cblas.h>
// map BLAS names to names with or without a trailing underscore.
#ifndef LAPACK_FTN_TRAILING_UNDERSCORE

View file

@ -18,12 +18,8 @@
namespace Cantera
{
typedef IdealGasPhase igthermo_t;
class MultiJac;
//------------------------------------------
// constants
//------------------------------------------
@ -40,8 +36,6 @@ const int c_Mixav_Transport = 0;
const int c_Multi_Transport = 1;
const int c_Soret = 2;
//-----------------------------------------------------------
// Class StFlow
//-----------------------------------------------------------
@ -66,7 +60,7 @@ public:
/// will be used to evaluate all thermodynamic, kinetic, and transport
/// properties.
/// @param nsp Number of species.
StFlow(igthermo_t* ph = 0, size_t nsp = 1, size_t points = 1);
StFlow(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1);
/// Destructor.
virtual ~StFlow() {}
@ -81,7 +75,7 @@ public:
thermo_t& phase() {
return *m_thermo;
}
kinetics_t& kinetics() {
Kinetics& kinetics() {
return *m_kin;
}
@ -92,12 +86,12 @@ public:
* Set the thermo manager. Note that the flow equations assume
* the ideal gas equation.
*/
void setThermo(igthermo_t& th) {
void setThermo(IdealGasPhase& th) {
m_thermo = &th;
}
/// Set the kinetics manager. The kinetics manager must
void setKinetics(kinetics_t& kin) {
void setKinetics(Kinetics& kin) {
m_kin = &kin;
}
@ -474,11 +468,11 @@ protected:
size_t m_nsp;
igthermo_t* m_thermo;
kinetics_t* m_kin;
Transport* m_trans;
IdealGasPhase* m_thermo;
Kinetics* m_kin;
Transport* m_trans;
MultiJac* m_jac;
MultiJac* m_jac;
bool m_ok;
@ -514,7 +508,7 @@ private:
class AxiStagnFlow : public StFlow
{
public:
AxiStagnFlow(igthermo_t* ph = 0, size_t nsp = 1, size_t points = 1) :
AxiStagnFlow(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1) :
StFlow(ph, nsp, points) {
m_dovisc = true;
}
@ -532,7 +526,7 @@ public:
class FreeFlame : public StFlow
{
public:
FreeFlame(igthermo_t* ph = 0, size_t nsp = 1, size_t points = 1) :
FreeFlame(IdealGasPhase* ph = 0, size_t nsp = 1, size_t points = 1) :
StFlow(ph, nsp, points) {
m_dovisc = false;
setID("flame");
@ -568,8 +562,8 @@ private:
};
*/
void importSolution(size_t points, doublereal* oldSoln, igthermo_t& oldmech,
size_t size_new, doublereal* newSoln, igthermo_t& newmech);
void importSolution(size_t points, doublereal* oldSoln, IdealGasPhase& oldmech,
size_t size_new, doublereal* newSoln, IdealGasPhase& newmech);
}

View file

@ -15,11 +15,7 @@ namespace Cantera
class Crystal : public MultiPhase
{
public:
typedef LatticePhase lattice_t;
typedef vector<LatticePhase*> lattice_list;
/// Constructor. The constructor takes no arguments, since
/// phases are added using method addPhase.
Crystal() : MultiPhase() {}
@ -29,21 +25,21 @@ public:
/// phase objects.
virtual ~Crystal() {}
void addLattices(lattice_list& lattices,
void addLattices(std::vector<LatticePhase*>& lattices,
const vector_fp& latticeSiteDensity);
/// Add a phase to the mixture.
/// @param p pointer to the phase object
/// @param moles total number of moles of all species in this phase
void addLattice(lattice_t* lattice, doublereal siteDensity) {
void addLattice(LatticePhase* lattice, doublereal siteDensity) {
MultiPhase::addPhase(lattice, siteDensity);
}
/// Return a reference to phase n. The state of phase n is
/// also updated to match the state stored locally in the
/// mixture object.
lattice_t& lattice(index_t n) {
return *(lattice_t*)&phase(n);
LatticePhase& lattice(index_t n) {
return *(LatticePhase*)&phase(n);
}
protected:

View file

@ -3005,7 +3005,7 @@ private:
* n = m_kk*i + j
* m_CounterIJ[n] = counterIJ
*/
mutable array_int m_CounterIJ;
mutable vector_int m_CounterIJ;
/**
* This is elambda, MEC

View file

@ -787,8 +787,6 @@ private:
};
//! typedef for the base Phase class
typedef Phase phase_t;
}
#endif

View file

@ -1666,9 +1666,6 @@ private:
};
//! typedef for the ThermoPhase class
typedef ThermoPhase thermophase_t;
//! typedef for the ThermoPhase class
typedef ThermoPhase thermo_t;
@ -1683,7 +1680,6 @@ typedef ThermoPhase thermo_t;
*/
DEPRECATED(std::string report(const ThermoPhase& th, const bool show_thermo = true));
}
#endif

View file

@ -15,8 +15,6 @@
#include "WaterPropsIAPWSphi.h"
#include "cantera/base/config.h"
typedef double doublereal;
namespace Cantera
{
/**

View file

@ -15,8 +15,6 @@
#include "cantera/base/config.h"
typedef double doublereal;
/*!
* the WaterPropsIAPSWSphi class support low level calls for
* the real description of water.

View file

@ -90,11 +90,6 @@ class LiquidTransportParams;
class LiquidTransport : public Transport
{
public:
//! Typedef equating vector_fp with Coeff_T_
typedef vector_fp Coeff_T_;
//! Default constructor.
/*!
* This requires call to initLiquid(LiquidTransportParams& tr)

View file

@ -882,12 +882,6 @@ private:
};
//! General definition for the transport class
/*!
* \ingroup tranprops
*/
typedef Transport transport_t;
}
#endif

View file

@ -11,9 +11,6 @@
/// Namespace for classes implementing zero-dimensional reactor networks.
namespace Cantera
{
// typedef Thermo thermo_t;
class FlowDevice;
class Wall;

View file

@ -21,7 +21,7 @@ static void st_drawline()
"------------------------------------------");
}
AxiStagnBVP::AxiStagnBVP(igthermo_t* ph, int nsp, int points) :
AxiStagnBVP::AxiStagnBVP(IdealGasPhase* ph, int nsp, int points) :
Domain1D(nsp+4, points),
m_inlet_u(0.0),
m_inlet_V(0.0),

View file

@ -21,7 +21,6 @@ namespace ckr
typedef std::vector<double> vector_fp;
typedef std::vector<double> vector_int;
//typedef vector<double> vector_fp;
// exceptions
class CK_Exception

View file

@ -100,7 +100,7 @@ addPhases(MultiPhase& mix)
}
//====================================================================================================================
void MultiPhase::
addPhases(phase_list& phases, const vector_fp& phaseMoles)
addPhases(std::vector<ThermoPhase*>& phases, const vector_fp& phaseMoles)
{
index_t np = phases.size();
index_t n;
@ -111,7 +111,7 @@ addPhases(phase_list& phases, const vector_fp& phaseMoles)
}
//====================================================================================================================
void MultiPhase::
addPhase(phase_t* p, doublereal moles)
addPhase(ThermoPhase* p, doublereal moles)
{
if (m_init) {
throw CanteraError("addPhase",
@ -212,7 +212,7 @@ void MultiPhase::init()
k = 0;
// iterate over the phases
for (ip = 0; ip < m_np; ip++) {
phase_t* p = m_phase[ip];
ThermoPhase* p = m_phase[ip];
nsp = p->nSpecies();
mlocal = p->elementIndex(sym);
for (kp = 0; kp < nsp; kp++) {
@ -257,7 +257,7 @@ void MultiPhase::init()
// Return a reference to phase n. The state of phase n is
// also updated to match the state stored locally in the
// mixture object.
MultiPhase::phase_t& MultiPhase::phase(index_t n)
ThermoPhase& MultiPhase::phase(index_t n)
{
if (!m_init) {
init();
@ -503,7 +503,7 @@ void MultiPhase::setPhaseMoleFractions(const index_t n, const doublereal* const
if (!m_init) {
init();
}
phase_t* p = m_phase[n];
ThermoPhase* p = m_phase[n];
p->setState_TPX(m_temp, m_press, x);
size_t istart = m_spstart[n];
for (size_t k = 0; k < p->nSpecies(); k++) {
@ -559,7 +559,7 @@ void MultiPhase::getMoles(doublereal* molNum) const
doublereal* dtmp = molNum;
for (index_t ip = 0; ip < m_np; ip++) {
doublereal phasemoles = m_moles[ip];
phase_t* p = m_phase[ip];
ThermoPhase* p = m_phase[ip];
index_t nsp = p->nSpecies();
for (ik = 0; ik < nsp; ik++) {
*(dtmp++) *= phasemoles;
@ -579,7 +579,7 @@ void MultiPhase::setMoles(const doublereal* n)
index_t ik, k = 0, nsp;
doublereal phasemoles;
for (ip = 0; ip < m_np; ip++) {
phase_t* p = m_phase[ip];
ThermoPhase* p = m_phase[ip];
nsp = p->nSpecies();
phasemoles = 0.0;
for (ik = 0; ik < nsp; ik++) {
@ -650,7 +650,7 @@ void MultiPhase::calcElemAbundances() const
m_elemAbundances[eGlobal] = 0.0;
}
for (index_t ip = 0; ip < m_np; ip++) {
phase_t* p = m_phase[ip];
ThermoPhase* p = m_phase[ip];
size_t nspPhase = p->nSpecies();
doublereal phasemoles = m_moles[ip];
for (ik = 0; ik < nspPhase; ik++) {
@ -1088,7 +1088,7 @@ void MultiPhase::getMoleFractions(doublereal* const x) const
//====================================================================================================================
std::string MultiPhase::phaseName(const index_t iph) const
{
const phase_t* tptr = m_phase[iph];
const ThermoPhase* tptr = m_phase[iph];
return tptr->id();
}
//====================================================================================================================
@ -1096,7 +1096,7 @@ int MultiPhase::phaseIndex(const std::string& pName) const
{
std::string tmp;
for (int iph = 0; iph < (int) m_np; iph++) {
const phase_t* tptr = m_phase[iph];
const ThermoPhase* tptr = m_phase[iph];
tmp = tptr->id();
if (tmp == pName) {
return iph;
@ -1142,7 +1142,7 @@ void MultiPhase::uploadMoleFractionsFromPhases()
{
index_t ip, loc = 0;
for (ip = 0; ip < m_np; ip++) {
phase_t* p = m_phase[ip];
ThermoPhase* p = m_phase[ip];
p->getMoleFractions(DATA_PTR(m_moleFractions) + loc);
loc += p->nSpecies();
}

View file

@ -52,7 +52,7 @@ static string coeffString(bool first, doublereal nu, string sym)
/// @param start If true, the initial composition will be
/// determined by a linear Gibbs minimization, otherwise the
/// initial mixture composition will be used.
MultiPhaseEquil::MultiPhaseEquil(mix_t* mix, bool start, int loglevel) : m_mix(mix)
MultiPhaseEquil::MultiPhaseEquil(MultiPhase* mix, bool start, int loglevel) : m_mix(mix)
{
// the multi-phase mixture
// m_mix = mix;
@ -813,7 +813,7 @@ doublereal MultiPhaseEquil::computeReactionSteps(vector_fp& dxi)
// sum over solution phases
doublereal sum = 0.0, psum;
for (ip = 0; ip < m_np; ip++) {
phase_t& p = m_mix->phase(ip);
ThermoPhase& p = m_mix->phase(ip);
if (p.nSpecies() > 1) {
psum = 0.0;
for (k = 0; k < m_nsp; k++) {

View file

@ -50,7 +50,7 @@ vcs_MultiPhaseEquil::vcs_MultiPhaseEquil() :
{
}
//====================================================================================================================
vcs_MultiPhaseEquil::vcs_MultiPhaseEquil(mix_t* mix, int printLvl) :
vcs_MultiPhaseEquil::vcs_MultiPhaseEquil(Cantera::MultiPhase* mix, int printLvl) :
m_vprob(0),
m_mix(0),
m_printLvl(printLvl),

View file

@ -1054,7 +1054,7 @@ extern "C" {
}
thermo_t* t = _fth(ith);
kinetics_t* k = _fkin(ikin);
Kinetics* k = _fkin(ikin);
Kinetics& kin = *k;
XML_Node* x, *r=0;

View file

@ -109,7 +109,7 @@ public:
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
virtual void updateTemp(doublereal T, doublereal* work) const {
doublereal Fcent = (1.0 - m_a) * exp(- T * m_rt3)
+ m_a * exp(- T * m_rt1);
*work = log10(std::max(Fcent, SmallNumber));
@ -120,7 +120,7 @@ public:
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
virtual doublereal F(doublereal pr, const doublereal* work) const {
doublereal lpr,f1,lgf, cc, nn;
lpr = log10(std::max(pr,SmallNumber));
cc = -0.4 - 0.67 * (*work);
@ -252,7 +252,7 @@ public:
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
virtual void updateTemp(doublereal T, doublereal* work) const {
doublereal Fcent = (1.0 - m_a) * exp(- T * m_rt3)
+ m_a * exp(- T * m_rt1)
+ exp(- m_t2 / T);
@ -264,7 +264,7 @@ public:
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
virtual doublereal F(doublereal pr, const doublereal* work) const {
doublereal lpr,f1,lgf, cc, nn;
lpr = log10(std::max(pr,SmallNumber));
cc = -0.4 - 0.67 * (*work);
@ -364,7 +364,7 @@ public:
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
virtual void updateTemp(doublereal T, doublereal* work) const {
*work = m_a * exp(- m_b / T);
if (m_c != 0.0) {
*work += exp(- T/m_c);
@ -376,7 +376,7 @@ public:
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
virtual doublereal F(doublereal pr, const doublereal* work) const {
doublereal lpr = log10(std::max(pr,SmallNumber));
doublereal xx = 1.0/(1.0 + lpr*lpr);
doublereal ff = pow(*work , xx);
@ -475,7 +475,7 @@ public:
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
virtual void updateTemp(doublereal T, doublereal* work) const {
*work = m_a * exp(- m_b / T);
if (m_c != 0.0) {
*work += exp(- T/m_c);
@ -488,7 +488,7 @@ public:
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
virtual doublereal F(doublereal pr, const doublereal* work) const {
doublereal lpr = log10(std::max(pr,SmallNumber));
doublereal xx = 1.0/(1.0 + lpr*lpr);
return pow(*work, xx) * work[1];
@ -616,7 +616,7 @@ public:
* the temperature dependent part of the
* parameterization.
*/
virtual void updateTemp(doublereal T, workPtr work) const {
virtual void updateTemp(doublereal T, doublereal* work) const {
work[0] = m_alpha0 + (m_alpha1 + m_alpha2*T)*T; // alpha
work[1] = m_sigma0 + (m_sigma1 + m_sigma2*T)*T; // sigma
doublereal Fcent = (1.0 - m_a) * exp(- T * m_rt3)
@ -629,7 +629,7 @@ public:
* @param pr Value of the reduced pressure for this reaction
* @param work Pointer to the previously saved work space
*/
virtual doublereal F(doublereal pr, const_workPtr work) const {
virtual doublereal F(doublereal pr, const doublereal* work) const {
doublereal lpr = log10(std::max(pr, SmallNumber));
doublereal x = (lpr - work[0])/work[1];
doublereal flog = work[2]/exp(x*x);

View file

@ -705,7 +705,7 @@ void ReactionPathBuilder::findElements(Kinetics& kin)
size_t k = 0;
// iterate over the phases
for (size_t ip = 0; ip < np; ip++) {
phase_t* p = &kin.thermo(ip);
ThermoPhase* p = &kin.thermo(ip);
size_t nsp = p->nSpecies();
size_t mlocal = p->elementIndex(sym);
for (size_t kp = 0; kp < nsp; kp++) {

View file

@ -177,7 +177,7 @@ void checkRxnElementBalance(Kinetics& kin,
* allowing the calling routine to skip this reaction
* and continue.
*/
bool getReagents(const XML_Node& rxn, kinetics_t& kin, int rp,
bool getReagents(const XML_Node& rxn, Kinetics& kin, int rp,
std::string default_phase, std::vector<size_t>& spnum,
vector_fp& stoich, vector_fp& order, int rule)
{
@ -489,7 +489,7 @@ static void getFalloff(const node_t& f, ReactionData& rdata)
* reaction mechanism is homogeneous, so that all species belong
* to phase(0) of 'kin'.
*/
static void getEfficiencies(const node_t& eff, kinetics_t& kin, ReactionData& rdata)
static void getEfficiencies(const node_t& eff, Kinetics& kin, ReactionData& rdata)
{
// set the default collision efficiency
@ -514,7 +514,7 @@ static void getEfficiencies(const node_t& eff, kinetics_t& kin, ReactionData& rd
*
* @param kf Reference to the XML Node named rateCoeff
*/
void getRateCoefficient(const node_t& kf, kinetics_t& kin,
void getRateCoefficient(const node_t& kf, Kinetics& kin,
ReactionData& rdata, int negA)
{
string type = kf.attrib("type");

View file

@ -28,8 +28,8 @@ namespace Cantera
* with the same number of grid points as in the old solution.
*/
void importSolution(size_t points,
doublereal* oldSoln, igthermo_t& oldmech,
size_t size_new, doublereal* newSoln, igthermo_t& newmech)
doublereal* oldSoln, IdealGasPhase& oldmech,
size_t size_new, doublereal* newSoln, IdealGasPhase& newmech)
{
// Number of components in old and new solutions
@ -86,7 +86,7 @@ static void st_drawline()
"------------------------------------------");
}
StFlow::StFlow(igthermo_t* ph, size_t nsp, size_t points) :
StFlow::StFlow(IdealGasPhase* ph, size_t nsp, size_t points) :
Domain1D(nsp+4, points),
m_inlet_u(0.0),
m_inlet_V(0.0),

View file

@ -20,8 +20,8 @@ bool FlowDevice::install(ReactorBase& in, ReactorBase& out)
m_out->addInlet(*this);
// construct adapters between inlet and outlet species
phase_t* mixin = &m_in->contents();
phase_t* mixout = &m_out->contents();
ThermoPhase* mixin = &m_in->contents();
ThermoPhase* mixout = &m_out->contents();
if (mixin == 0 || mixout == 0) {
return false;
}

View file

@ -127,8 +127,7 @@ size_t Reactor::nSensParams()
void Reactor::updateState(doublereal* y)
{
phase_t& mix = *m_thermo; // define for readability
ThermoPhase& mix = *m_thermo; // define for readability
// The components of y are the total internal energy,
// the total volume, and the mass of each species.