Castro
Castro copied to clipboard
Is FillPatch needed in diffusion?
Currently in the construction of the diffusion term, we do a FillPatch on the full state. But for the predictor (with CTU) or with any MOL-based hydro, we come into the diffusion with Sborder, which already has filled ghost cells. So are we doing the FillPatch unnecessarily here?
For CTU, it looks like we can skip the fill in do_old_sources
and in the old part of do_new_sources
, since those both work from Sborder
For MOL, it looks like we can skip the fill if we do second order, but not for 4th order, unless we modify the ca_make_cell_center
call before do_old_sources
to also fill one ghost cell.
For SDC, it looks like the sources aren't done to 4th order
We'll also need to figure out what to do for the source term evaluation in the reflux if update_sources_after_reflux = 1
since we won't have Sborder anymore.
Another issue to think about is that using Sborder instead of S_old will change answers for problems with reactions.
Technically, I think we should have been using Sborder all along.