Skip to content

Commit

Permalink
Add runtime particle components to HDF5 wrapper (AMReX-Codes#3596)
Browse files Browse the repository at this point in the history
## Summary

Add runtime components when computing the sizes/offsets for particle
HDF5 files.

## Additional background

## Checklist

The proposed changes:
- [ x] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate

---------

Co-authored-by: Jordan Musser <[email protected]>
Co-authored-by: Andrew Myers <[email protected]>
  • Loading branch information
3 people authored and guj committed Dec 13, 2023
1 parent fd0631d commit fbec177
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Src/Extern/HDF5/AMReX_ParticleHDF5.H
Original file line number Diff line number Diff line change
Expand Up @@ -711,12 +711,13 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssig
if (count[grid] == 0)
continue;

int_size = count[grid] * (2 + NStructInt + NArrayInt);
int_size = count[grid] * (2 + NStructInt + NumIntComps());
my_mfi_int_size.push_back(int_size);
my_nparticles.push_back(count[grid]);
my_mfi_int_total_size += int_size;

real_size = count[grid] * (AMREX_SPACEDIM + NStructReal + NArrayReal);

real_size = count[grid] * (AMREX_SPACEDIM + NStructReal + NumRealComps());
my_mfi_real_size.push_back(real_size);
my_mfi_real_total_size += real_size;
my_mfi_cnt++;
Expand Down

0 comments on commit fbec177

Please sign in to comment.