more output simplification with fmtlib, std::string, and utils::logmesg()
This commit is contained in:
@ -908,16 +908,10 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
|
||||
fix[ifix]->restart(state_restart_global[i]);
|
||||
used_restart_global[i] = 1;
|
||||
fix[ifix]->restart_reset = 1;
|
||||
if (comm->me == 0) {
|
||||
if (screen)
|
||||
fprintf(screen,"Resetting global fix info from restart file:\n");
|
||||
if (logfile)
|
||||
fprintf(logfile,"Resetting global fix info from restart file:\n");
|
||||
if (screen) fprintf(screen," fix style: %s, fix ID: %s\n",
|
||||
fix[ifix]->style,fix[ifix]->id);
|
||||
if (logfile) fprintf(logfile," fix style: %s, fix ID: %s\n",
|
||||
fix[ifix]->style,fix[ifix]->id);
|
||||
}
|
||||
if (comm->me == 0)
|
||||
utils::logmesg(lmp,fmt::format("Resetting global fix info from restart file:\n"
|
||||
" fix style: {}, fix ID: {}\n",
|
||||
fix[ifix]->style,fix[ifix]->id));
|
||||
}
|
||||
|
||||
// check if Fix is in restart_peratom list
|
||||
@ -930,16 +924,10 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
|
||||
for (int j = 0; j < atom->nlocal; j++)
|
||||
fix[ifix]->unpack_restart(j,index_restart_peratom[i]);
|
||||
fix[ifix]->restart_reset = 1;
|
||||
if (comm->me == 0) {
|
||||
if (screen)
|
||||
fprintf(screen,"Resetting peratom fix info from restart file:\n");
|
||||
if (logfile)
|
||||
fprintf(logfile,"Resetting peratom fix info from restart file:\n");
|
||||
if (screen) fprintf(screen," fix style: %s, fix ID: %s\n",
|
||||
fix[ifix]->style,fix[ifix]->id);
|
||||
if (logfile) fprintf(logfile," fix style: %s, fix ID: %s\n",
|
||||
fix[ifix]->style,fix[ifix]->id);
|
||||
}
|
||||
if (comm->me == 0)
|
||||
utils::logmesg(lmp,fmt::format("Resetting peratom fix info from restart file:\n"
|
||||
" fix style: {}, fix ID: {}\n",
|
||||
fix[ifix]->style,fix[ifix]->id));
|
||||
}
|
||||
|
||||
// increment nfix (if new)
|
||||
@ -1505,21 +1493,13 @@ void Modify::restart_deallocate(int flag)
|
||||
for (i = 0; i < nfix_restart_global; i++)
|
||||
if (used_restart_global[i] == 0) break;
|
||||
if (i == nfix_restart_global) {
|
||||
if (screen)
|
||||
fprintf(screen,"All restart file global fix info "
|
||||
"was re-assigned\n");
|
||||
if (logfile)
|
||||
fprintf(logfile,"All restart file global fix info "
|
||||
"was re-assigned\n");
|
||||
utils::logmesg(lmp,"All restart file global fix info was re-assigned\n");
|
||||
} else {
|
||||
if (screen) fprintf(screen,"Unused restart file global fix info:\n");
|
||||
if (logfile) fprintf(logfile,"Unused restart file global fix info:\n");
|
||||
utils::logmesg(lmp,"Unused restart file global fix info:\n");
|
||||
for (i = 0; i < nfix_restart_global; i++) {
|
||||
if (used_restart_global[i]) continue;
|
||||
if (screen) fprintf(screen," fix style: %s, fix ID: %s\n",
|
||||
style_restart_global[i],id_restart_global[i]);
|
||||
if (logfile) fprintf(logfile," fix style: %s, fix ID: %s\n",
|
||||
style_restart_global[i],id_restart_global[i]);
|
||||
utils::logmesg(lmp,fmt::format(" fix style: {}, fix ID: {}\n",
|
||||
style_restart_global[i],id_restart_global[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1541,21 +1521,13 @@ void Modify::restart_deallocate(int flag)
|
||||
for (i = 0; i < nfix_restart_peratom; i++)
|
||||
if (used_restart_peratom[i] == 0) break;
|
||||
if (i == nfix_restart_peratom) {
|
||||
if (screen)
|
||||
fprintf(screen,"All restart file peratom fix info "
|
||||
"was re-assigned\n");
|
||||
if (logfile)
|
||||
fprintf(logfile,"All restart file peratom fix info "
|
||||
"was re-assigned\n");
|
||||
utils::logmesg(lmp,"All restart file peratom fix info was re-assigned\n");
|
||||
} else {
|
||||
if (screen) fprintf(screen,"Unused restart file peratom fix info:\n");
|
||||
if (logfile) fprintf(logfile,"Unused restart file peratom fix info:\n");
|
||||
utils::logmesg(lmp,"Unused restart file peratom fix info:\n");
|
||||
for (i = 0; i < nfix_restart_peratom; i++) {
|
||||
if (used_restart_peratom[i]) continue;
|
||||
if (screen) fprintf(screen," fix style: %s, fix ID: %s\n",
|
||||
style_restart_peratom[i],id_restart_peratom[i]);
|
||||
if (logfile) fprintf(logfile," fix style: %s, fix ID: %s\n",
|
||||
style_restart_peratom[i],id_restart_peratom[i]);
|
||||
utils::logmesg(lmp,fmt::format(" fix style: {}, fix ID: {}\n",
|
||||
style_restart_peratom[i],id_restart_peratom[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user