diff --git a/src/kinetics/solveSP.cpp b/src/kinetics/solveSP.cpp index e4549ae30..869128a3f 100644 --- a/src/kinetics/solveSP.cpp +++ b/src/kinetics/solveSP.cpp @@ -644,8 +644,6 @@ void solveSP::resjac_eval(std::vector &JacCol, } } -#define APPROACH 0.80 - /*! * This function calculates a damping factor for the Newton iteration update * vector, dxneg, to insure that all site and bulk fractions, x, remain @@ -659,6 +657,7 @@ void solveSP::resjac_eval(std::vector &JacCol, */ static doublereal calc_damping(doublereal x[], doublereal dxneg[], size_t dim, int* label) { + const doublereal APPROACH = 0.80; doublereal damp = 1.0, xnew, xtop, xbot; static doublereal damp_old = 1.0; @@ -714,7 +713,6 @@ static doublereal calc_damping(doublereal x[], doublereal dxneg[], size_t dim, i return damp; } /* calc_damping */ -#undef APPROACH /* * This function calculates the norm of an update, dx[], diff --git a/src/numerics/solveProb.cpp b/src/numerics/solveProb.cpp index 202383753..da670d5b6 100644 --- a/src/numerics/solveProb.cpp +++ b/src/numerics/solveProb.cpp @@ -443,10 +443,9 @@ void solveProb::resjac_eval(std::vector &JacCol, } -#define APPROACH 0.50 - doublereal solveProb::calc_damping(doublereal x[], doublereal dxneg[], size_t dim, size_t* label) { + const doublereal APPROACH = 0.50; doublereal damp = 1.0, xnew, xtop, xbot; static doublereal damp_old = 1.0; *label = npos; @@ -517,7 +516,6 @@ doublereal solveProb::calc_damping(doublereal x[], doublereal dxneg[], size_t di return damp; } -#undef APPROACH /* * This function calculates the norm of an update, dx[],