diff --git a/include/cantera/equil/vcs_MultiPhaseEquil.h b/include/cantera/equil/vcs_MultiPhaseEquil.h index eaab27edd..9e48cc1e7 100644 --- a/include/cantera/equil/vcs_MultiPhaseEquil.h +++ b/include/cantera/equil/vcs_MultiPhaseEquil.h @@ -370,6 +370,8 @@ protected: * Default is to allow printing. But, you can assign this to zero globally to * turn off all time printing. This is helpful for test suite purposes where * you are interested in differences in text files. + * @deprecated Call `VCS_SOLVE::disable_timing()` instead. To be removed after + * Cantera 2.3. */ extern int vcs_timing_print_lvl; diff --git a/include/cantera/equil/vcs_solve.h b/include/cantera/equil/vcs_solve.h index 05a288197..d3a014e41 100644 --- a/include/cantera/equil/vcs_solve.h +++ b/include/cantera/equil/vcs_solve.h @@ -1866,6 +1866,10 @@ public: */ int m_timing_print_lvl; + //! Disable printing of timing information. Used to generate consistent + //! output for tests. + static void disableTiming(); + friend class vcs_phaseStabilitySolve; }; diff --git a/src/equil/vcs_solve.cpp b/src/equil/vcs_solve.cpp index 2b24af230..6622ff4c4 100644 --- a/src/equil/vcs_solve.cpp +++ b/src/equil/vcs_solve.cpp @@ -825,4 +825,8 @@ double VCS_SOLVE::vcs_VolTotal(const double tkelvin, const double pres, return VolTot; } +void VCS_SOLVE::disableTiming() { + vcs_timing_print_lvl = 0; +} + } diff --git a/test_problems/VCSnonideal/LatticeSolid_LiSi/latsol.cpp b/test_problems/VCSnonideal/LatticeSolid_LiSi/latsol.cpp index e575157d2..33c5b3745 100644 --- a/test_problems/VCSnonideal/LatticeSolid_LiSi/latsol.cpp +++ b/test_problems/VCSnonideal/LatticeSolid_LiSi/latsol.cpp @@ -12,7 +12,7 @@ using namespace Cantera; void testProblem(int printLvl) { double T = 273.15 + 352.0; - vcs_timing_print_lvl = 0; + VCS_SOLVE::disableTiming(); // Create the phases std::unique_ptr LiSi_solid(newPhase("Li7Si3_ls.xml", diff --git a/test_problems/VCSnonideal/NaCl_equil/nacl_equil.cpp b/test_problems/VCSnonideal/NaCl_equil/nacl_equil.cpp index 9e076cb5c..17e276dac 100644 --- a/test_problems/VCSnonideal/NaCl_equil/nacl_equil.cpp +++ b/test_problems/VCSnonideal/NaCl_equil/nacl_equil.cpp @@ -33,7 +33,7 @@ int main(int argc, char** argv) int numFail = 0; int printLvl = 1; string inputFile = "HMW_NaCl.xml"; - vcs_timing_print_lvl = 0; + VCS_SOLVE::disableTiming(); /* * Process the command line arguments