Skip to content

Conversation

@JHopeCollins
Copy link
Member

Bumped up from https://github.com/firedrakeproject/firedrake/blob/main/firedrake/preconditioners/base.py, although this doesn't implement all of the methods in the Firedrake class because some of those need firedrake specific things (e.g. forms, or how we deal with the appctx).

The important two things are:

  1. separating out the initialisation and updating methods and getting setUp to call initialise only on the first call. This just saves either duplicating work unnecessarily or having a really chunky if-block in setUp.
  2. abstractmethod for the minimal interface of initialize, update, and apply.

Co-authored-by: Connor Ward <c.ward20@imperial.ac.uk>
Copy link

@pbrubeck pbrubeck left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@connorjward connorjward left a comment

Choose a reason for hiding this comment

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

Otherwise very happy. This is great.

@JHopeCollins JHopeCollins dismissed connorjward’s stale review November 7, 2025 14:59

Changes implemented.

@JHopeCollins JHopeCollins enabled auto-merge (squash) November 7, 2025 15:03
@JHopeCollins JHopeCollins merged commit 90ed9d6 into main Nov 7, 2025
2 checks passed
@JHopeCollins JHopeCollins deleted the JHopeCollins/pcbase branch November 10, 2025 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants