Castro icon indicating copy to clipboard operation
Castro copied to clipboard

Merge construct_hydro_source for MOL and CTU

Open maxpkatz opened this issue 6 years ago • 2 comments

We should be able to merge the hydro source constructor for both MOL and CTU. If we pass dt = 0 to the CTU hydro source constructor, the code should already do the right thing for this case, which is how MOL calls it. (If it doesn't, we'll have to fix that.) Then the only thing to be concerned about is optimization -- the trans* calls are unnecessary if dt = 0. So there would be a switch that says if dt > 0, then take the normal CTU route, and if dt == 0, then pass qm and qp directly to cmpflx.

The reason to do this is that we don't have to maintain two sections of nearly redundant code. Aside from the calls to the Riemann solver (and the trans terms), the MOL hydro update is very similar.

maxpkatz avatar Feb 24 '19 07:02 maxpkatz

This will be easier once #477 has been done

harpolea avatar Mar 08 '19 18:03 harpolea

With the fourth order code path, it is not as easy.

zingale avatar Jan 20 '20 16:01 zingale