Skip to content

Add kronpc for stage-coupled Kronecker product preconditioners#224

Open
436ahsan wants to merge 37 commits into
masterfrom
436ahsan/kron-test
Open

Add kronpc for stage-coupled Kronecker product preconditioners#224
436ahsan wants to merge 37 commits into
masterfrom
436ahsan/kron-test

Conversation

@436ahsan
Copy link
Copy Markdown
Collaborator

@436ahsan 436ahsan commented May 6, 2026

Summary

This PR adds a kronpc framework for applying stage-coupled Kronecker product preconditioners of the form

[
L \otimes K^{-1},
]

where (L) is a small dense stage matrix, typically derived from the Runge--Kutta Butcher matrix, and (K^{-1}) is supplied by a single-stage PETSc/Firedrake subsolver.

The main motivation is to support Runge-Kutta stage preconditioners appearing in augmented Lagrangian Schur-complement approximations for time-dependent Navier-Stokes problems.

This allows users to build preconditioners involving Kronecker products of Runge-Kutta stage matrices with pressure, mass, and stiffness inverses. This structure is motivated by the augmented Lagrangian Runge-Kutta preconditioner of Leveque, He, and Olshanskii, arXiv:2506.04451.

Changes

  • Adds irksome/kronpc.py.
  • Provides:
    • KronPC
    • MassKronPC
    • StiffnessKronPC
    • SIPGStiffnessKronPC
  • Re-exports these classes from irksome.__init__.
  • Adds a test for MassKronPC against a full monolithic LU solve.
  • Updates the implementation for the current petsc4py KSP.setDMActive API.

Testing

OMP_NUM_THREADS=1 python -m pytest tests/test_kronpc.py

Ahsan Ali and others added 30 commits August 13, 2025 17:28
Comment thread irksome/kronpc.py Outdated
Copy link
Copy Markdown
Collaborator

@rckirby rckirby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feature. We might want to add a demo of the Leveque et al preconditioner using this for flow later, but for now we probably want to just make sure both mass & stiffness get tested.

Comment thread tests/test_kronpc.py Outdated
Comment thread tests/test_kronpc.py Outdated


@pytest.mark.parametrize("ns", [2, 3, 4, 5]) # meaningful cases are ns >= 2
def test_mass_kron_pc(ns):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to get this to test the stiffness PCs as well with a parameterization? You'd need to parametrize over the PC paired with a form that did mass vs stiffness.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I parameterized the KronPC test over both MassKronPC and StiffnessKronPC. The stiffness case is paired with the corresponding shifted stiffness form A \otimes (K + shift M). I use a larger shift only in the test to keep the reference operator well-conditioned; the default remains 1e-12. I also tried adding SIPGStiffnessKronPC, but the current SIPG implementation projects out a constant nullspace in apply(), while the SIPG form includes boundary penalty terms. I think for this reason there are still some issues regarding passing the test with SIPG, and I need to think more about how to resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants