diff --git a/src/equil/ChemEquil.cpp b/src/equil/ChemEquil.cpp index 0fb89ec44..420234a06 100644 --- a/src/equil/ChemEquil.cpp +++ b/src/equil/ChemEquil.cpp @@ -111,9 +111,10 @@ void ChemEquil::initialize(thermo_t& s) // the element should be an electron... if it isn't // print a warning. if (s.atomicWeight(m) > 1.0e-3) { - writelog("WARNING: species {} has {} atoms of element {}," - " but this element is not an electron.\n", - s.speciesName(k), s.nAtoms(k,m), s.elementName(m)); + warn_user("ChemEquil::initialize", + "species {} has {} atoms of element {}, " + "but this element is not an electron.", + s.speciesName(k), s.nAtoms(k,m), s.elementName(m)); } } } @@ -583,9 +584,9 @@ int ChemEquil::equilibrate(thermo_t& s, const char* XYstr, if (s.temperature() > s.maxTemp() + 1.0 || s.temperature() < s.minTemp() - 1.0) { - writelog("Warning: Temperature ({} K) outside valid range of " - "{} K to {} K\n", - s.temperature(), s.minTemp(), s.maxTemp()); + warn_user("ChemEquil::equilibrate", + "Temperature ({} K) outside valid range of {} K " + "to {} K", s.temperature(), s.minTemp(), s.maxTemp()); } return 0; } @@ -657,7 +658,8 @@ int ChemEquil::equilibrate(thermo_t& s, const char* XYstr, } } if (fctr != 1.0 && loglevel > 0) { - writelogf("WARNING Soln Damping because of bounds: %g\n", fctr); + warn_user("ChemEquil::equilibrate", + "Soln Damping because of bounds: %g", fctr); } // multiply the step by the scaling factor diff --git a/src/equil/vcs_VolPhase.cpp b/src/equil/vcs_VolPhase.cpp index d3e4b3bc9..fb4edc0ae 100644 --- a/src/equil/vcs_VolPhase.cpp +++ b/src/equil/vcs_VolPhase.cpp @@ -587,7 +587,8 @@ void vcs_VolPhase::setPtrThermoPhase(ThermoPhase* tp_ptr) size_t nelem = TP_ptr->nElements(); if (nsp != m_numSpecies) { if (m_numSpecies != 0) { - plogf("Warning Nsp != NVolSpeces: %d %d \n", nsp, m_numSpecies); + warn_user("vcs_VolPhase::setPtrThermoPhase", + "Nsp != NVolSpeces: {} {}", nsp, m_numSpecies); } resize(VP_ID_, nsp, nelem, PhaseName.c_str()); }