amr-wind
amr-wind copied to clipboard
Tolerance issue when reading boundary data using `native` format
When running a case that takes boundary data as input, it fails on this assert: https://github.com/Exawind/amr-wind/blob/add85b1e6800a28023f0c535f426fd8f6a10106e/amr-wind/wind_energy/ABLBoundaryPlane.cpp#L766
I have a simple test case that starts at 19500 s, with boundary data saved starting at the same time. The format of the boundary data saved is native
(as netcdf
still seems to be really slow). I have added a few print statements right before the assert to try to debug it, and this is what I got:
--- DEBUG: m_in_times[0] is 19500
--- DEBUG: m_in_times.back is 19530.3
--- DEBUG: time is 19500
--- DEBUG: time-m_in_times[0] is -2.391971066e-08
Given the value of time-m_in_times[0]
, it seems like a tolerance issue and something like an eps
is needed somewhere in that assert statement. The case runs fine if I manually add, say, 19499.7
to the boundary data.
One additional piece of information: The simulation that saved the boundary data was split into two parts, the first ending at 19500
and the second starting at the same time. Since m_in_times[0]
seem to be slightly (tolerance) higher than 19500
, that could be one of the causes of the problem.
This issue is stale because it has been open 30 days with no activity.
@rthedin, for a case that fails, could you share the "Header" file from a checkpoint folder and the boundary data times.dat file too?