Skip to content

Commit

Permalink
PR 1324 did not account for runtime-added components (AMReX-Codes#1341)
Browse files Browse the repository at this point in the history
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
- [ ] are described in the proposed changes to the AMReX documentation, if appropriate
  • Loading branch information
atmyers authored and kweide committed Sep 28, 2020
1 parent 2c83bc6 commit df50f99
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Src/Particle/AMReX_ParticleContainerI.H
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ template <int NStructReal, int NStructInt, int NArrayReal, int NArrayInt>
void
ParticleContainer<NStructReal, NStructInt, NArrayReal, NArrayInt> :: SetParticleSize ()
{
if (NArrayReal > 0 or NArrayInt > 0) {
if (NArrayReal > 0) {
d_communicate_real_comp.resize(NArrayReal);
if (NumRealComps() > 0 or NumIntComps() > 0) {
if (NumRealComps() > 0) {
d_communicate_real_comp.resize(NumRealComps());
Gpu::copyAsync(Gpu::hostToDevice,
h_communicate_real_comp.begin(),
h_communicate_real_comp.end(),
d_communicate_real_comp.begin());
}
if (NArrayInt > 0) {
d_communicate_int_comp.resize(NArrayInt);
if (NumIntComps() > 0) {
d_communicate_int_comp.resize(NumIntComps());
Gpu::copyAsync(Gpu::hostToDevice,
h_communicate_int_comp.begin(),
h_communicate_int_comp.end(),
Expand Down

0 comments on commit df50f99

Please sign in to comment.