Implemented application of Dirichlet BCs to a linear system without losing symmetry for PETSc solvers.
Uses the PETSc function MatZeroRowsColumns() which does that automatically. Still, we need to think how we can easily integrate this to use more efficient solvers in HyTeG, because the RHS is modified depending on the original system.
- re-assemble the system every time we solve it since we need to also rebuild the RHS
- store a copy of the original system and circumvent re-assembling by copying it and applying only MatZeroRowsColumns() (without re-assembly) before calling the solver -
If PETSc is only used as a coarse grid solver, option 2 might be a good solution