Skip to content

Commit

Permalink
Simpler ABLASTR Poisson Solver API
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Sep 30, 2024
1 parent 1e559b9 commit eab68ec
Showing 1 changed file with 1 addition and 42 deletions.
43 changes: 1 addition & 42 deletions src/particles/spacecharge/PoissonSolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,47 +71,6 @@ namespace impactx::spacecharge
pp_algo.queryAdd("mlmg_max_iters", mlmg_max_iters);
pp_algo.queryAdd("mlmg_verbosity", mlmg_verbosity);

// empty implementation, no EB support yet in ImpactX
struct PhiCalculatorEB
{
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::Real operator() (const amrex::Real, const amrex::Real) const noexcept {
return 0.0;
}

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::Real operator() (const amrex::Real, const amrex::Real, const amrex::Real) const noexcept {
return 0.0;
}
};

struct PoissonBoundaryHandler
{
// empty implementation, no EB support yet in ImpactX
[[nodiscard]] PhiCalculatorEB
getPhiEB (amrex::Real) const noexcept
{
return PhiCalculatorEB();
}

amrex::ParserExecutor<1> potential_eb_t;

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;
bool phi_EB_only_t = 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 @@ -135,13 +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 eab68ec

Please sign in to comment.