print complete read_data and special output to both screen and logfile

This commit is contained in:
Axel Kohlmeyer 2020-07-22 07:23:33 -04:00
parent 938175d2bc
commit feebdf9149
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
2 changed files with 8 additions and 7 deletions

View File

@ -414,7 +414,7 @@ void ReadData::command(int narg, char **arg)
// open file on proc 0
if (me == 0) {
if (firstpass && screen) fprintf(screen,"Reading data file ...\n");
if (firstpass) utils::logmesg(lmp,"Reading data file ...\n");
open(arg[0]);
} else fp = NULL;

View File

@ -59,14 +59,15 @@ void Special::build()
MPI_Barrier(world);
double time1 = MPI_Wtime();
if (me == 0 && screen) {
if (me == 0) {
const double * const special_lj = force->special_lj;
const double * const special_coul = force->special_coul;
fmt::print(screen,"Finding 1-2 1-3 1-4 neighbors ...\n"
" special bond factors lj: {:<8} {:<8} {:<8}\n"
" special bond factors coul: {:<8} {:<8} {:<8}\n",
special_lj[1],special_lj[2],special_lj[3],
special_coul[1],special_coul[2],special_coul[3]);
auto mesg = fmt::format("Finding 1-2 1-3 1-4 neighbors ...\n"
" special bond factors lj: {:<8} {:<8} {:<8}\n"
" special bond factors coul: {:<8} {:<8} {:<8}\n",
special_lj[1],special_lj[2],special_lj[3],
special_coul[1],special_coul[2],special_coul[3]);
utils::logmesg(lmp,mesg);
}
// initialize nspecial counters to 0