From 4e56b6f7e6f037c0903f2d90ea6570a3f5b30abb Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Fri, 18 Jan 2008 20:50:25 +0000 Subject: [PATCH] Printing lvls resolved -> they were turning negative --- Cantera/src/equil/vcs_MultiPhaseEquil.cpp | 2 +- Cantera/src/equil/vcs_internal.h | 6 ++---- Cantera/src/equil/vcs_solve.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Cantera/src/equil/vcs_MultiPhaseEquil.cpp b/Cantera/src/equil/vcs_MultiPhaseEquil.cpp index 533e89e35..dd0a17095 100644 --- a/Cantera/src/equil/vcs_MultiPhaseEquil.cpp +++ b/Cantera/src/equil/vcs_MultiPhaseEquil.cpp @@ -619,7 +619,7 @@ namespace Cantera { * Call the thermo Program */ int ip1 = m_printLvl; - int ipr = m_printLvl-1; + int ipr = MAX(0, m_printLvl-1); if (m_printLvl >= 3) { ip1 = m_printLvl - 2; } else { diff --git a/Cantera/src/equil/vcs_internal.h b/Cantera/src/equil/vcs_internal.h index 08ef0a6e0..12956e63a 100644 --- a/Cantera/src/equil/vcs_internal.h +++ b/Cantera/src/equil/vcs_internal.h @@ -421,7 +421,7 @@ namespace VCSnonideal { * @param length length of the vector to zero. */ inline void vcs_vdzero(std::vector &vec_to, int length) { - (void) memset(VCS_DATA_PTR(vec_to), 0, (length) * sizeof(double)); + (void) memset((void *)VCS_DATA_PTR(vec_to), 0, (length) * sizeof(double)); } //! Zero a std int vector @@ -430,7 +430,7 @@ namespace VCSnonideal { * @param length length of the vector to zero. */ inline void vcs_vizero(std::vector &vec_to, int length) { - (void) memset(VCS_DATA_PTR(vec_to), 0, (length) * sizeof(int)); + (void) memset((void *)VCS_DATA_PTR(vec_to), 0, (length) * sizeof(int)); } //! Copy one std double vector into another @@ -535,8 +535,6 @@ namespace VCSnonideal { */ bool vcs_doubleEqual(double d1, double d2); - /****************************************************************************/ } #endif -/****************************************************************************/ diff --git a/Cantera/src/equil/vcs_solve.cpp b/Cantera/src/equil/vcs_solve.cpp index 63c58adae..2fcd0d931 100644 --- a/Cantera/src/equil/vcs_solve.cpp +++ b/Cantera/src/equil/vcs_solve.cpp @@ -398,7 +398,7 @@ namespace VCSnonideal { /* * If requested to print anything out, go ahead and do so; */ - if (ipr) vcs_report(iconv); + if (ipr > 0) vcs_report(iconv); /* * Copy the results of the run back to the VCS_PROB structure, * which is returned to the user.