Skip to content

Commit da79aff

Browse files
jordanm304jmusser304atmyers
authored
Add runtime particle components to HDF5 wrapper (#3596)
## 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]>
1 parent 54c337f commit da79aff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Src/Extern/HDF5/AMReX_ParticleHDF5.H

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,12 +711,13 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssig
711711
if (count[grid] == 0)
712712
continue;
713713

714-
int_size = count[grid] * (2 + NStructInt + NArrayInt);
714+
int_size = count[grid] * (2 + NStructInt + NumIntComps());
715715
my_mfi_int_size.push_back(int_size);
716716
my_nparticles.push_back(count[grid]);
717717
my_mfi_int_total_size += int_size;
718718

719-
real_size = count[grid] * (AMREX_SPACEDIM + NStructReal + NArrayReal);
719+
720+
real_size = count[grid] * (AMREX_SPACEDIM + NStructReal + NumRealComps());
720721
my_mfi_real_size.push_back(real_size);
721722
my_mfi_real_total_size += real_size;
722723
my_mfi_cnt++;

0 commit comments

Comments
 (0)