Skip to content

Native sampling info file with single decimal point precision #1820

@rthedin

Description

@rthedin

This line

fh << "time: " << m_sim.time().new_time() << std::endl;

is only printing a single decimal point. That is extremely problematic because the way it is, is assumes the time step is larger than 0.1. We end up with repeated times on the sampling_info files.

[rthedin@kl3 <path>]$ grep "Step: 2335[024]" log.*.out
Step: 23350 dt: 0.025 Time: 30000.05 to 30000.075
Step: 23352 dt: 0.025 Time: 30000.1 to 30000.125
Step: 23354 dt: 0.025 Time: 30000.15 to 30000.175
[rthedin@kl3 <path>]$ head -n 1 post_processing/box_hr2335[024]/sampling_info.yaml
==> post_processing/box_hr23350/sampling_info.yaml <==
time: 30000.1

==> post_processing/box_hr23352/sampling_info.yaml <==
time: 30000.1

==> post_processing/box_hr23354/sampling_info.yaml <==
time: 30000.2

Can we increase the precision here to match that of the simulation, or at least hard-code something that is more than a single digit?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions