diff --git a/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp b/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp index e35eb81fb36..1ea619bbf80 100644 --- a/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp +++ b/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp @@ -200,9 +200,8 @@ FlushFormatCheckpoint::CheckpointParticles ( auto runtime_inames = pc->getParticleRuntimeiComps(); for (auto const& x : runtime_inames) { int_names[x.second+0] = x.first; } - // TODO - //pc->Checkpoint(dir, part_diag.getSpeciesName(), true, - // real_names, int_names); + pc->Checkpoint(dir, part_diag.getSpeciesName(), true, + real_names, int_names); } } diff --git a/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp b/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp index 67b77a93d61..3b977b55218 100644 --- a/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp +++ b/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp @@ -406,11 +406,10 @@ FlushFormatPlotfile::WriteParticles(const std::string& dir, } // real_names contains a list of all particle attributes. // real_flags & int_flags are 1 or 0, whether quantity is dumped or not. - // TODO - //tmp.WritePlotFile( - // dir, part_diag.getSpeciesName(), - // real_flags, int_flags, - // real_names, int_names); + tmp.WritePlotFile( + dir, part_diag.getSpeciesName(), + real_flags, int_flags, + real_names, int_names); } } diff --git a/Source/Diagnostics/ParticleIO.cpp b/Source/Diagnostics/ParticleIO.cpp index 7daff1cf1ca..13a406acd2f 100644 --- a/Source/Diagnostics/ParticleIO.cpp +++ b/Source/Diagnostics/ParticleIO.cpp @@ -206,10 +206,10 @@ MultiParticleContainer::Restart (const std::string& dir) } } - //pc->Restart(dir, species_names.at(i)); // TODO + pc->Restart(dir, species_names.at(i)); } for (unsigned i = species_names.size(); i < species_names.size()+lasers_names.size(); ++i) { - //allcontainers.at(i)->Restart(dir, lasers_names.at(i-species_names.size())); // TODO + allcontainers.at(i)->Restart(dir, lasers_names.at(i-species_names.size())); } } diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 6650eaae085..cdf80f72524 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1059,7 +1059,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) int max_new_particles = Scan::ExclusiveSum(counts.size(), counts.data(), offset.data()); // Update NextID to include particles created in this function - Long pid; + int pid; #ifdef AMREX_USE_OMP #pragma omp critical (add_plasma_nextid) #endif @@ -1068,7 +1068,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) ParticleType::NextID(pid+max_new_particles); } WARPX_ALWAYS_ASSERT_WITH_MESSAGE( - static_cast(pid + max_new_particles) < LastParticleID, + static_cast(pid + max_new_particles) < IntParticleIds::LastParticleID, "ERROR: overflow on particle id numbers"); const int cpuid = ParallelDescriptor::MyProc(); @@ -1615,7 +1615,7 @@ PhysicalParticleContainer::AddPlasmaFlux (amrex::Real dt) int max_new_particles = Scan::ExclusiveSum(counts.size(), counts.data(), offset.data()); // Update NextID to include particles created in this function - Long pid; + int pid; #ifdef AMREX_USE_OMP #pragma omp critical (add_plasma_nextid) #endif @@ -1624,7 +1624,7 @@ PhysicalParticleContainer::AddPlasmaFlux (amrex::Real dt) ParticleType::NextID(pid+max_new_particles); } WARPX_ALWAYS_ASSERT_WITH_MESSAGE( - static_cast(pid + max_new_particles) < LastParticleID, + static_cast(pid + max_new_particles) < IntParticleIds::LastParticleID, "overflow on particle id numbers"); const int cpuid = ParallelDescriptor::MyProc(); @@ -2307,7 +2307,7 @@ PhysicalParticleContainer::SplitParticles (int lev) ParticleReal xp, yp, zp; GetPosition(i, xp, yp, zp); auto& p = particles[i]; - if (p.id() == DoSplitParticleID){ + if (p.id() == IntParticleIds::DoSplitParticleID){ // If particle is tagged, split it and put the // split particles in local arrays psplit_x etc. np_split_to_add += np_split; @@ -2433,7 +2433,7 @@ PhysicalParticleContainer::SplitParticles (int lev) 1, psplit_w.dataPtr(), 0, nullptr, - 1, NoSplitParticleID); + 1, IntParticleIds::NoSplitParticleID); // Copy particles from tmp to current particle container addParticles(pctmp_split,1); // Clear tmp container diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 0461aae03d2..4a434b4ef7f 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -1350,11 +1350,11 @@ WarpXParticleContainer::particlePostLocate(ParticleType& p, // TODO // Tag particle if goes to higher level. // It will be split later in the loop if (pld.m_lev == lev+1 - and p.id() != NoSplitParticleID + and p.id() != amrex::IntParticleIds::NoSplitParticleID and p.id() >= 0) { // warning: overflow in conversion from 'long int' to 'int' changes value from '549755813884' to '-4' [-Woverflow] - p.id() = DoSplitParticleID; // TODO + p.id() = amrex::IntParticleIds::DoSplitParticleID; // TODO } if (pld.m_lev == lev-1){