Skip to content

Commit

Permalink
Update ABLASTR & pyAMReX (#715)
Browse files Browse the repository at this point in the history
* Update ABLASTR & pyAMReX

To latest commit on `development` each.

* `ablastr::fields::computePhi`: EB Runtime Control

* Update AMReX, too

Pull in
AMReX-Codes/amrex#4164

* Update ABLASTR & AMReX

* Simpler ABLASTR Poisson Solver API

* Update ABLASTR
  • Loading branch information
ax3l authored Sep 30, 2024
1 parent 2751795 commit 7a0b326
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cmake/dependencies/ABLASTR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ set(ImpactX_openpmd_src ""
set(ImpactX_ablastr_repo "https://github.com/ECP-WarpX/WarpX.git"
CACHE STRING
"Repository URI to pull and build ABLASTR from if(ImpactX_ablastr_internal)")
set(ImpactX_ablastr_branch "24.09"
set(ImpactX_ablastr_branch "d1a338e90ed1ad7ac2f010f47409aa48a2265c88"
CACHE STRING
"Repository branch for ImpactX_ablastr_repo if(ImpactX_ablastr_internal)")

Expand Down
2 changes: 1 addition & 1 deletion cmake/dependencies/pyAMReX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ option(ImpactX_pyamrex_internal "Download & build pyAMReX" ON)
set(ImpactX_pyamrex_repo "https://github.com/AMReX-Codes/pyamrex.git"
CACHE STRING
"Repository URI to pull and build pyamrex from if(ImpactX_pyamrex_internal)")
set(ImpactX_pyamrex_branch "24.09"
set(ImpactX_pyamrex_branch "1c66690f83244196c5655293f1381303a7d1589d"
CACHE STRING
"Repository branch for ImpactX_pyamrex_repo if(ImpactX_pyamrex_internal)")

Expand Down
20 changes: 3 additions & 17 deletions src/particles/spacecharge/PoissonSolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,6 @@ namespace impactx::spacecharge
pp_algo.queryAdd("mlmg_max_iters", mlmg_max_iters);
pp_algo.queryAdd("mlmg_verbosity", mlmg_verbosity);

struct PoissonBoundaryHandler {
amrex::Array<amrex::LinOpBCType, AMREX_SPACEDIM> const lobc = {
amrex::LinOpBCType::Dirichlet,
amrex::LinOpBCType::Dirichlet,
amrex::LinOpBCType::Dirichlet
};
amrex::Array<amrex::LinOpBCType, AMREX_SPACEDIM> const hibc = {
amrex::LinOpBCType::Dirichlet,
amrex::LinOpBCType::Dirichlet,
amrex::LinOpBCType::Dirichlet
};
//bool bcs_set = false;
//std::array<bool, AMREX_SPACEDIM * 2> dirichlet_flag;
//bool has_non_periodic = false;
} poisson_boundary_handler;

// create a vector to our fields, sorted by level
amrex::Vector<amrex::MultiFab*> sorted_rho;
amrex::Vector<amrex::MultiFab*> sorted_phi;
Expand All @@ -97,6 +81,7 @@ namespace impactx::spacecharge
}

const bool do_single_precision_comms = false;
const bool eb_enabled = false;
ablastr::fields::computePhi(
sorted_rho,
sorted_phi,
Expand All @@ -109,12 +94,13 @@ namespace impactx::spacecharge
pc.GetParGDB()->DistributionMap(),
pc.GetParGDB()->boxArray(),
ablastr::utils::enums::GridType::Collocated,
poisson_boundary_handler,
is_solver_igf_on_lev0,
eb_enabled,
do_single_precision_comms,
rel_ref_ratio
/*
post_phi_calculation,
poisson_boundary_handler
gett_new(0),
eb_farray_box_factory
*/
Expand Down

0 comments on commit 7a0b326

Please sign in to comment.