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

Fix: Resize Component on Add #3861

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Src/Particle/AMReX_ParticleContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ public:
m_num_runtime_real++;
h_redistribute_real_comp.push_back(communicate);
SetParticleSize();
this->resizeData();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atmyers potentially, you could also move the logic in AddRealComp that reads //resize runtime SoA into resizeData.


// resize runtime SoA
for (int lev = 0; lev < numLevels(); ++lev) {
Expand All @@ -1266,6 +1267,7 @@ public:
m_num_runtime_int++;
h_redistribute_int_comp.push_back(communicate);
SetParticleSize();
this->resizeData();

// resize runtime SoA
for (int lev = 0; lev < numLevels(); ++lev) {
Expand Down
Loading