Skip to content

Commit 47347f7

Browse files
authored
Fix: Resize Component on Add (#3861)
## Summary Some object called "dummy mf" needs to be resized to avoid segfaults. ## Additional background Follow-up to #3615 ## 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
1 parent fe6f3de commit 47347f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Src/Particle/AMReX_ParticleContainer.H

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,7 @@ public:
12441244
m_num_runtime_real++;
12451245
h_redistribute_real_comp.push_back(communicate);
12461246
SetParticleSize();
1247+
this->resizeData();
12471248

12481249
// resize runtime SoA
12491250
for (int lev = 0; lev < numLevels(); ++lev) {
@@ -1266,6 +1267,7 @@ public:
12661267
m_num_runtime_int++;
12671268
h_redistribute_int_comp.push_back(communicate);
12681269
SetParticleSize();
1270+
this->resizeData();
12691271

12701272
// resize runtime SoA
12711273
for (int lev = 0; lev < numLevels(); ++lev) {

0 commit comments

Comments
 (0)