There was a lot of code duplication in the MFNavierStokesPreconditionGMG<dim>::initialize(..) function of the multigrid preconditioners since the smoothers and the coarse-grid solver are almost the same in both cases.
Description of the solution
This PR removes the duplicated code and uses if's statements to differentiate between both multigrid approaches only if strictly needed.
How Has This Been Tested?
All the existent tests pass.
Future changes
This is done before the inclusion of more options as coarse-grid solvers to avoid more code duplication.
Description of the problem
There was a lot of code duplication in the
MFNavierStokesPreconditionGMG<dim>::initialize(..)
function of the multigrid preconditioners since the smoothers and the coarse-grid solver are almost the same in both cases.Description of the solution
This PR removes the duplicated code and uses if's statements to differentiate between both multigrid approaches only if strictly needed.
How Has This Been Tested?
Future changes