From 37cbbbf2d9dd5ba83a43d678f480009ac00af124 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Thu, 20 Jul 2023 05:11:17 -0700 Subject: [PATCH] Fix: Ablastr PoissonSolver Constant (#4090) Seen in ImpactX: ``` build/_deps/fetchedablastr-src/Source/ablastr/fields/PoissonSolver.H:163:31: error: use of undeclared identifier 'PhysConst' rho[lev]->mult(-1._rt/PhysConst::ep0); // TODO: when do we "un-multiply" this? We need to document this side-effect! ^ ``` --- Source/ablastr/fields/PoissonSolver.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/ablastr/fields/PoissonSolver.H b/Source/ablastr/fields/PoissonSolver.H index 91b442ea952..c5824be1774 100644 --- a/Source/ablastr/fields/PoissonSolver.H +++ b/Source/ablastr/fields/PoissonSolver.H @@ -160,7 +160,8 @@ computePhi (amrex::Vector const & rho, // scale rho appropriately; also determine if rho is zero everywhere amrex::Real max_norm_b = 0.0; for (int lev=0; lev<=finest_level; lev++) { - rho[lev]->mult(-1._rt/PhysConst::ep0); // TODO: when do we "un-multiply" this? We need to document this side-effect! + using namespace ablastr::constant::SI; + rho[lev]->mult(-1._rt/ep0); // TODO: when do we "un-multiply" this? We need to document this side-effect! max_norm_b = amrex::max(max_norm_b, rho[lev]->norm0()); } amrex::ParallelDescriptor::ReduceRealMax(max_norm_b);