Skip to content

Implemented application of Dirichlet BCs to a linear system without losing...

Nils Kohl requested to merge petsc-symmetric-dirichlet-bcs into master

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.

Possible solutions:

  1. re-assemble the system every time we solve it since we need to also rebuild the RHS
  2. 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

Merge request reports