Skip to content

Commit

Permalink
Fix: Names in PC::make_alike
Browse files Browse the repository at this point in the history
The ParticleContainer's `make_alike` function forgot the names
of the SoA components.
  • Loading branch information
ax3l committed Feb 4, 2025
1 parent 779df09 commit 02d02ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Src/Particle/AMReX_ParticleContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -1375,10 +1375,14 @@ public:
ContainerLike<NewAllocator> tmp(m_gdb);

// add runtime real comps to tmp
for (int ic = 0; ic < this->NumRuntimeRealComps(); ++ic) { tmp.AddRealComp(false); }
for (int ic = 0; ic < this->NumRuntimeRealComps(); ++ic) {
tmp.AddRealComp(this->GetRealSoANames()[ic], false);
}

// add runtime int comps to tmp
for (int ic = 0; ic < this->NumRuntimeIntComps(); ++ic) { tmp.AddIntComp(false); }
for (int ic = 0; ic < this->NumRuntimeIntComps(); ++ic) {
tmp.AddIntComp(this->GetIntSoANames()[ic], false);
}

return tmp;
}
Expand Down

0 comments on commit 02d02ca

Please sign in to comment.