Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDF5 grid for padded fields #17

Open
wants to merge 1 commit into
base: patch_2020
Choose a base branch
from

Conversation

reetzelhaft
Copy link
Contributor

@reetzelhaft reetzelhaft commented Feb 19, 2019

The number of actual grid points of saved FlowFields (in physical space) can differ between HDF5 and NetCDF formats. This only happens if dealiasing using the 2/3-rule was active while computing the FlowField.
Using NetCDF the x-grid without the padded modes is of size 2*(Nx/3).
Using HDF5 the x-grid without the padded modes was of size (2*Nx)/3. That was too conservative.

Thanks Pavan Kashyap for the bug report.

I adjusted the size for HDF5 files to be consistent with NetCDF. The 2/3-rule says that all modes k should be set to zero if abs(k)>=N/3 (see Canuto et al. 2006, p.139). This way it is and was always implemented in Channelflow. Such a condition allows for the NetCDF style of saving using less points.

This fix does not impair backward compatibility of HDF5 since it affects the writing only.

…in physical space using hdf5. The modification makes hdf5 consistent with netcdf and does not affect reading (backward compatibility)
@codecov-io
Copy link

codecov-io commented Feb 19, 2019

Codecov Report

Merging #17 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #17   +/-   ##
=======================================
  Coverage   26.95%   26.95%           
=======================================
  Files          63       63           
  Lines       15328    15328           
  Branches     7254     7254           
=======================================
  Hits         4132     4132           
  Misses      11159    11159           
  Partials       37       37
Impacted Files Coverage Δ
channelflow/flowfield.cpp 40.58% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d334948...4b664ce. Read the comment docs.

@reetzelhaft reetzelhaft changed the base branch from master to patch_2020 March 30, 2020 13:04
@reetzelhaft reetzelhaft requested a review from omidashtari May 1, 2020 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants