Skip to content

Commit

Permalink
remove is_distributed as runtime param
Browse files Browse the repository at this point in the history
  • Loading branch information
aeriforme committed Sep 19, 2024
1 parent 774de08 commit 7553131
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ public:
amrex::Real absolute_tolerance,
int max_iters,
int verbosity,
bool is_2d_slices,
bool is_distributed
bool is_2d_slices
) const;

/**
Expand Down Expand Up @@ -164,8 +163,6 @@ public:
/** Parameters for FFT Poisson solver aka IGF */
// 0: full 3D, 1: many 2D z-slices (quasi-3D)
bool is_igf_2d_slices = false;
// 0: solver on 1 process, 1: distributed solver
bool is_igf_distributed = false;
};

#endif // WARPX_ELECTROSTATICSOLVER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ void ElectrostaticSolver::ReadParameters () {

// FFT solver flags
pp_warpx.query("use_2d_slices_fft_solver", is_igf_2d_slices);
pp_warpx.query("use_distributed_ffts", is_igf_distributed);
}

void
Expand Down Expand Up @@ -118,8 +117,7 @@ ElectrostaticSolver::computePhi (const amrex::Vector<std::unique_ptr<amrex::Mult
Real absolute_tolerance,
int const max_iters,
int const verbosity,
bool is_2d_slices = false,
bool is_distributed = false) const {
bool is_igf_2d_slices) const {
// create a vector to our fields, sorted by level
amrex::Vector<amrex::MultiFab *> sorted_rho;
amrex::Vector<amrex::MultiFab *> sorted_phi;
Expand Down Expand Up @@ -199,7 +197,6 @@ ElectrostaticSolver::computePhi (const amrex::Vector<std::unique_ptr<amrex::Mult
*m_poisson_boundary_handler,
is_solver_igf_on_lev0,
is_igf_2d_slices,
is_igf_distributed,
EB::enabled(),
WarpX::do_single_precision_comms,
warpx.refRatio(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void LabFrameExplicitES::ComputeSpaceChargeField (
// Use the AMREX MLMG or the FFT (IGF) solver otherwise
computePhi(rho_fp, phi_fp, beta, self_fields_required_precision,
self_fields_absolute_tolerance, self_fields_max_iters,
self_fields_verbosity, is_igf_2d_slices, is_igf_distributed);
self_fields_verbosity, is_igf_2d_slices);
#endif

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void RelativisticExplicitES::AddSpaceChargeField (
// Compute the potential phi, by solving the Poisson equation
computePhi( rho, phi, beta, pc.self_fields_required_precision,
pc.self_fields_absolute_tolerance, pc.self_fields_max_iters,
pc.self_fields_verbosity, is_igf_2d_slices, is_igf_distributed );
pc.self_fields_verbosity, is_igf_2d_slices );

// Compute the corresponding electric and magnetic field, from the potential phi
computeE( Efield_fp, phi, beta );
Expand Down Expand Up @@ -161,7 +161,7 @@ void RelativisticExplicitES::AddBoundaryField (amrex::Vector<std::array< std::un
// Compute the potential phi, by solving the Poisson equation
computePhi( rho, phi, beta, self_fields_required_precision,
self_fields_absolute_tolerance, self_fields_max_iters,
self_fields_verbosity, is_igf_2d_slices, is_igf_distributed );
self_fields_verbosity, is_igf_2d_slices );

// Compute the corresponding electric field, from the potential phi.
computeE( Efield_fp, phi, beta );
Expand Down
4 changes: 2 additions & 2 deletions Source/ablastr/fields/IntegratedGreenFunctionSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ namespace ablastr::fields
return G_value;
}


/** @brief Compute the electrostatic potential using the Integrated Green Function method
* as in http://dx.doi.org/10.1103/PhysRevSTAB.9.044204
*
Expand All @@ -134,8 +135,7 @@ namespace ablastr::fields
amrex::MultiFab & phi,
std::array<amrex::Real, 3> const & cell_size,
amrex::BoxArray const & ba,
bool is_2d_slices,
bool is_distributed);
bool is_2d_slices);

} // namespace ablastr::fields

Expand Down
Loading

0 comments on commit 7553131

Please sign in to comment.