Skip to content

Commit

Permalink
Make time output precision/format consistent with header in checkpoin…
Browse files Browse the repository at this point in the history
…t files (Exawind#1195)

* Make time output precision/format consistent with header in checkpoint files
  • Loading branch information
moprak-nrel authored Aug 15, 2024
1 parent 9cce9c0 commit d3b98ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion amr-wind/equation_systems/icns/source_terms/ABLForcing.H
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public:
std::ofstream outfile;
// Forces are recorded at n+1/2
outfile.open(m_force_timetable, std::ios::out | std::ios::app);
outfile << std::fixed << std::setprecision(15) << nph_time << "\t"
outfile << std::setprecision(17) << nph_time << "\t"
<< m_abl_forcing[0] << "\t" << m_abl_forcing[1] << "\t"
<< 0.0 << std::endl;
}
Expand Down
3 changes: 1 addition & 2 deletions amr-wind/wind_energy/ABLBoundaryPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,7 @@ void ABLBoundaryPlane::write_file()
if (m_out_fmt == "native") {
if (amrex::ParallelDescriptor::IOProcessor()) {
std::ofstream oftime(m_time_file, std::ios::out | std::ios::app);
oftime << t_step << ' ' << std::fixed << std::setprecision(15)
<< time << '\n';
oftime << t_step << ' ' << std::setprecision(17) << time << '\n';
oftime.close();
}

Expand Down

0 comments on commit d3b98ba

Please sign in to comment.