apply new logmesg() overload to a bunch of cases.

This commit is contained in:
Axel Kohlmeyer
2021-04-21 22:53:41 -04:00
parent 0cf1252f1f
commit d2cdb318ab
42 changed files with 259 additions and 297 deletions

View File

@ -1734,15 +1734,15 @@ void Pair::write_file(int narg, char **arg)
units, update->unit_style));
}
std::string date = utils::get_potential_date(table_file,"table");
utils::logmesg(lmp,fmt::format("Appending to table file {} with "
"DATE: {}\n", table_file, date));
utils::logmesg(lmp,"Appending to table file {} with DATE: {}\n",
table_file, date);
fp = fopen(table_file.c_str(),"a");
} else {
char datebuf[16];
time_t tv = time(nullptr);
strftime(datebuf,15,"%Y-%m-%d",localtime(&tv));
utils::logmesg(lmp,fmt::format("Creating table file {} with "
"DATE: {}\n", table_file, datebuf));
utils::logmesg(lmp,"Creating table file {} with DATE: {}\n",
table_file, datebuf);
fp = fopen(table_file.c_str(),"w");
if (fp) fmt::print(fp,"# DATE: {} UNITS: {} Created by pair_write\n",
datebuf, update->unit_style);