simplify output in KSPACE package

This commit is contained in:
Axel Kohlmeyer
2020-06-29 08:17:27 -04:00
parent b1d4ca2b03
commit 7de4655e69
11 changed files with 183 additions and 338 deletions

View File

@ -28,6 +28,8 @@
#include "memory.h"
#include "math_const.h"
#include "remap.h"
#include "utils.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -151,20 +153,12 @@ void PPPMCG::compute(int eflag, int vflag)
charged_frac = static_cast<double>(charged_all) * 100.0
/ static_cast<double>(atom->natoms);
if (me == 0) {
if (screen)
fprintf(screen,
" PPPM/cg optimization cutoff: %g\n"
" Total charged atoms: %.1f%%\n"
" Min/max charged atoms/proc: %.1f%% %.1f%%\n",
smallq,charged_frac,charged_fmin,charged_fmax);
if (logfile)
fprintf(logfile,
" PPPM/cg optimization cutoff: %g\n"
" Total charged atoms: %.1f%%\n"
" Min/max charged atoms/proc: %.1f%% %.1f%%\n",
smallq,charged_frac,charged_fmin,charged_fmax);
}
if (me == 0)
utils::logmesg(lmp,fmt::format(" PPPM/cg optimization cutoff: {}\n"
" Total charged atoms: {:.1f}%\n"
" Min/max charged atoms/proc: {:.1f}%"
" {:.1f}%\n",smallq,
charged_frac,charged_fmin,charged_fmax));
}
// only need to rebuild this list after a neighbor list update