variable name changes

This commit is contained in:
Harry Moffat 2008-05-13 17:15:49 +00:00
parent 984c221c21
commit 6f07cb109e
11 changed files with 195 additions and 179 deletions

View file

@ -1587,7 +1587,7 @@ namespace VCSnonideal {
int nc = numComponents();
// scMatrix [nrxn][ncomp]
const DoubleStarStar &scMatrix = m_vsolvePtr->m_stoichCoeffRxnMatrix;
const std::vector<int> indSpecies = m_vsolvePtr->ind;
const std::vector<int> indSpecies = m_vsolvePtr->m_speciesIndexVector;
if ((int) rxn > nsp - nc) return;
int j = indSpecies[rxn + nc];
nu[j] = 1.0;
@ -1617,7 +1617,7 @@ namespace VCSnonideal {
int vcs_MultiPhaseEquil::component(int m) const {
int nc = numComponents();
if (m < nc) return m_vsolvePtr->ind[m];
if (m < nc) return m_vsolvePtr->m_speciesIndexVector[m];
else return -1;
}

View file

@ -314,7 +314,8 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 3) {
plogf(" --- vcs_elcorr: Reduced species %s from %g to %g due to %s max bounds constraint\n",
SpName[kspec].c_str(), m_molNumSpecies_old[kspec], maxPermissible, ElName[i].c_str());
m_speciesName[kspec].c_str(), m_molNumSpecies_old[kspec],
maxPermissible, ElName[i].c_str());
}
#endif
m_molNumSpecies_old[kspec] = maxPermissible;
@ -329,7 +330,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- vcs_elcorr: Zeroed species %s and changed status to %d due to max bounds constraint\n",
SpName[kspec].c_str(), spStatus[kspec]);
m_speciesName[kspec].c_str(), spStatus[kspec]);
}
#endif
}

View file

@ -103,7 +103,7 @@ namespace VCSnonideal {
pprefix);
plogf("%s SPECIES MOLE_NUMBER -SS_ChemPotential\n", pprefix);
for (kspec = 0; kspec < nspecies; ++kspec) {
plogf("%s ", pprefix); plogf("%-12.12s", SpName[kspec].c_str());
plogf("%s ", pprefix); plogf("%-12.12s", m_speciesName[kspec].c_str());
plogf(" %15.5g %12.3g\n", molNum[kspec], -m_SSfeSpecies[kspec]);
}
plogf("%s Element Abundance Agreement returned from linear "
@ -211,7 +211,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
for (kspec = 0; kspec < nspecies; ++kspec) {
plogf("%s", pprefix); plogf("%-12.12s", SpName[kspec].c_str());
plogf("%s", pprefix); plogf("%-12.12s", m_speciesName[kspec].c_str());
if (kspec < m_numComponents)
plogf("fe* = %15.5g ff = %15.5g\n", m_feSpecies_curr[kspec],
m_SSfeSpecies[kspec]);
@ -258,7 +258,7 @@ namespace VCSnonideal {
}
for (iph = 0; iph < m_numPhases; iph++) {
m_deltaPhaseMoles[iph] += DnPhase[irxn][iph] * m_deltaMolNumSpecies[kspec];
m_deltaPhaseMoles[iph] += m_deltaMolNumPhase[irxn][iph] * m_deltaMolNumSpecies[kspec];
}
}
}
@ -266,7 +266,7 @@ namespace VCSnonideal {
if (vcs_debug_print_lvl >= 2) {
for (kspec = 0; kspec < nspecies; ++kspec) {
if (m_speciesUnknownType[kspec] != VCS_SPECIES_TYPE_INTERFACIALVOLTAGE) {
plogf("%sdirection (", pprefix); plogf("%-12.12s", SpName[kspec].c_str());
plogf("%sdirection (", pprefix); plogf("%-12.12s", m_speciesName[kspec].c_str());
plogf(") = %g", m_deltaMolNumSpecies[kspec]);
if (SSPhase[kspec]) {
if (molNum[kspec] > 0.0) {
@ -376,7 +376,7 @@ namespace VCSnonideal {
pprefix);
plogf("%s SPECIES MOLE_NUMBER\n", pprefix);
for (kspec = 0; kspec < nspecies; ++kspec) {
plogf("%s ", pprefix); plogf("%-12.12s", SpName[kspec].c_str());
plogf("%s ", pprefix); plogf("%-12.12s", m_speciesName[kspec].c_str());
plogf(" %g", molNum[kspec]);
plogendl();
}

View file

@ -282,8 +282,8 @@ namespace VCSnonideal {
vcs_dzero(VCS_DATA_PTR(m_feSpecies_curr), m_numSpeciesTot);
vcs_vdzero(m_feSpecies_old, m_numSpeciesTot);
vcs_vdzero(m_molNumSpecies_new, m_numSpeciesTot);
vcs_dzero(&(DnPhase[0][0]), m_numSpeciesTot * m_numPhases);
vcs_izero(&(PhaseParticipation[0][0]), m_numSpeciesTot * m_numPhases);
vcs_dzero(&(m_deltaMolNumPhase[0][0]), m_numSpeciesTot * m_numPhases);
vcs_izero(&(m_phaseParticipation[0][0]), m_numSpeciesTot * m_numPhases);
vcs_dzero(VCS_DATA_PTR(m_deltaPhaseMoles), m_numPhases);
vcs_dzero(VCS_DATA_PTR(m_tPhaseMoles_new), m_numPhases);
/*

View file

@ -1,12 +1,16 @@
/* ======================================================================= */
/* -------------------------------------------------- */
/* | RCS Head Information on zuzax.pchem.sandia.gov | */
/* -------------------------------------------------- */
/* $RCSfile$ */
/* $Author$ */
/* $Date$ */
/* $Revision$ */
/* ======================================================================= */
/**
* @file vcs_rearrange.c
* implementation file for rearranging species.
*/
/*
* $Id$
*/
/*
* Copywrite (2007) Sandia Corporation. Under the terms of
* Contract DE-AC04-94AL85000 with Sandia Corporation, the
* U.S. Government retains certain rights in this software.
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@ -16,44 +20,35 @@
namespace VCSnonideal {
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
int VCS_SOLVE::vcs_rearrange(void)
/**************************************************************************
*
* vcs_rearrange:
*
* Switch all species data back to the original order. This destroys
* the data based on reaction ordering.
**************************************************************************/
{
int i, l, j;
int k1 = 0;
/* ********************************************************* */
/* **** RE-ARRANGE INPUT DATA ****************************** */
/* ********************************************************* */
/* - Loop over all of the species */
for (i = 0; i < m_numSpeciesTot; ++i) {
// Switch all species data back to the original order.
/*
* This destroys the data based on reaction ordering.
*/
int VCS_SOLVE::vcs_rearrange() {
int i, l, j;
int k1 = 0;
/* - Loop over all of the species */
for (i = 0; i < m_numSpeciesTot; ++i) {
/*
* Find the index of I in the index vector IND.
* Call it K1 and continue.
*/
* Find the index of I in the index vector m_speciesIndexVector[].
* Call it k1 and continue.
*/
for (j = 0; j < m_numSpeciesTot; ++j) {
l = ind[j];
k1 = j;
if (l == i) break;
l = m_speciesIndexVector[j];
k1 = j;
if (l == i) break;
}
/*
* - Switch the species data back from K1 into I
* -> because we loop over all species, reaction data
* are now permanently hosed.
*/
* - Switch the species data back from k1 into i
* -> because we loop over all species, reaction data
* are now permanently hosed.
*/
vcs_switch_pos(FALSE, i, k1);
}
return 0;
} /* vcs_rearrange() *********************************************************/
}
return 0;
}
}

View file

@ -121,7 +121,7 @@ int VCS_SOLVE::vcs_report(int iconv)
plogf("Mole Fraction ChemPot/RT SpecUnkType\n");
print_line("-", 80);
for (i = 0; i < m_numComponents; ++i) {
plogf(" %-12.12s", SpName[i].c_str());
plogf(" %-12.12s", m_speciesName[i].c_str());
print_space(13);
plogf("%14.7E %14.7E %12.4E", m_molNumSpecies_old[i], m_molNumSpecies_new[i], m_feSpecies_curr[i]);
plogf(" %3d", m_speciesUnknownType[i]);
@ -129,7 +129,7 @@ int VCS_SOLVE::vcs_report(int iconv)
}
for (i = m_numComponents; i < m_numSpeciesRdc; ++i) {
l = sortindex[i];
plogf(" %-12.12s", SpName[l].c_str());
plogf(" %-12.12s", m_speciesName[l].c_str());
print_space(13);
if (m_speciesUnknownType[l] == VCS_SPECIES_TYPE_MOLNUM) {
@ -160,7 +160,7 @@ int VCS_SOLVE::vcs_report(int iconv)
if (m_numSpeciesRdc != nspecies) {
plogf("\n SPECIES WITH LESS THAN 1.0E-32 KMOLES:\n\n");
for (kspec = m_numSpeciesRdc; kspec < nspecies; ++kspec) {
plogf(" %-12.12s", SpName[kspec].c_str());
plogf(" %-12.12s", m_speciesName[kspec].c_str());
plogf(" %14.7E %14.7E %12.4E",
m_molNumSpecies_old[kspec], m_molNumSpecies_new[kspec], m_deltaGRxn_new[kspec]);
if (m_speciesUnknownType[i] == VCS_SPECIES_TYPE_MOLNUM) {
@ -189,7 +189,7 @@ int VCS_SOLVE::vcs_report(int iconv)
plogf(" | |\n");
plogf(" | Components|");
for (j = 0; j < m_numComponents; j++) {
plogf(" %10.10s", SpName[j].c_str());
plogf(" %10.10s", m_speciesName[j].c_str());
}
plogf(" | |\n");
plogf(" NonComponent | Moles |");
@ -201,7 +201,7 @@ int VCS_SOLVE::vcs_report(int iconv)
for (i = 0; i < m_numRxnTot; i++) {
int irxn = ir[i];
plogf(" %3d ", irxn);
plogf("%-10.10s", SpName[irxn].c_str());
plogf("%-10.10s", m_speciesName[irxn].c_str());
plogf("|%10.3g |", m_molNumSpecies_old[irxn]);
for (j = 0; j < m_numComponents; j++) {
plogf(" %6.2f", m_stoichCoeffRxnMatrix[i][j]);
@ -312,7 +312,7 @@ int VCS_SOLVE::vcs_report(int iconv)
for (i = 0; i < nspecies; ++i) {
l = sortindex[i];
int pid = PhaseID[l];
plogf(" %-12.12s", SpName[l].c_str());
plogf(" %-12.12s", m_speciesName[l].c_str());
plogf(" %14.7E ", m_molNumSpecies_old[l]);
plogf("%14.7E ", m_SSfeSpecies[l]);
plogf("%14.7E ", log(ActCoeff[l]));

View file

@ -76,7 +76,7 @@ int VCS_SOLVE::vcs_rxn_adj_cg(void)
#endif
kspec = ir[irxn];
dnPhase_irxn = DnPhase[irxn];
dnPhase_irxn = m_deltaMolNumPhase[irxn];
if (m_molNumSpecies_old[kspec] == 0.0 && (! SSPhase[kspec])) {
/* *******************************************************************/
@ -110,10 +110,10 @@ int VCS_SOLVE::vcs_rxn_adj_cg(void)
* Don't bother if superconvergence has already been achieved
* in this mode.
*/
if (fabs(m_deltaGRxn_new[irxn]) <= tolmaj2) {
if (fabs(m_deltaGRxn_new[irxn]) <= m_tolmaj2) {
#ifdef DEBUG_MODE
sprintf(ANOTE,"Skipped: converged DG = %11.3E\n", m_deltaGRxn_new[irxn]);
plogf(" --- "); plogf("%-12.12s", SpName[kspec].c_str());
plogf(" --- "); plogf("%-12.12s", m_speciesName[kspec].c_str());
plogf(" %12.4E %12.4E | %s\n", m_molNumSpecies_old[kspec], m_deltaMolNumSpecies[kspec], ANOTE);
#endif
continue;
@ -126,7 +126,7 @@ int VCS_SOLVE::vcs_rxn_adj_cg(void)
#ifdef DEBUG_MODE
sprintf(ANOTE,"Skipped: IC = %3d and DG >0: %11.3E\n",
spStatus[irxn], m_deltaGRxn_new[irxn]);
plogf(" --- "); plogf("%-12.12s", SpName[kspec].c_str());
plogf(" --- "); plogf("%-12.12s", m_speciesName[kspec].c_str());
plogf(" %12.4E %12.4E | %s\n", m_molNumSpecies_old[kspec],
m_deltaMolNumSpecies[kspec], ANOTE);
#endif
@ -204,7 +204,7 @@ int VCS_SOLVE::vcs_rxn_adj_cg(void)
m_tPhaseMoles_old[PhaseID[k]] = 0.0;
#ifdef DEBUG_MODE
plogf(" --- vcs_st2 Special section to delete ");
plogf("%-12.12s", SpName[k].c_str());
plogf("%-12.12s", m_speciesName[k].c_str());
plogf("\n --- Immediate return - Restart iteration\n");
#endif
/*
@ -219,7 +219,7 @@ int VCS_SOLVE::vcs_rxn_adj_cg(void)
}
} /* End of regular processing */
#ifdef DEBUG_MODE
plogf(" --- "); plogf("%-12.12s", SpName[kspec].c_str());
plogf(" --- "); plogf("%-12.12s", m_speciesName[kspec].c_str());
plogf(" %12.4E %12.4E | %s\n", m_molNumSpecies_old[kspec],
m_deltaMolNumSpecies[kspec], ANOTE);
#endif
@ -375,7 +375,7 @@ double VCS_SOLVE::deltaG_Recalc_Rxn(int irxn, const double *const molNum,
*************************************************************************/
{
int kspec = irxn + m_numComponents;
int *pp_ptr = PhaseParticipation[irxn];
int *pp_ptr = m_phaseParticipation[irxn];
for (int iphase = 0; iphase < m_numPhases; iphase++) {
if (pp_ptr[iphase]) {
vcs_chemPotPhase(iphase, molNum, ac, mu_i);

View file

@ -98,7 +98,7 @@ int VCS_SOLVE::vcs_setMolesLinProg() {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
printProgress(SpName, m_molNumSpecies_old, m_SSfeSpecies);
printProgress(m_speciesName, m_molNumSpecies_old, m_SSfeSpecies);
}
#endif
@ -171,7 +171,7 @@ int VCS_SOLVE::vcs_setMolesLinProg() {
if (delta_xi < 1.0e-10 && (m_molNumSpecies_old[ik] >= 1.0E-10)) {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Component too small: %s\n", SpName[jcomp].c_str());
plogf(" --- Component too small: %s\n", m_speciesName[jcomp].c_str());
}
#endif
redo = true;
@ -208,14 +208,14 @@ int VCS_SOLVE::vcs_setMolesLinProg() {
// vcs_updateVP(0);
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
printProgress(SpName, m_molNumSpecies_old, m_SSfeSpecies);
printProgress(m_speciesName, m_molNumSpecies_old, m_SSfeSpecies);
}
#endif
}
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl == 1) {
printProgress(SpName, m_molNumSpecies_old, m_SSfeSpecies);
printProgress(m_speciesName, m_molNumSpecies_old, m_SSfeSpecies);
plogf(" --- setInitialMoles end\n");
}
#endif

View file

@ -45,10 +45,10 @@ namespace VCSnonideal {
m_totalMolNum(0.0),
m_temperature(0.0),
m_pressurePA(0.0),
tolmaj(0.0),
tolmin(0.0),
tolmaj2(0.0),
tolmin2(0.0),
m_tolmaj(0.0),
m_tolmin(0.0),
m_tolmaj2(0.0),
m_tolmin2(0.0),
UnitsState(VCS_DIMENSIONAL_G),
UseActCoeffJac(0),
Vol(0.0),
@ -116,8 +116,8 @@ namespace VCSnonideal {
m_speciesUnknownType.resize(nspecies0, VCS_SPECIES_TYPE_MOLNUM);
DnPhase.resize(nspecies0, nphase0, 0.0);
PhaseParticipation.resize(nspecies0, nphase0, 0);
m_deltaMolNumPhase.resize(nspecies0, nphase0, 0.0);
m_phaseParticipation.resize(nspecies0, nphase0, 0);
m_phasePhi.resize(nphase0, 0.0);
m_molNumSpecies_new.resize(nspecies0, 0.0);
@ -145,7 +145,7 @@ namespace VCSnonideal {
* ind[] is an index variable that keep track of solution vector
* rotations.
*/
ind.resize(nspecies0, 0);
m_speciesIndexVector.resize(nspecies0, 0);
indPhSp.resize(nspecies0, 0);
/*
* IndEl[] is an index variable that keep track of element vector
@ -169,7 +169,7 @@ namespace VCSnonideal {
m_numElemConstraints = nelements;
ElName.resize(nelements, std::string(""));
SpName.resize(nspecies0, std::string(""));
m_speciesName.resize(nspecies0, std::string(""));
m_elType.resize(nelements, VCS_ELEM_TYPE_ABSPOS);
@ -600,15 +600,19 @@ namespace VCSnonideal {
/*
* tolerance requirements -> copy them over here and later
*/
tolmaj = pub->tolmaj;
tolmin = pub->tolmin;
tolmaj2 = 0.01 * tolmaj;
tolmin2 = 0.01 * tolmin;
m_tolmaj = pub->tolmaj;
m_tolmin = pub->tolmin;
m_tolmaj2 = 0.01 * m_tolmaj;
m_tolmin2 = 0.01 * m_tolmin;
/*
* ind[] is an index variable that keep track of solution vector
* rotations.
* m_speciesIndexVector[] is an index variable that keep track
* of solution vector rotations.
*/
for (i = 0; i < nspecies; i++) ind[i] = i;
for (i = 0; i < nspecies; i++) {
m_speciesIndexVector[i] = i;
}
/*
* IndEl[] is an index variable that keep track of element vector
* rotations.
@ -684,7 +688,7 @@ namespace VCSnonideal {
* Copy over the species names
*/
for (i = 0; i < nspecies; i++) {
SpName[i] = pub->SpName[i];
m_speciesName[i] = pub->SpName[i];
}
/*
* Copy over all of the phase information
@ -779,13 +783,13 @@ namespace VCSnonideal {
Vol = pub->Vol;
tolmaj = pub->tolmaj;
tolmin = pub->tolmin;
tolmaj2 = 0.01 * tolmaj;
tolmin2 = 0.01 * tolmin;
m_tolmaj = pub->tolmaj;
m_tolmin = pub->tolmin;
m_tolmaj2 = 0.01 * m_tolmaj;
m_tolmin2 = 0.01 * m_tolmin;
for (kspec = 0; kspec < m_numSpeciesTot; ++kspec) {
k = ind[kspec];
k = m_speciesIndexVector[kspec];
m_molNumSpecies_old[kspec] = pub->w[k];
m_molNumSpecies_new[kspec] = pub->mf[k];
m_feSpecies_curr[kspec] = pub->m_gibbsSpecies[k];
@ -907,11 +911,11 @@ namespace VCSnonideal {
for (i = 0; i < m_numSpeciesTot; ++i) {
/*
* Find the index of I in the index vector, ind[].
* Find the index of I in the index vector, m_speciesIndexVector[].
* Call it K1 and continue.
*/
for (j = 0; j < m_numSpeciesTot; ++j) {
l = ind[j];
l = m_speciesIndexVector[j];
k1 = j;
if (l == i) break;
}

View file

@ -480,8 +480,11 @@ public:
*/
int vcs_report(int iconv);
int vcs_rearrange(void);
//! Switch all species data back to the original order.
/*!
* This destroys the data based on reaction ordering.
*/
int vcs_rearrange();
//! Returns the multiplier for electric charge terms
/*
@ -870,13 +873,13 @@ public:
//! Change in the number of moles of phase, iphase, due to the noncomponent formation
//! reaction, irxn, for species, k:
/*!
* DnPhase[irxn][iphase] = k = nc + irxn
* m_deltaMolNumPhase[irxn][iphase] = k = nc + irxn
*/
DoubleStarStar DnPhase;
DoubleStarStar m_deltaMolNumPhase;
//! This is 1 if the phase, iphase, participates in the formation reaction
//! irxn, and zero otherwise. PhaseParticipation[irxn][iphase]
IntStarStar PhaseParticipation;
IntStarStar m_phaseParticipation;
//! electric potential of the iph phase
std::vector<double> m_phasePhi;
@ -997,18 +1000,31 @@ public:
*/
std::vector<double> TPhInertMoles;
double tolmaj; /* tolmaj = Tolerance requirement for major species */
double tolmin; /* tolmin = Tolerance requirement for minor species */
double tolmaj2; /* tolmaj2 = Below this, major species aren't refined
* any more */
double tolmin2; /* tolmin2 = Below this, minor species aren't refined
* any more */
std::vector<int> ind; /* ind[k] = Index vector that keeps track of the
* rearrangement
* of the species vector within the problem.
* -> At the end of each run, the species
* vector and associated data gets put back
* in the original order. */
//! Tolerance requirement for major species
double m_tolmaj;
//! Tolerance requirements for minor species
double m_tolmin;
//! Below this, major species aren't refined any more
double m_tolmaj2;
//! Below this, minor species aren't refined any more
double m_tolmin2;
//! Index vector that keeps track of the species vector rearrangement
/*!
* At the end of each run, the species vector and associated data gets put back
* in the original order.
*
* Example
*
* k = m_speciesIndexVector[kspec]
*
* kspec = current order in the vcs_solve object
* k = original order in the vcs_prob object and in the MultiPhase object
*/
std::vector<int> m_speciesIndexVector;
//! Index that keeps track of the index of the species according
//! to the phase
@ -1066,7 +1082,7 @@ public:
/*!
* SpName[k] = Species string name for the kth species
*/
std::vector<std::string> SpName;
std::vector<std::string> m_speciesName;
//! Vector of strings containing the element names
/*!

View file

@ -235,7 +235,7 @@ namespace VCSnonideal {
plogf(" SI(I)\n");
RT = vcs_nondimMult_TP(m_VCS_UnitsFormat, m_temperature);
for (i = 0; i < m_numSpeciesTot; ++i) {
plogf(" %-12s", SpName[i].c_str());
plogf(" %-12s", m_speciesName[i].c_str());
for (j = 0; j < m_numElemConstraints; ++j) {
plogf("%3g", m_formulaMatrix[j][i]);
}
@ -264,7 +264,7 @@ namespace VCSnonideal {
if (m_molNumSpecies_old[i] < 0.0) {
plogf("On Input species %-12s has a "
"negative MF, setting it small",
SpName[i].c_str());
m_speciesName[i].c_str());
plogendl();
m_molNumSpecies_old[i] = VCS_DELETE_SPECIES_CUTOFF;
}
@ -321,7 +321,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Minor species changed to major: ");
plogf("%-12s", SpName[kspec].c_str());
plogf("%-12s", m_speciesName[kspec].c_str());
plogendl();
}
#endif
@ -513,7 +513,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 3) {
plogf(" --- %s currently zeroed (SpStatus=%-2d):",
SpName[kspec].c_str(), spStatus[irxn]);
m_speciesName[kspec].c_str(), spStatus[irxn]);
plogf("%3d DG = %11.4E WT = %11.4E W = %11.4E DS = %11.4E\n",
irxn, m_deltaGRxn_new[irxn], m_molNumSpecies_new[kspec],
m_molNumSpecies_old[kspec], m_deltaMolNumSpecies[kspec]);
@ -538,7 +538,7 @@ namespace VCSnonideal {
m_deltaGRxn_new[irxn]);
}
//if (vcs_debug_print_lvl >= 2) {
//plogf(" --- "); plogf("%-12s", SpName[kspec]);
//plogf(" --- "); plogf("%-12s", m_speciesName[kspec]);
//plogf("%3d%11.4E%11.4E%11.4E | %s\n",
// spStatus[irxn], w[kspec], wt[kspec],
// ds[kspec], ANOTE);
@ -572,7 +572,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Zeroed species changed to major: ");
plogf("%-12s\n", SpName[kspec].c_str());
plogf("%-12s\n", m_speciesName[kspec].c_str());
}
#endif
spStatus[irxn] = VCS_SPECIES_MAJOR;
@ -610,7 +610,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
sprintf(ANOTE,"minor species not considered");
if (vcs_debug_print_lvl >= 2) {
plogf(" --- "); plogf("%-12s", SpName[kspec].c_str());
plogf(" --- "); plogf("%-12s", m_speciesName[kspec].c_str());
plogf("%3d%11.4E%11.4E%11.4E | %s",
spStatus[irxn], m_molNumSpecies_old[kspec], m_molNumSpecies_new[kspec],
m_deltaMolNumSpecies[kspec], ANOTE);
@ -647,7 +647,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Delete minor species in multispec phase: %-12s",
SpName[kspec].c_str());
m_speciesName[kspec].c_str());
plogendl();
}
#endif
@ -687,14 +687,14 @@ namespace VCSnonideal {
* nothing if it is superconverged. Skip to the end of the
* irxn loop if it is superconverged.
*/
if (fabs(m_deltaGRxn_new[irxn]) <= tolmaj2) {
if (fabs(m_deltaGRxn_new[irxn]) <= m_tolmaj2) {
m_molNumSpecies_new[kspec] = m_molNumSpecies_old[kspec];
m_deltaMolNumSpecies[kspec] = 0.0;
dx = 0.0;
#ifdef DEBUG_MODE
sprintf(ANOTE, "major species is converged");
if (vcs_debug_print_lvl >= 2) {
plogf(" --- "); plogf("%-12s", SpName[kspec].c_str());
plogf(" --- "); plogf("%-12s", m_speciesName[kspec].c_str());
plogf("%3d%11.4E%11.4E%11.4E | %s",
spStatus[irxn], m_molNumSpecies_old[kspec], m_molNumSpecies_new[kspec],
m_deltaMolNumSpecies[kspec], ANOTE);
@ -772,7 +772,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Major species changed to minor: ");
plogf("%-12s", SpName[kspec].c_str());
plogf("%-12s", m_speciesName[kspec].c_str());
plogendl();
}
#endif
@ -839,7 +839,7 @@ namespace VCSnonideal {
* phase. Make sure the moles in the current ss phase is
* identically zero.
*/
dnPhase_irxn = DnPhase[irxn];
dnPhase_irxn = m_deltaMolNumPhase[irxn];
for (int iphase = 0; iphase < m_numPhases; iphase++) {
m_tPhaseMoles_old[iphase] += dnPhase_irxn[iphase] * dx;
}
@ -867,7 +867,7 @@ namespace VCSnonideal {
if (vcs_debug_print_lvl >= 2) {
if (spStatus[irxn] >= 0) {
plogf(" --- SS species changed to zeroedss: ");
plogf("%-12s", SpName[kspec].c_str());
plogf("%-12s", m_speciesName[kspec].c_str());
plogendl();
}
}
@ -927,7 +927,7 @@ namespace VCSnonideal {
* moles in all of the phases
*/
dnPhase_irxn = DnPhase[irxn];
dnPhase_irxn = m_deltaMolNumPhase[irxn];
for (iph = 0; iph < m_numPhases; iph++) {
m_deltaPhaseMoles[iph] += dx * dnPhase_irxn[iph];
}
@ -944,7 +944,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
m_molNumSpecies_new[kspec] = m_molNumSpecies_old[kspec] + m_deltaMolNumSpecies[kspec];
plogf(" --- "); plogf("%-12.12s", SpName[kspec].c_str());
plogf(" --- "); plogf("%-12.12s", m_speciesName[kspec].c_str());
plogf("%3d%11.4E%11.4E%11.4E | %s",
spStatus[irxn], m_molNumSpecies_old[kspec], m_molNumSpecies_new[kspec],
m_deltaMolNumSpecies[kspec], ANOTE);
@ -957,7 +957,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
for (k = 0; k < m_numComponents; k++) {
plogf(" --- "); plogf("%-12.12s", SpName[k].c_str());
plogf(" --- "); plogf("%-12.12s", m_speciesName[k].c_str());
plogf(" c%11.4E%11.4E%11.4E |\n",
m_molNumSpecies_old[k], m_molNumSpecies_old[k]+m_deltaMolNumSpecies[k], m_deltaMolNumSpecies[k]);
}
@ -1002,7 +1002,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Reduction in step size due to component ");
plogf("%s", SpName[ll].c_str());
plogf("%s", m_speciesName[ll].c_str());
plogf(" going negative = %11.3E", par);
plogendl();
}
@ -1032,7 +1032,7 @@ namespace VCSnonideal {
if (m_molNumSpecies_new[kspec] < 0.0 && (m_speciesUnknownType[kspec]
!= VCS_SPECIES_TYPE_INTERFACIALVOLTAGE)) {
plogf("vcs_solve_TP: ERROR on step change wt[%d:%s]: %g < 0.0",
kspec, SpName[kspec].c_str(), m_molNumSpecies_new[kspec]);
kspec, m_speciesName[kspec].c_str(), m_molNumSpecies_new[kspec]);
plogendl();
exit(-1);
}
@ -1094,12 +1094,12 @@ namespace VCSnonideal {
plogf(" --- SPECIES Status INIT MOLES TENT_MOLES");
plogf(" FINAL KMOLES INIT_DEL_G/RT TENT_DEL_G/RT FINAL_DELTA_G/RT\n");
for (i = 0; i < m_numComponents; ++i) {
plogf(" --- %-12.12s", SpName[i].c_str());
plogf(" --- %-12.12s", m_speciesName[i].c_str());
plogf(" %14.6E %14.6E %14.6E\n", m_molNumSpecies_old[i], m_molNumSpecies_old[i] + m_deltaMolNumSpecies[i], m_molNumSpecies_new[i]);
}
for (kspec = m_numComponents; kspec < m_numSpeciesRdc; ++kspec) {
irxn = kspec - m_numComponents;
plogf(" --- %-12.12s", SpName[kspec].c_str());
plogf(" --- %-12.12s", m_speciesName[kspec].c_str());
plogf(" %2d %14.6E%14.6E%14.6E%14.6E%14.6E%14.6E\n", spStatus[irxn],
m_molNumSpecies_old[kspec], m_molNumSpecies_old[kspec]+m_deltaMolNumSpecies[kspec],
m_molNumSpecies_new[kspec], m_deltaGRxn_old[irxn],
@ -1137,13 +1137,13 @@ namespace VCSnonideal {
plogf(" --- Species Status Initial_KMoles Final_KMoles Initial_Mu/RT");
plogf(" Mu/RT Init_Del_G/RT Delta_G/RT\n");
for (i = 0; i < m_numComponents; ++i) {
plogf(" --- %-12.12s", SpName[i].c_str()); plogf(" ");
plogf(" --- %-12.12s", m_speciesName[i].c_str()); plogf(" ");
plogf("%14.6E%14.6E%14.6E%14.6E\n", m_molNumSpecies_old[i],
m_molNumSpecies_new[i], m_feSpecies_old[i], m_feSpecies_curr[i]);
}
for (i = m_numComponents; i < m_numSpeciesRdc; ++i) {
l1 = i - m_numComponents;
plogf(" --- %-12.12s", SpName[i].c_str());
plogf(" --- %-12.12s", m_speciesName[i].c_str());
plogf(" %2d %14.6E%14.6E%14.6E%14.6E%14.6E%14.6E\n",
spStatus[l1], m_molNumSpecies_old[i],
m_molNumSpecies_new[i], m_feSpecies_old[i], m_feSpecies_curr[i],
@ -1151,7 +1151,7 @@ namespace VCSnonideal {
}
for (kspec = m_numSpeciesRdc; kspec < m_numSpeciesTot; ++kspec) {
l1 = kspec - m_numComponents;
plogf(" --- %-12.12s", SpName[kspec].c_str());
plogf(" --- %-12.12s", m_speciesName[kspec].c_str());
plogf(" %2d %14.6E%14.6E%14.6E%14.6E%14.6E%14.6E\n",
spStatus[l1], m_molNumSpecies_old[kspec],
m_molNumSpecies_new[kspec], m_feSpecies_old[kspec], m_feSpecies_curr[kspec],
@ -1372,8 +1372,8 @@ namespace VCSnonideal {
if (m_stoichCoeffRxnMatrix[i][j] != 0.0) {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Get a new basis because %s", SpName[l].c_str());
plogf(" is better than comp %s", SpName[j].c_str());
plogf(" --- Get a new basis because %s", m_speciesName[l].c_str());
plogf(" is better than comp %s", m_speciesName[j].c_str());
plogf(" and share nonzero stoic: %-9.1f",
m_stoichCoeffRxnMatrix[i][j]);
plogendl();
@ -1391,8 +1391,8 @@ namespace VCSnonideal {
if (dg[i] < 0.0) {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Get a new basis because %s", SpName[l].c_str());
plogf(" has dg < 0.0 and comp %s has zero mole num", SpName[j].c_str());
plogf(" --- Get a new basis because %s", m_speciesName[l].c_str());
plogf(" has dg < 0.0 and comp %s has zero mole num", m_speciesName[j].c_str());
plogf(" and share nonzero stoic: %-9.1f",
m_stoichCoeffRxnMatrix[i][j]);
plogendl();
@ -1433,9 +1433,9 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Get a new basis because ");
plogf("%s", SpName[l].c_str());
plogf("%s", m_speciesName[l].c_str());
plogf(" is better than comp ");
plogf("%s", SpName[j].c_str());
plogf("%s", m_speciesName[j].c_str());
plogf(" and share nonzero stoic: %-9.1f",
m_stoichCoeffRxnMatrix[i][j]);
plogendl();
@ -1451,8 +1451,8 @@ namespace VCSnonideal {
if (dg[i] < 0.0) {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Get a new basis because %s", SpName[l].c_str());
plogf(" has dg < 0.0 and comp %s has zero mole num", SpName[j].c_str());
plogf(" --- Get a new basis because %s", m_speciesName[l].c_str());
plogf(" has dg < 0.0 and comp %s has zero mole num", m_speciesName[j].c_str());
plogf(" and share nonzero stoic: %-9.1f",
m_stoichCoeffRxnMatrix[i][j]);
plogendl();
@ -1496,7 +1496,7 @@ namespace VCSnonideal {
if (vcs_debug_print_lvl >= 2) {
if (spStatus[irxn] >= VCS_SPECIES_MINOR) {
plogf(" --- major/minor species is now zeroed out: %s\n",
SpName[kspec].c_str());
m_speciesName[kspec].c_str());
}
}
#endif
@ -1513,7 +1513,7 @@ namespace VCSnonideal {
plogf(" --- Zeroed Species turned into a "
"minor species: ");
}
plogf("%s\n", SpName[kspec].c_str());
plogf("%s\n", m_speciesName[kspec].c_str());
}
}
#endif
@ -1529,7 +1529,7 @@ namespace VCSnonideal {
} else {
plogf(" --- Noncomponent turned from zeroed to major: ");
}
plogf("%s\n", SpName[kspec].c_str());
plogf("%s\n", m_speciesName[kspec].c_str());
}
#endif
spStatus[irxn] = VCS_SPECIES_MAJOR;
@ -1561,7 +1561,7 @@ namespace VCSnonideal {
}
#endif
for (irxn = 0; irxn < m_numRxnRdc; ++irxn) {
if (spStatus[irxn] == VCS_SPECIES_MAJOR && (fabs(m_deltaGRxn_new[irxn]) > tolmaj)) {
if (spStatus[irxn] == VCS_SPECIES_MAJOR && (fabs(m_deltaGRxn_new[irxn]) > m_tolmaj)) {
if (m_VCount->Its >= maxit) {
solveFail = -1;
/*
@ -1572,7 +1572,7 @@ namespace VCSnonideal {
} else {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf("%s failed\n", SpName[ir[irxn]].c_str());
plogf("%s failed\n", m_speciesName[ir[irxn]].c_str());
}
#endif
/*
@ -1628,7 +1628,7 @@ namespace VCSnonideal {
}
#endif
for (irxn = 0; irxn < m_numRxnRdc; ++irxn) {
if (spStatus[irxn] == VCS_SPECIES_MINOR && (fabs(m_deltaGRxn_new[irxn]) > tolmin)) {
if (spStatus[irxn] == VCS_SPECIES_MINOR && (fabs(m_deltaGRxn_new[irxn]) > m_tolmin)) {
if (m_VCount->Its >= maxit) {
solveFail = -1;
/*
@ -1639,7 +1639,7 @@ namespace VCSnonideal {
}
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf("%s failed\n", SpName[ir[irxn]].c_str());
plogf("%s failed\n", m_speciesName[ir[irxn]].c_str());
}
#endif
/*
@ -1992,7 +1992,7 @@ namespace VCSnonideal {
goto L_ZERO_SPECIES;
}
} else {
if (fabs(dg_irxn) <= tolmin2) {
if (fabs(dg_irxn) <= m_tolmin2) {
(*wt_kspec) = w_kspec;
(*ds_kspec) = 0.0;
return 0.0;
@ -2291,7 +2291,7 @@ namespace VCSnonideal {
double dx;
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Add back a deleted species: %-12s\n", SpName[kspec].c_str());
plogf(" --- Add back a deleted species: %-12s\n", m_speciesName[kspec].c_str());
}
#endif
/*
@ -2439,7 +2439,7 @@ namespace VCSnonideal {
++(m_numSpeciesRdc);
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- Make %s", SpName[kspec].c_str());
plogf(" --- Make %s", m_speciesName[kspec].c_str());
plogf(" an active but zeroed species because its phase "
"was zeroed\n");
}
@ -2804,7 +2804,7 @@ namespace VCSnonideal {
if (m_speciesUnknownType[kspec] != VCS_SPECIES_TYPE_INTERFACIALVOLTAGE) {
dnPhase_irxn = DnPhase[irxn];
dnPhase_irxn = m_deltaMolNumPhase[irxn];
if (m_molNumSpecies_old[kspec] == 0.0 && (! SSPhase[kspec])) {
/********************************************************************/
@ -2857,11 +2857,11 @@ namespace VCSnonideal {
* Don't bother if superconvergence has already been achieved
* in this mode.
*/
if (fabs(m_deltaGRxn_new[irxn]) <= tolmaj2) {
if (fabs(m_deltaGRxn_new[irxn]) <= m_tolmaj2) {
#ifdef DEBUG_MODE
sprintf(ANOTE,"Skipped: superconverged DG = %11.3E", m_deltaGRxn_new[irxn]);
if (vcs_debug_print_lvl >= 2) {
plogf(" --- %-12.12s", SpName[kspec].c_str());
plogf(" --- %-12.12s", m_speciesName[kspec].c_str());
plogf(" %12.4E %12.4E %12.4E | %s\n",
m_molNumSpecies_old[kspec], m_deltaMolNumSpecies[kspec], m_deltaGRxn_new[irxn], ANOTE);
}
@ -2877,7 +2877,7 @@ namespace VCSnonideal {
sprintf(ANOTE,"Skipped: IC = %3d and DG >0: %11.3E",
spStatus[irxn], m_deltaGRxn_new[irxn]);
if (vcs_debug_print_lvl >= 2) {
plogf(" --- %-12.12s", SpName[kspec].c_str());
plogf(" --- %-12.12s", m_speciesName[kspec].c_str());
plogf(" %12.4E %12.4E %12.4E | %s\n",
m_molNumSpecies_old[kspec], m_deltaMolNumSpecies[kspec], m_deltaGRxn_new[irxn], ANOTE);
}
@ -2937,14 +2937,14 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
sprintf(ANOTE, "Delta damped from %g "
"to %g due to component %d (%10s) going neg", m_deltaMolNumSpecies[kspec],
-m_molNumSpecies_old[j]/stoicC, j, SpName[j].c_str());
-m_molNumSpecies_old[j]/stoicC, j, m_speciesName[j].c_str());
#endif
m_deltaMolNumSpecies[kspec] = - m_molNumSpecies_old[j] / stoicC;
} else {
#ifdef DEBUG_MODE
sprintf(ANOTE, "Delta damped from %g "
"to %g due to component %d (%10s) zero", m_deltaMolNumSpecies[kspec],
-m_molNumSpecies_old[j]/stoicC, j, SpName[j].c_str());
-m_molNumSpecies_old[j]/stoicC, j, m_speciesName[j].c_str());
#endif
m_deltaMolNumSpecies[kspec] = 0.0;
}
@ -2956,7 +2956,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
sprintf(ANOTE, "Delta damped from %g "
"to %g due to %s going negative", m_deltaMolNumSpecies[kspec],
-m_molNumSpecies_old[kspec], SpName[kspec].c_str());
-m_molNumSpecies_old[kspec], m_speciesName[kspec].c_str());
#endif
m_deltaMolNumSpecies[kspec] = -m_molNumSpecies_old[kspec];
}
@ -3022,7 +3022,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- vcs_RxnStepSizes Special section to delete %s\n",
SpName[k].c_str());
m_speciesName[k].c_str());
plogf(" --- Immediate return - Restart iteration\n");
}
#endif
@ -3039,7 +3039,7 @@ namespace VCSnonideal {
} /* End of regular processing */
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- %-12.12s", SpName[kspec].c_str());
plogf(" --- %-12.12s", m_speciesName[kspec].c_str());
plogf(" %12.4E %12.4E %12.4E | %s\n",
m_molNumSpecies_old[kspec], m_deltaMolNumSpecies[kspec],
m_deltaGRxn_new[irxn], ANOTE);
@ -3329,7 +3329,7 @@ namespace VCSnonideal {
plogf("\n");
for (k = 0; k < m_numSpeciesTot; k++) {
plogf(" --- ");
vcs_print_stringTrunc(SpName[k].c_str(), 11, 1);
vcs_print_stringTrunc(m_speciesName[k].c_str(), 11, 1);
plogf(" | ");
for (j = 0; j < m_numElemConstraints; j++) {
plogf(" %8.2g", m_formulaMatrix[j][k]);
@ -3565,8 +3565,8 @@ namespace VCSnonideal {
if (jr != k) {
#ifdef DEBUG_MODE
if (vcs_debug_print_lvl >= 2) {
plogf(" --- %-12.12s", (SpName[k]).c_str());
plogf("(%9.2g) replaces %-12.12s", m_molNumSpecies_old[k], SpName[jr].c_str());
plogf(" --- %-12.12s", (m_speciesName[k]).c_str());
plogf("(%9.2g) replaces %-12.12s", m_molNumSpecies_old[k], m_speciesName[jr].c_str());
plogf("(%9.2g) as component %3d\n", m_molNumSpecies_old[jr], jr);
}
#endif
@ -3576,7 +3576,7 @@ namespace VCSnonideal {
#ifdef DEBUG_MODE
else {
if (vcs_debug_print_lvl >= 2) {
plogf(" --- %-12.12s", SpName[k].c_str());
plogf(" --- %-12.12s", m_speciesName[k].c_str());
plogf("(%9.2g) remains ", m_molNumSpecies_old[k]);
plogf(" as component %3d\n", jr);
}
@ -3726,13 +3726,13 @@ namespace VCSnonideal {
}
plogf("\n --- NonComponent| Moles | ");
for (j = 0; j < ncTrial; j++) {
plogf("%-10.10s", SpName[j].c_str());
plogf("%-10.10s", m_speciesName[j].c_str());
}
//plogf("| m_scSize");
plogf("\n");
for (i = 0; i < m_numRxnTot; i++) {
plogf(" --- %3d ", ir[i]);
plogf("%-10.10s", SpName[ir[i]].c_str());
plogf("%-10.10s", m_speciesName[ir[i]].c_str());
plogf("|%10.3g|", m_molNumSpecies_old[ir[i]]);
for (j = 0; j < ncTrial; j++) {
plogf(" %6.2f", m_stoichCoeffRxnMatrix[i][j]);
@ -3754,19 +3754,19 @@ namespace VCSnonideal {
/*
* Zero out the change of Phase Moles array
*/
vcs_dzero(DnPhase[0], (NSPECIES0)*(NPHASE0));
vcs_izero(PhaseParticipation[0], (NSPECIES0)*(NPHASE0));
vcs_dzero(m_deltaMolNumPhase[0], (NSPECIES0)*(NPHASE0));
vcs_izero(m_phaseParticipation[0], (NSPECIES0)*(NPHASE0));
/*
* Loop over each reaction, creating the change in Phase Moles
* array, DnPhase[irxn][iphase],
* array, m_deltaMolNumPhase[irxn][iphase],
* and the phase participation array, PhaseParticipation[irxn][iphase]
*/
for (irxn = 0; irxn < m_numRxnTot; ++irxn) {
scrxn_ptr = m_stoichCoeffRxnMatrix[irxn];
dptr = DnPhase[irxn];
dptr = m_deltaMolNumPhase[irxn];
kspec = ir[irxn];
int iph = PhaseID[kspec];
int *pp_ptr = PhaseParticipation[irxn];
int *pp_ptr = m_phaseParticipation[irxn];
dptr[iph] = 1.0;
pp_ptr[iph]++;
for (j = 0; j < ncTrial; ++j) {
@ -3882,7 +3882,7 @@ namespace VCSnonideal {
if (vcs_debug_print_lvl >= 2) {
plogf(" --- %s would have popped back into existance but"
" needed component %s is zero\n",
SpName[kspec].c_str(), SpName[j].c_str());
m_speciesName[kspec].c_str(), m_speciesName[j].c_str());
}
#endif
if (SSPhase[kspec]) {
@ -3906,7 +3906,7 @@ namespace VCSnonideal {
if (vcs_debug_print_lvl >= 2) {
plogf(" --- %s would have popped back into existance but"
" needed element %s is zero\n",
SpName[kspec].c_str(), (ElName[j]).c_str());
m_speciesName[kspec].c_str(), (ElName[j]).c_str());
}
#endif
if (SSPhase[kspec]) {
@ -4216,7 +4216,7 @@ namespace VCSnonideal {
if (ll == 0) {
if (lbot != 0) {
plogf(" --- Subroutine vcs_dfe called for one species: ");
plogf("%-12.12s", SpName[lbot].c_str());
plogf("%-12.12s", m_speciesName[lbot].c_str());
} else {
plogf(" --- Subroutine vcs_dfe called for all species");
}
@ -4641,7 +4641,7 @@ namespace VCSnonideal {
pv1->IndSpecies[kp1] = k2;
pv2->IndSpecies[kp2] = k1;
vcsUtil_stsw(SpName, k1, k2);
vcsUtil_stsw(m_speciesName, k1, k2);
SWAP(m_molNumSpecies_old[k1], m_molNumSpecies_old[k2], t1);
SWAP(m_speciesUnknownType[k1], m_speciesUnknownType[k2], j);
SWAP(m_molNumSpecies_new[k1], m_molNumSpecies_new[k2], t1);
@ -4653,7 +4653,7 @@ namespace VCSnonideal {
SWAP(m_feSpecies_new[k1], m_feSpecies_new[k2], t1);
SWAP(SSPhase[k1], SSPhase[k2], j);
SWAP(PhaseID[k1], PhaseID[k2], j);
SWAP(ind[k1], ind[k2], j);
SWAP(m_speciesIndexVector[k1], m_speciesIndexVector[k2], j);
SWAP(indPhSp[k1], indPhSp[k2], j);
SWAP(SpecActConvention[k1], SpecActConvention[k2], j);
SWAP(SpecLnMnaught[k1], SpecLnMnaught[k2], t1);
@ -4694,9 +4694,9 @@ namespace VCSnonideal {
}
SWAP(m_scSize[i1], m_scSize[i2], t1);
for (iph = 0; iph < m_numPhases; iph++) {
SWAP(DnPhase[i1][iph], DnPhase[i2][iph], t1);
SWAP(PhaseParticipation[i1][iph],
PhaseParticipation[i2][iph], j);
SWAP(m_deltaMolNumPhase[i1][iph], m_deltaMolNumPhase[i2][iph], t1);
SWAP(m_phaseParticipation[i1][iph],
m_phaseParticipation[i2][iph], j);
}
SWAP(m_deltaGRxn_new[i1], m_deltaGRxn_new[i2], t1);
SWAP(m_deltaGRxn_old[i1], m_deltaGRxn_old[i2], t1);