Skip to content

Commit c5aea94

Browse files
Bugfix: sum guard cell values in current density diagnostic (#4596)
1 parent 7392bc9 commit c5aea94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/Diagnostics/ComputeDiagFunctors/JFunctor.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ JFunctor::operator() (amrex::MultiFab& mf_dst, int dcomp, const int /*i_buffer*/
5252

5353
auto& mypc = warpx.GetPartContainer();
5454
mypc.DepositCurrent(current_fp_temp, warpx.getdt(m_lev), 0.0);
55+
56+
// sum values in guard cells - note that this does not filter the
57+
// current density.
58+
for (int idim = 0; idim < 3; ++idim) {
59+
current_fp_temp[0][idim]->FillBoundary(warpx.Geom(m_lev).periodicity());
60+
}
5561
}
5662

5763
InterpolateMFForDiag(mf_dst, *m_mf_src, dcomp, warpx.DistributionMap(m_lev),

0 commit comments

Comments
 (0)