simplify format handling
This commit is contained in:
@ -246,10 +246,8 @@ void FixSRP::setup_pre_force(int /*zz*/)
|
||||
int nadd_all = 0, ndel_all = 0;
|
||||
MPI_Allreduce(&ndel,&ndel_all,1,MPI_INT,MPI_SUM,world);
|
||||
MPI_Allreduce(&nadd,&nadd_all,1,MPI_INT,MPI_SUM,world);
|
||||
if (comm->me == 0) {
|
||||
sprintf(str, "Removed/inserted %d/%d bond particles.", ndel_all,nadd_all);
|
||||
error->message(FLERR,str);
|
||||
}
|
||||
if (comm->me == 0)
|
||||
error->message(FLERR,"Removed/inserted {}/{} bond particles.", ndel_all,nadd_all);
|
||||
|
||||
// check ghost comm distances
|
||||
// warn and change if shorter from estimate
|
||||
@ -276,11 +274,9 @@ void FixSRP::setup_pre_force(int /*zz*/)
|
||||
cutghostmin = comm->cutghost[2]/length2;
|
||||
|
||||
// stop if cutghost is insufficient
|
||||
if (cutneighmax_srp > cutghostmin) {
|
||||
sprintf(str, "Communication cutoff too small for fix srp. "
|
||||
"Need %f, current %f.", cutneighmax_srp, cutghostmin);
|
||||
error->all(FLERR,str);
|
||||
}
|
||||
if (cutneighmax_srp > cutghostmin)
|
||||
error->all(FLERR,"Communication cutoff too small for fix srp. "
|
||||
"Need {:.8}, current {:.8}", cutneighmax_srp, cutghostmin);
|
||||
|
||||
// assign tags for new atoms, update map
|
||||
atom->tag_extend();
|
||||
@ -515,14 +511,8 @@ void FixSRP::post_run()
|
||||
|
||||
bigint ndelete = natoms_previous - atom->natoms;
|
||||
|
||||
if (comm->me == 0) {
|
||||
if (screen) fprintf(screen,"Deleted " BIGINT_FORMAT
|
||||
" atoms, new total = " BIGINT_FORMAT "\n",
|
||||
ndelete,atom->natoms);
|
||||
if (logfile) fprintf(logfile,"Deleted " BIGINT_FORMAT
|
||||
" atoms, new total = " BIGINT_FORMAT "\n",
|
||||
ndelete,atom->natoms);
|
||||
}
|
||||
if (comm->me == 0)
|
||||
utils::logmesg(lmp,"Deleted {} atoms, new total = {}\n",ndelete,atom->natoms);
|
||||
|
||||
// verlet calls box_too_small_check() in post_run
|
||||
// this check maps all bond partners
|
||||
|
||||
Reference in New Issue
Block a user