Open sbryngelson opened 1 year ago
Branch of code for model_eqns == 2 .and. bubbles
: https://github.com/MFlowCode/MFC/blob/38ef7b9ee0b067a7b3d2e90f818965414e2359b7/src/simulation/m_riemann_solvers.fpp#L1421-L1856
Branch of code for model_eqns == 2
:
https://github.com/MFlowCode/MFC/blob/38ef7b9ee0b067a7b3d2e90f818965414e2359b7/src/simulation/m_riemann_solvers.fpp#L1858-L2164
These can be consolidated by adding an if (bubbles) then
statement to the second branch, adding the bubbles-specific code, and then deleting the first branch.
Looking at refactoring some of these nasty bits of code would be a good introduction to the "meat" of the code @AiredaleDev @okBrian. Admittedly I'm a bit biased and would love for the code to not be so nasty in some of these places. Glad to talk more about it.
Part of the reason
m_riemann_solvers
is so long is because, for HLLC, there are two separate calls formodel_eqns == 2
andmodel_eqns == 2 .and. bubbles
. These can be nicely condensed, with appropriateif
statementsif (bubbles) then
, though it requires some care.