diff options
author | 2023-03-27 11:30:29 -0700 | |
---|---|---|
committer | 2023-03-27 11:30:29 -0700 | |
commit | 12be0f989c912dd17fb53640e1006ea33d170ea4 (patch) | |
tree | 202e9b7127c4ee6d5fbd5d3b3444015a113f3eb8 /Source/WarpX.cpp | |
parent | 7177c279f54fdff5f7728fbcf12baad69bbdeef0 (diff) | |
download | WarpX-12be0f989c912dd17fb53640e1006ea33d170ea4.tar.gz WarpX-12be0f989c912dd17fb53640e1006ea33d170ea4.tar.zst WarpX-12be0f989c912dd17fb53640e1006ea33d170ea4.zip |
Enable calling SortParticlesForDeposition (#3762)
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 1e48d659d..ec9f3ee05 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -172,6 +172,14 @@ int WarpX::num_mirrors = 0; utils::parser::IntervalsParser WarpX::sort_intervals; amrex::IntVect WarpX::sort_bin_size(AMREX_D_DECL(1,1,1)); +#if defined(AMREX_USE_CUDA) +bool WarpX::sort_particles_for_deposition = true; +#else +bool WarpX::sort_particles_for_deposition = false; +#endif + +amrex::IntVect WarpX::sort_idx_type(AMREX_D_DECL(0,0,0)); + bool WarpX::do_dynamic_scheduling = true; int WarpX::electrostatic_solver_id; @@ -1165,6 +1173,18 @@ WarpX::ReadParameters () for (int i=0; i<AMREX_SPACEDIM; i++) sort_bin_size[i] = vect_sort_bin_size[i]; } + + pp_warpx.query("sort_particles_for_deposition",sort_particles_for_deposition); + Vector<int> vect_sort_idx_type(AMREX_SPACEDIM,0); + bool sort_idx_type_is_specified = + utils::parser::queryArrWithParser( + pp_warpx, "sort_idx_type", + vect_sort_idx_type, 0, AMREX_SPACEDIM); + if (sort_idx_type_is_specified){ + for (int i=0; i<AMREX_SPACEDIM; i++) + sort_idx_type[i] = vect_sort_idx_type[i]; + } + } { |