implement an utils::print() function similar to fmt::print()

this doesn't have the constexpr requirement for the format string.
also it will help porting to std::format in C++20, which doesn't
have a similar functionality either.
This commit is contained in:
Axel Kohlmeyer
2025-01-23 00:03:30 -05:00
parent b4f012057c
commit 8baec60155
6 changed files with 80 additions and 20 deletions

View File

@ -96,8 +96,8 @@ Here the we specify which methods of the fix should be called during
MPI_Allreduce(localAvgVel, globalAvgVel, 4, MPI_DOUBLE, MPI_SUM, world);
scale3(1.0 / globalAvgVel[3], globalAvgVel);
if ((comm->me == 0) && screen) {
fmt::print(screen,"{}, {}, {}\n",
globalAvgVel[0], globalAvgVel[1], globalAvgVel[2]);
utils::print(screen, "{}, {}, {}\n",
globalAvgVel[0], globalAvgVel[1], globalAvgVel[2]);
}
}