Skip to content

Commit

Permalink
Fix: Ablastr PoissonSolver Constant
Browse files Browse the repository at this point in the history
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!
                                   ^
```
  • Loading branch information
ax3l committed Jul 18, 2023
1 parent c9c6419 commit e6698ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/ablastr/fields/PoissonSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ computePhi (amrex::Vector<amrex::MultiFab*> 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);
Expand Down

0 comments on commit e6698ac

Please sign in to comment.