Skip to content

Commit

Permalink
[Transport] introduce warn_user
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingmar Schoegl committed Nov 4, 2019
1 parent fa1292c commit 08aca22
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/transport/MMCollisionInt.cpp
Expand Up @@ -428,8 +428,9 @@ void MMCollisionInt::fit_omega22(int degree, doublereal deltastar,
w[0]= -1.0;
double rmserr = polyfit(n, degree, logT, values.data(), w.data(), o22);
if (m_loglevel > 0 && rmserr > 0.01) {
writelogf("Warning: RMS error = %12.6g in omega_22 fit"
"with delta* = %12.6g\n", rmserr, deltastar);
warn_user("MMCollisionInt::fit_omega22",
"RMS error = %12.6g in omega_22 fit"
"with delta* = %12.6g\n", rmserr, deltastar);
}
}

Expand Down Expand Up @@ -474,17 +475,20 @@ void MMCollisionInt::fit(int degree, doublereal deltastar,

writelog("astar = [" + vec2str(vector_fp(a, a+degree+1))+ "]\n");
if (rmserr > 0.01) {
writelogf("Warning: RMS error = %12.6g for A* fit\n", rmserr);
warn_user("MMCollisionInt::fit",
"RMS error = %12.6g for A* fit\n", rmserr);
}

writelog("bstar = [" + vec2str(vector_fp(b, b+degree+1))+ "]\n");
if (rmserr > 0.01) {
writelogf("Warning: RMS error = %12.6g for B* fit\n", rmserr);
warn_user("MMCollisionInt::fit",
"RMS error = %12.6g for B* fit\n", rmserr);
}

writelog("cstar = [" + vec2str(vector_fp(c, c+degree+1))+ "]\n");
if (rmserr > 0.01) {
writelogf("Warning: RMS error = %12.6g for C* fit\n", rmserr);
warn_user("MMCollisionInt::fit",
"RMS error = %12.6g for C* fit\n", rmserr);
}
}
}
Expand Down

0 comments on commit 08aca22

Please sign in to comment.