From 2fdbce42b2258574419e6de529924ddd683dc1e4 Mon Sep 17 00:00:00 2001 From: Ingmar Schoegl Date: Sun, 3 Nov 2019 18:59:14 -0600 Subject: [PATCH] [OneD] reformat warnings --- src/oneD/Domain1D.cpp | 6 +++--- src/oneD/Sim1D.cpp | 4 ++-- src/oneD/StFlow.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/oneD/Domain1D.cpp b/src/oneD/Domain1D.cpp index 094bcf226..8bd77992c 100644 --- a/src/oneD/Domain1D.cpp +++ b/src/oneD/Domain1D.cpp @@ -129,9 +129,9 @@ void Domain1D::restore(const XML_Node& dom, doublereal* soln, int loglevel) getFloatArray(*nodes[i], values, false); if (values.size() != nComponents()) { if (loglevel > 0) { - writelog("Warning: Domain1D::restore: Got an array of length {}" - " when one of length {} was expected. " - "Tolerances for individual species may not be preserved.\n", + warn_user("Domain1D::restore", "Received an array of length " + "{} when one of length {} was expected. Tolerances for " + "individual species may not be preserved.", values.size(), nComponents()); } // The number of components will differ when restoring from a diff --git a/src/oneD/Sim1D.cpp b/src/oneD/Sim1D.cpp index 149662f75..5231bdf35 100644 --- a/src/oneD/Sim1D.cpp +++ b/src/oneD/Sim1D.cpp @@ -124,8 +124,8 @@ void Sim1D::restore(const std::string& fname, const std::string& id, for (size_t m = 0; m < nDomains(); m++) { Domain1D& dom = domain(m); if (loglevel > 0 && xd[m]->attrib("id") != dom.id()) { - writelog("Warning: domain names do not match: '" + - (*xd[m])["id"] + + "' and '" + dom.id() + "'\n"); + warn_user("Sim1D::restore", "Domain names do not match: " + "'{} and '{}'", (*xd[m])["id"], dom.id()); } dom.resize(domain(m).nComponents(), intValue((*xd[m])["points"])); } diff --git a/src/oneD/StFlow.cpp b/src/oneD/StFlow.cpp index 48e70bdbf..d44cf444e 100644 --- a/src/oneD/StFlow.cpp +++ b/src/oneD/StFlow.cpp @@ -760,7 +760,7 @@ void StFlow::restore(const XML_Node& dom, doublereal* soln, int loglevel) // This may occur when restoring from a mechanism with a different // number of species. if (loglevel > 0) { - writelog("\nWarning: StFlow::restore: species_enabled is " + warn_user("StFlow::restore", "species_enabled is " "length {} but should be length {}. Enabling all species " "equations by default.", x.size(), m_nsp); }