cleanup
This commit is contained in:
parent
95dc86cd2c
commit
d2779ddec7
11 changed files with 508 additions and 496 deletions
|
|
@ -47,7 +47,7 @@ namespace Cantera {
|
|||
|
||||
doublereal m_logp0, m_logc0;
|
||||
array_fp m_ropf, m_ropr, m_ropnet;
|
||||
array_fp m_rfn_low, m_rfn_high;
|
||||
//array_fp m_rfn_low, m_rfn_high;
|
||||
bool m_ROP_ok;
|
||||
|
||||
doublereal m_temp, m_logtemp;
|
||||
|
|
|
|||
|
|
@ -16,15 +16,10 @@
|
|||
#include "SurfPhase.h"
|
||||
|
||||
#include "ReactionData.h"
|
||||
//#include "StoichManager.h"
|
||||
#include "RateCoeffMgr.h"
|
||||
|
||||
#include "ImplicitSurfChem.h"
|
||||
|
||||
//#include <iostream>
|
||||
//using namespace std;
|
||||
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
|
@ -138,7 +133,7 @@ namespace Cantera {
|
|||
vector_fp& m_rkc = m_kdata->m_rkcn;
|
||||
fill(m_rkc.begin(), m_rkc.end(), 0.0);
|
||||
|
||||
static vector_fp mu(nTotalSpecies());
|
||||
//static vector_fp mu(nTotalSpecies());
|
||||
if (m_nrev > 0) {
|
||||
|
||||
int n, nsp, k, ik=0;
|
||||
|
|
@ -608,7 +603,7 @@ namespace Cantera {
|
|||
|
||||
// operations common to all reaction types
|
||||
installReagents( r );
|
||||
installGroups(reactionNumber(), r.rgroups, r.pgroups);
|
||||
//installGroups(reactionNumber(), r.rgroups, r.pgroups);
|
||||
incrementRxnCount();
|
||||
m_rxneqn.push_back(r.equation);
|
||||
}
|
||||
|
|
@ -749,13 +744,13 @@ namespace Cantera {
|
|||
}
|
||||
|
||||
|
||||
void InterfaceKinetics::installGroups(int irxn,
|
||||
const vector<grouplist_t>& r, const vector<grouplist_t>& p) {
|
||||
if (!r.empty()) {
|
||||
m_rgroups[reactionNumber()] = r;
|
||||
m_pgroups[reactionNumber()] = p;
|
||||
}
|
||||
}
|
||||
//void InterfaceKinetics::installGroups(int irxn,
|
||||
// const vector<grouplist_t>& r, const vector<grouplist_t>& p) {
|
||||
// if (!r.empty()) {
|
||||
// m_rgroups[reactionNumber()] = r;
|
||||
// m_pgroups[reactionNumber()] = p;
|
||||
// }
|
||||
//}
|
||||
|
||||
/**
|
||||
* Prepare the class for the addition of reactions. This function
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace Cantera {
|
|||
|
||||
doublereal m_logp0, m_logc0;
|
||||
array_fp m_ropf, m_ropr, m_ropnet;
|
||||
array_fp m_rfn_low, m_rfn_high;
|
||||
//array_fp m_rfn_low, m_rfn_high;
|
||||
bool m_ROP_ok;
|
||||
|
||||
doublereal m_temp, m_logtemp;
|
||||
|
|
@ -311,10 +311,10 @@ namespace Cantera {
|
|||
void updateROP();
|
||||
|
||||
|
||||
const vector<grouplist_t>& reactantGroups(int i)
|
||||
{ return m_rgroups[i]; }
|
||||
const vector<grouplist_t>& productGroups(int i)
|
||||
{ return m_pgroups[i]; }
|
||||
//const vector<grouplist_t>& reactantGroups(int i)
|
||||
// { return m_rgroups[i]; }
|
||||
//const vector<grouplist_t>& productGroups(int i)
|
||||
// { return m_pgroups[i]; }
|
||||
|
||||
void _update_rates_T();
|
||||
void _update_rates_phi();
|
||||
|
|
@ -325,6 +325,7 @@ namespace Cantera {
|
|||
vector_fp m_grt;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* m_kk here is the number of species in all of the phases
|
||||
* that participate in the kinetics mechanism.
|
||||
|
|
@ -361,8 +362,8 @@ namespace Cantera {
|
|||
*/
|
||||
int m_nrev;
|
||||
|
||||
map<int, vector<grouplist_t> > m_rgroups;
|
||||
map<int, vector<grouplist_t> > m_pgroups;
|
||||
// map<int, vector<grouplist_t> > m_rgroups;
|
||||
//map<int, vector<grouplist_t> > m_pgroups;
|
||||
|
||||
vector<int> m_rxntype;
|
||||
|
||||
|
|
@ -426,8 +427,8 @@ namespace Cantera {
|
|||
void addGlobalReaction(const ReactionData& r);
|
||||
void installReagents(const ReactionData& r);
|
||||
|
||||
void installGroups(int irxn, const vector<grouplist_t>& r,
|
||||
const vector<grouplist_t>& p);
|
||||
//void installGroups(int irxn, const vector<grouplist_t>& r,
|
||||
// const vector<grouplist_t>& p);
|
||||
void updateKc();
|
||||
|
||||
void registerReaction(int rxnNumber, int type, int loc) {
|
||||
|
|
|
|||
|
|
@ -668,12 +668,12 @@ namespace Cantera {
|
|||
}
|
||||
|
||||
virtual const vector<grouplist_t>& reactantGroups(int i) {
|
||||
err("reactantGroups");
|
||||
//err("reactantGroups");
|
||||
return m_dummygroups;
|
||||
}
|
||||
|
||||
virtual const vector<grouplist_t>& productGroups(int i) {
|
||||
err("productGroups");
|
||||
//err("productGroups");
|
||||
return m_dummygroups;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,36 +121,43 @@ namespace Cantera {
|
|||
getCreationRates(int nsp, const doublereal* ropf,
|
||||
const doublereal* ropr, doublereal* c) {
|
||||
// zero out the output array
|
||||
fill(c, c + nsp, 0.0);
|
||||
fill(c, c + nsp, 0.0);
|
||||
|
||||
m_revproducts->incrementSpecies(ropf, c);
|
||||
m_irrevproducts->incrementSpecies(ropf, c);
|
||||
// the forward direction creates product species
|
||||
m_revproducts->incrementSpecies(ropf, c);
|
||||
m_irrevproducts->incrementSpecies(ropf, c);
|
||||
|
||||
// the reverse direction creates reactant species
|
||||
m_reactants->incrementSpecies(ropr, c);
|
||||
// the reverse direction creates reactant species
|
||||
m_reactants->incrementSpecies(ropr, c);
|
||||
}
|
||||
|
||||
void ReactionStoichMgr::
|
||||
getDestructionRates(int nsp, const doublereal* ropf,
|
||||
const doublereal* ropr, doublereal* d) {
|
||||
fill(d, d + nsp, 0.0);
|
||||
// the reverse direction destroys products in reversible reactions
|
||||
m_revproducts->incrementSpecies(ropr, d);
|
||||
// the forward direction destroys reactants
|
||||
m_reactants->incrementSpecies(ropf, d);
|
||||
}
|
||||
|
||||
void ReactionStoichMgr::
|
||||
getNetProductionRates(int nsp, const doublereal* ropnet, doublereal* w) {
|
||||
fill(w, w + nsp, 0.0);
|
||||
// products are created for positive net rate of progress
|
||||
m_revproducts->incrementSpecies(ropnet, w);
|
||||
m_irrevproducts->incrementSpecies(ropnet, w);
|
||||
// reactants are destroyed for positive net rate of progress
|
||||
m_reactants->decrementSpecies(ropnet, w);
|
||||
}
|
||||
|
||||
void ReactionStoichMgr::
|
||||
getReactionDelta(int nr, const doublereal* g, doublereal* dg) {
|
||||
fill(dg, dg + nr, 0.0);
|
||||
// products add
|
||||
m_revproducts->incrementReactions(g, dg);
|
||||
m_irrevproducts->incrementReactions(g, dg);
|
||||
// reactants subtract
|
||||
m_reactants->decrementReactions(g, dg);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ namespace Cantera {
|
|||
StoichManagerN* m_reactants;
|
||||
StoichManagerN* m_revproducts;
|
||||
StoichManagerN* m_irrevproducts;
|
||||
// StoichManagerN* m_global;
|
||||
vector_fp m_dummy;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,10 @@
|
|||
// Copyright 2001 California Institute of Technology
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.17 2005-07-25 03:51:21 dggoodwin
|
||||
// Revision 1.18 2005-07-26 03:56:35 dggoodwin
|
||||
// cleanup
|
||||
//
|
||||
// Revision 1.17 2005/07/25 03:51:21 dggoodwin
|
||||
// now recognizes the FORD keyword
|
||||
//
|
||||
// Revision 1.16 2005/01/07 10:26:43 dggoodwin
|
||||
|
|
@ -953,7 +956,6 @@ next:
|
|||
}
|
||||
|
||||
Reaction rxn;
|
||||
cout << "new rxn, fwdOrder size = " << rxn.fwdOrder.size() << endl;
|
||||
|
||||
vector<string> cm;
|
||||
bool ok = true;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,10 @@ namespace ckr {
|
|||
|
||||
|
||||
/// A class for reactions.
|
||||
|
||||
|
||||
// Note: if you add data items to this class, be sure to update
|
||||
// the copy constructor and the assignment operator !
|
||||
|
||||
class Reaction {
|
||||
public:
|
||||
|
||||
|
|
@ -179,7 +182,6 @@ namespace ckr {
|
|||
|
||||
/// Reaction number.
|
||||
int number;
|
||||
|
||||
|
||||
/**
|
||||
* list of species that participate as reactants,
|
||||
|
|
|
|||
|
|
@ -276,11 +276,8 @@ namespace pip {
|
|||
}
|
||||
|
||||
// reaction orders
|
||||
cout << "checking for rxn orders..." << endl;
|
||||
int nord = static_cast<int>(rxn.fwdOrder.size());
|
||||
cout << nord << endl;
|
||||
if (nord > 0) {
|
||||
cout << "processing order..." << endl;
|
||||
map<string, double>::const_iterator b = rxn.fwdOrder.begin(),
|
||||
e = rxn.fwdOrder.end();
|
||||
string estr = "";
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ typedef int ftnlen; // Fortran hidden string length type
|
|||
// OS X, This used to add some Mac-specific directories to the default
|
||||
// data file search path.
|
||||
#define DARWIN 0
|
||||
#define HAS_SSTREAM
|
||||
/* #undef HAS_SSTREAM */
|
||||
|
||||
// Identify whether the operating system is cygwin's overlay of
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue