From 69840fd235ad58a8b1bc44291b483ee4f8663eec Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Thu, 5 Feb 2009 17:10:03 +0000 Subject: [PATCH] Several fixes due to Solaris port --- Cantera/src/equil/vcs_phaseStability.cpp | 2 ++ Cantera/src/equil/vcs_solve_TP.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cantera/src/equil/vcs_phaseStability.cpp b/Cantera/src/equil/vcs_phaseStability.cpp index 238d8cb2f..28a76fbe5 100644 --- a/Cantera/src/equil/vcs_phaseStability.cpp +++ b/Cantera/src/equil/vcs_phaseStability.cpp @@ -108,7 +108,9 @@ namespace VCSnonideal { for (iph = 0; iph < m_numPhases; iph++) { Vphase = m_VolPhaseList[iph]; int existence = Vphase->exists(); +#ifdef DEBUG_MODE strcpy(anote, ""); +#endif if (existence > 0) { #ifdef DEBUG_MODE diff --git a/Cantera/src/equil/vcs_solve_TP.cpp b/Cantera/src/equil/vcs_solve_TP.cpp index 5c768bf6f..18a004149 100644 --- a/Cantera/src/equil/vcs_solve_TP.cpp +++ b/Cantera/src/equil/vcs_solve_TP.cpp @@ -120,6 +120,8 @@ namespace VCSnonideal { vcs_VolPhase *Vphase; double *sc_irxn = NULL; /* Stoichiometric coefficients for cur rxn */ double *dnPhase_irxn; + double atomComp; + int iphasePop; #ifdef DEBUG_MODE char ANOTE[128]; /* @@ -450,7 +452,7 @@ namespace VCSnonideal { * First step is a major branch in the algorithm. * We first determine if a phase pops into existence. */ - int iphasePop = vcs_popPhaseID(); + iphasePop = vcs_popPhaseID(); /* * */ @@ -635,7 +637,7 @@ namespace VCSnonideal { for (int j = 0; j < m_numElemConstraints; ++j) { int elType = m_elType[j]; if (elType == VCS_ELEM_TYPE_ABSPOS) { - double atomComp = m_formulaMatrix[j][kspec]; + atomComp = m_formulaMatrix[j][kspec]; if (atomComp > 0.0) { double maxPermissible = m_elemAbundancesGoal[j] / atomComp; if (maxPermissible < VCS_DELETE_MINORSPECIES_CUTOFF) {