Remove fmt: convert J-R files to std::format (part 5)#11630
Conversation
Convert EnergyPlus::format/fmt::format -> std::format and {:.NR} -> {:.Nf}
in 35 J-R source files. fmt::join and raw-enum format args are kept on their
fmt entry point (no std::formatter exists). Surface-report view factors stay
{:.2f} (matches the coarse {:.2R} baseline; {:#G} measured worse).
No numeric result diffs; remaining EIO/table diffs are display-precision only.
|
|
|
CO2ControlDesignOARateTest fails EnergyPlus/tst/EnergyPlus/unit/MixedAir.unit.cc Line 6847 in 4a09beb - " ** ~~~ ** Minimum OA fraction = 2.9412E-003, Mech Vent OA fraction = 1.5603E-003",
+ " ** ~~~ ** Minimum OA fraction = 0.0029, Mech Vent OA fraction = 0.0016",@brianlball FYI git apply << 'EOF'
diff --git a/tst/EnergyPlus/unit/MixedAir.unit.cc b/tst/EnergyPlus/unit/MixedAir.unit.cc
index 13cef0f122..679a4d8a5c 100644
--- a/tst/EnergyPlus/unit/MixedAir.unit.cc
+++ b/tst/EnergyPlus/unit/MixedAir.unit.cc
@@ -6844,7 +6844,7 @@ TEST_F(EnergyPlusFixture, CO2ControlDesignOARateTest)
"1, Min OA fraction is used.",
" ** ~~~ ** This may be overriding desired ventilation controls. Check inputs for Minimum Outdoor Air Flow Rate, Minimum Outdoor Air "
"Schedule Name and Controller:MechanicalVentilation",
- " ** ~~~ ** Minimum OA fraction = 2.9412E-003, Mech Vent OA fraction = 1.5603E-003",
+ " ** ~~~ ** Minimum OA fraction = 0.0029, Mech Vent OA fraction = 0.0016",
" ** ~~~ ** Environment=, at Simulation time= 00:00 - 00:15",
});
EOF |
@brianlball, you can revert if you don't like it, just figured having CI running while it's nighttime would save you a bit of wait time when you wake up
|
|
View factors span 0-1 and dip below 0.1; {:.2f} truncated those cells
(2.34E-002 -> 0.02). {:#G} matches the parts 2/3 magnitude-spanning
precedent. Geometry columns (area/angles/vertices) stay {:.2f}.
|
|
View factors now render 0.500000 (6 sig figs) instead of 0.50.
|
|
std::format({:#G}, 0.5) renders 0.500000 on MSVC/libstdc++ but
0.50000 on macOS libc++, so there is no portable output and CI cannot
pass. {:.2f} is standardized across STLs and passed all platforms.
Restores the original part-5 state (byte-identical to a29e90c).
|
Thanks @jmarrec for catching Status: green on
Note on view factors: I briefly tried (CI re-running on |
|
|
|
@brianlball it looks like there's still some |
|
|
|
|
|
|
|
|
|
|
Thanks @brianlball. This one is ready to go. Merging. |


Part 5 of the Remove-fmt campaign (continues #11553 / #11588 / #11592, and #11619 for the
I*files).Scope — 35 source files, basenames J–R
Convert
EnergyPlus::format/fmt::format→std::formatand remove the custom{R}flag ({:.NR}→{:.Nf}).LowTempRadiantSystem, Material, Micro{CHP,turbine}ElectricGenerator, MixedAir, OutdoorAirUnit, Output{Reports,ReportTabular}, OutsideEnergySources, PackagedThermalStorageCoil, PCMThermalStorage, Photovoltaic{s,ThermalCollectors}, PipeHeatTransfer, Plant{CentralGSHP,Chillers,ComponentTemperatureSources,CondLoopOperation,HeatExchangerFluidToFluid,LoopHeatPumpEIR,Utilities}, Plant/{Loop,LoopSide,PlantManager}, PondGroundHeatExchanger, PoweredInductionUnits, Psychrometrics, Pumps, PurchasedAirManager, PVWatts, RefrigeratedCase, RoomAirModel{AirflowNetwork,Manager,UserTempPattern}, RuntimeLanguageProcessor.
Conversions
EnergyPlus::format+ 5fmt::format→ 910std::format{:.NR}→{:.Nf}; 0 residual{R}