MFC
MFC copied to clipboard
Dead code
Dead code needs to me removed. We seem to have thousands of lines of it. Here is one example: https://github.com/MFlowCode/MFC/blob/fc40ccea496abd8e3b81a543c6b5ba80af589dfb/src/simulation_code/m_rhs.f90#L358-L544
We also have two entire RHS functions: https://github.com/MFlowCode/MFC/blob/fc40ccea496abd8e3b81a543c6b5ba80af589dfb/src/simulation_code/m_rhs.f90#L2928
https://github.com/MFlowCode/MFC/blob/fc40ccea496abd8e3b81a543c6b5ba80af589dfb/src/simulation_code/m_rhs.f90#L1010
The unused one needs to be deleted.
I'd like to see a PR that deletes thousands of lines of unused code.
Still more dead code! But going in the right direction.
Not sure if this is dead code, but src/simulation/m_variables_conversion and m_riemann_solvers has a subroutine s_compute_average_state and several variables like rho_avg_sf and vel_avg that are never used. Should I get rid of them?
Possibly. Can you go back in the git history (perhaps looking at MFC-develop repo as well) and see when they were used? I assume, at some point, they were.
Note on this issue: VSCode seems to be pretty good at finding variables that are declared multiple times (once globally and again locally) and finding unused variables. You will need the appropriate fypp extension for VSCode to do this for .fpp files, I think it is here.
At the same time, we should be a bit careful.
It will likely throw spurious unused warnings due to not recognizing preprocessing directives like #ifdef from C preprocessor statements.
@anandrdbz remove _flat names in variables.