From d4672515bd4a294934548526dc2705ddce22b2fb Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Mon, 23 Oct 2006 00:56:31 +0000 Subject: [PATCH] moved declaration of nCutoff to avoid jumping over it, causing a compile failure with gcc 4.0.1 on linuxChemEquil.cpp --- Cantera/src/ChemEquil.cpp | 9 ++++++--- Cantera/src/MultiPhaseEquil.cpp | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cantera/src/ChemEquil.cpp b/Cantera/src/ChemEquil.cpp index d614e006e..77a719b51 100755 --- a/Cantera/src/ChemEquil.cpp +++ b/Cantera/src/ChemEquil.cpp @@ -1237,6 +1237,8 @@ namespace Cantera { } #endif + double nCutoff; + bool normalStep = true; /* * Decide if we are to do a normal step or a modified step @@ -1304,8 +1306,8 @@ namespace Cantera { * The logic below looks for obvious cases where the current element * coefficient matrix is rank deficient. * - * The way around rank-deficiency is to lump-sum the corresponding row of the - * matrix. Note, lump-summing seems to work very well in terms of + * The way around rank-deficiency is to lump-sum the corresponding row + * of the matrix. Note, lump-summing seems to work very well in terms of * its stability properties, i.e., it heads in the right direction, * albeit with lousy convergence rates. * @@ -1317,7 +1319,8 @@ namespace Cantera { for (m = 0; m < m_mm; m++) { lumpSum[m] = 1; } - double nCutoff = 1.0E-4 * n_t_calc; + + nCutoff = 1.0E-4 * n_t_calc; #ifdef DEBUG_HKM_EPEQUIL if (debug_prnt_lvl > 0) { printf(" Lump Sum Elements Calculation: \n"); diff --git a/Cantera/src/MultiPhaseEquil.cpp b/Cantera/src/MultiPhaseEquil.cpp index ad157d5b2..cfd7bcef3 100644 --- a/Cantera/src/MultiPhaseEquil.cpp +++ b/Cantera/src/MultiPhaseEquil.cpp @@ -730,6 +730,7 @@ namespace Cantera { for (k = 0; k < m_nsp; k++) { kc = m_species[k]; if (m_mix->speciesPhaseIndex(kc) == ip) { + // bug fixed 7/12/06 DGG stoich = nu[k]; // nu[kc]; psum += stoich * stoich; }