Skip to content

Commit

Permalink
Remove WarpX:roundrobin_sfc
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Aug 14, 2024
1 parent db66ea7 commit c75adf3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1152,8 +1152,6 @@ WarpX::ReadParameters ()
maxLevel() == 0 || !do_current_centering,
"Finite-order centering of currents is not implemented with mesh refinement"
);

pp_warpx.query("roundrobin_sfc", roundrobin_sfc);
}

{
Expand Down Expand Up @@ -3584,6 +3582,18 @@ WarpX::getField(FieldType field_type, const int lev, const int direction) const
amrex::DistributionMapping
WarpX::MakeDistributionMap (int lev, amrex::BoxArray const& ba)
{
bool roundrobin_sfc = false;
ParmParse pp("warpx");
pp.query("roundrobin_sfc", roundrobin_sfc);

// If this is true, AMReX's RRSFC strategy is used to make
// DistributionMapping. Note that the DistributionMapping made by the
// here could still be overridden by load balancing. In the RRSFC
// strategy, the Round robin method is used to distribute Boxes orderd
// by the space filling curve. This might help avoid some processes
// running out of memory due to having too many particles during
// initialization.

if (roundrobin_sfc) {
auto old_strategy = amrex::DistributionMapping::strategy();
amrex::DistributionMapping::strategy(amrex::DistributionMapping::RRSFC);
Expand Down

0 comments on commit c75adf3

Please sign in to comment.