Castro icon indicating copy to clipboard operation
Castro copied to clipboard

Is FillPatch needed in diffusion?

Open zingale opened this issue 5 years ago • 3 comments

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?

zingale avatar Mar 10 '19 00:03 zingale

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

zingale avatar Mar 10 '19 02:03 zingale

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.

maxpkatz avatar Mar 26 '19 13:03 maxpkatz

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.

maxpkatz avatar Mar 26 '19 13:03 maxpkatz