MCPcopy Create free account
hub / github.com/BLAST-WarpX/warpx / CheckAndAddParticle

Method CheckAndAddParticle

Source/Particles/ParticleCreation/AddParticles.cpp:340–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340void
341PhysicalParticleContainer::CheckAndAddParticle (
342 amrex::ParticleReal x, amrex::ParticleReal y, amrex::ParticleReal z,
343 amrex::ParticleReal ux, amrex::ParticleReal uy, amrex::ParticleReal uz,
344 amrex::ParticleReal weight,
345 amrex::Gpu::HostVector<ParticleReal>& particle_x,
346 amrex::Gpu::HostVector<ParticleReal>& particle_y,
347 amrex::Gpu::HostVector<ParticleReal>& particle_z,
348 amrex::Gpu::HostVector<ParticleReal>& particle_ux,
349 amrex::Gpu::HostVector<ParticleReal>& particle_uy,
350 amrex::Gpu::HostVector<ParticleReal>& particle_uz,
351 amrex::Gpu::HostVector<ParticleReal>& particle_w,
352 amrex::Real t_lab) const
353{
354 if (WarpX::gamma_boost > 1.) {
355 MapParticletoBoostedFrame(x, y, z, ux, uy, uz, t_lab);
356 }
357 particle_x.push_back(x);
358 particle_y.push_back(y);
359 particle_z.push_back(z);
360 particle_ux.push_back(ux);
361 particle_uy.push_back(uy);
362 particle_uz.push_back(uz);
363 particle_w.push_back(weight);
364}
365
366void
367PhysicalParticleContainer::AddGaussianBeam (PlasmaInjector const& plasma_injector){

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected