AMReX-Astro / Castro

Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
http://amrex-astro.github.io/Castro
Other
300 stars 98 forks source link

castro.update_sources_after_reflux doesn't make sense for MOL/new SDC #549

Closed zingale closed 3 months ago

zingale commented 5 years ago

The castro.update_sources_after_reflux functionality uses the "new" source stuff, and does the corrector after the flux correction. But for MOL (and new SDC) integration, we don't ever use the new source logic, the source terms are applied at the integration stage in the integrator, so it is not clear that this logic works for these integration methods.

We should skip this step for these updates.

maxpkatz commented 5 years ago

I'm OK with disabling it in this case as it is clearly wrong, but please leave this issue open after we merge #545. I'd like to investigate whether it's possible to fix update_sources_after_reflux for these integration methods.

zingale commented 5 years ago

sure. I was thinking about that as well.

maxpkatz commented 5 years ago

My initial thought was that since the final time node is always n+1 (right?) then we could just re-evaluate the old sources and add the appropriate weighting.

zingale commented 5 years ago

To get the same formal order of accuracy as the integration method, we would need to correct each stage of the integrator, I think.

zingale commented 3 months ago

we seem to have addressed this in #545.