(re-)add example uses of {fmt}

This commit is contained in:
Axel Kohlmeyer
2020-05-26 15:16:35 -04:00
parent 56cb761b04
commit b5b71bbb92
11 changed files with 144 additions and 204 deletions

View File

@ -13,6 +13,7 @@
#include "verlet.h"
#include <cstring>
#include <string>
#include "neighbor.h"
#include "domain.h"
#include "comm.h"
@ -30,6 +31,7 @@
#include "modify.h"
#include "timer.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -87,9 +89,10 @@ void Verlet::setup(int flag)
if (comm->me == 0 && screen) {
fprintf(screen,"Setting up Verlet run ...\n");
if (flag) {
fprintf(screen," Unit style : %s\n",update->unit_style);
fprintf(screen," Current step : " BIGINT_FORMAT "\n",update->ntimestep);
fprintf(screen," Time step : %g\n",update->dt);
fmt::print(screen," Unit style : {}\n"
" Current step : {}\n"
" Time step : {}\n",
update->unit_style,update->ntimestep,update->dt);
timer->print_timeout(screen);
}
}