@@ -1080,10 +1080,10 @@ PhysicalParticleContainer::AddPlasma (PlasmaInjector const& plasma_injector, int
1080
1080
1081
1081
// Max number of new particles. All of them are created,
1082
1082
// and invalid ones are then discarded
1083
- const int max_new_particles = Scan::ExclusiveSum (counts.size (), counts.data (), offset.data ());
1083
+ const amrex::Long max_new_particles = Scan::ExclusiveSum (counts.size (), counts.data (), offset.data ());
1084
1084
1085
1085
// Update NextID to include particles created in this function
1086
- int pid;
1086
+ amrex::Long pid;
1087
1087
#ifdef AMREX_USE_OMP
1088
1088
#pragma omp critical (add_plasma_nextid)
1089
1089
#endif
@@ -1092,7 +1092,7 @@ PhysicalParticleContainer::AddPlasma (PlasmaInjector const& plasma_injector, int
1092
1092
ParticleType::NextID (pid+max_new_particles);
1093
1093
}
1094
1094
WARPX_ALWAYS_ASSERT_WITH_MESSAGE (
1095
- static_cast <amrex::Long>( pid) + static_cast <amrex::Long>( max_new_particles) < LongParticleIds::LastParticleID,
1095
+ pid + max_new_particles < LongParticleIds::LastParticleID,
1096
1096
" ERROR: overflow on particle id numbers" );
1097
1097
1098
1098
const int cpuid = ParallelDescriptor::MyProc ();
@@ -1103,8 +1103,8 @@ PhysicalParticleContainer::AddPlasma (PlasmaInjector const& plasma_injector, int
1103
1103
DefineAndReturnParticleTile (lev, grid_id, tile_id);
1104
1104
}
1105
1105
1106
- auto old_size = particle_tile.size ();
1107
- auto new_size = old_size + max_new_particles;
1106
+ amrex::Long old_size = particle_tile.size ();
1107
+ amrex::Long new_size = old_size + max_new_particles;
1108
1108
particle_tile.resize (new_size);
1109
1109
1110
1110
auto & soa = particle_tile.GetStructOfArrays ();
@@ -1639,10 +1639,10 @@ PhysicalParticleContainer::AddPlasmaFlux (PlasmaInjector const& plasma_injector,
1639
1639
1640
1640
// Max number of new particles. All of them are created,
1641
1641
// and invalid ones are then discarded
1642
- const int max_new_particles = Scan::ExclusiveSum (counts.size (), counts.data (), offset.data ());
1642
+ const amrex::Long max_new_particles = Scan::ExclusiveSum (counts.size (), counts.data (), offset.data ());
1643
1643
1644
1644
// Update NextID to include particles created in this function
1645
- int pid;
1645
+ amrex::Long pid;
1646
1646
#ifdef AMREX_USE_OMP
1647
1647
#pragma omp critical (add_plasma_nextid)
1648
1648
#endif
@@ -1651,15 +1651,15 @@ PhysicalParticleContainer::AddPlasmaFlux (PlasmaInjector const& plasma_injector,
1651
1651
ParticleType::NextID (pid+max_new_particles);
1652
1652
}
1653
1653
WARPX_ALWAYS_ASSERT_WITH_MESSAGE (
1654
- static_cast <amrex::Long>( pid) + static_cast <amrex::Long>( max_new_particles) < LongParticleIds::LastParticleID,
1654
+ pid + max_new_particles < LongParticleIds::LastParticleID,
1655
1655
" overflow on particle id numbers" );
1656
1656
1657
1657
const int cpuid = ParallelDescriptor::MyProc ();
1658
1658
1659
1659
auto & particle_tile = tmp_pc.DefineAndReturnParticleTile (0 , grid_id, tile_id);
1660
1660
1661
- auto old_size = particle_tile.size ();
1662
- auto new_size = old_size + max_new_particles;
1661
+ amrex::Long old_size = particle_tile.size ();
1662
+ amrex::Long new_size = old_size + max_new_particles;
1663
1663
particle_tile.resize (new_size);
1664
1664
1665
1665
auto & soa = particle_tile.GetStructOfArrays ();
0 commit comments