Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ABLASTR & pyAMReX #715

Merged
merged 6 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading