[Equil] reformat warnings

This commit is contained in:
Ingmar Schoegl 2019-11-03 19:43:55 -06:00 committed by Ray Speth
parent 7d72cc9baa
commit 72082d026a
2 changed files with 11 additions and 8 deletions

View file

@ -111,9 +111,10 @@ void ChemEquil::initialize(thermo_t& s)
// the element should be an electron... if it isn't // the element should be an electron... if it isn't
// print a warning. // print a warning.
if (s.atomicWeight(m) > 1.0e-3) { if (s.atomicWeight(m) > 1.0e-3) {
writelog("WARNING: species {} has {} atoms of element {}," warn_user("ChemEquil::initialize",
" but this element is not an electron.\n", "species {} has {} atoms of element {}, "
s.speciesName(k), s.nAtoms(k,m), s.elementName(m)); "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 || if (s.temperature() > s.maxTemp() + 1.0 ||
s.temperature() < s.minTemp() - 1.0) { s.temperature() < s.minTemp() - 1.0) {
writelog("Warning: Temperature ({} K) outside valid range of " warn_user("ChemEquil::equilibrate",
"{} K to {} K\n", "Temperature ({} K) outside valid range of {} K "
s.temperature(), s.minTemp(), s.maxTemp()); "to {} K", s.temperature(), s.minTemp(), s.maxTemp());
} }
return 0; return 0;
} }
@ -657,7 +658,8 @@ int ChemEquil::equilibrate(thermo_t& s, const char* XYstr,
} }
} }
if (fctr != 1.0 && loglevel > 0) { 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 // multiply the step by the scaling factor

View file

@ -587,7 +587,8 @@ void vcs_VolPhase::setPtrThermoPhase(ThermoPhase* tp_ptr)
size_t nelem = TP_ptr->nElements(); size_t nelem = TP_ptr->nElements();
if (nsp != m_numSpecies) { if (nsp != m_numSpecies) {
if (m_numSpecies != 0) { 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()); resize(VP_ID_, nsp, nelem, PhaseName.c_str());
} }