Skip to content

Conversation

JHopeCollins
Copy link
Member

@JHopeCollins JHopeCollins commented Sep 4, 2025

Description

Some Python type SNES classes for building nonlinear solvers

AuxiliaryOperatorSNES

A nonlinear version of AuxiliaryOperatorPC, for building nonlinear preconditioners from approximate operators, e.g. preconditioned nonlinear Richardson iterations.

Still to do:

  • Docstring
  • Tests
  • Demo?

FieldsplitSNES

A nonlinear version of PCFieldsplit,it can use either additive (Jacobi) or multiplicative (Gauss-Seidel) versions, exactly analogous to the linear version.

  • Additive solves each "diagonal" block of the nonlinear problem for each field, with all other fields held at the current value.
  • Multiplicative solves each "diagonal" block of the nonlinear problem for each field, and uses the updated values when solving for subsequent fields. Currently solves one field at a time, in the order they appear in the mixed space.

Still to do (mostly adding options to match PCFieldsplit):

  • Docstring
  • Allow grouping fields together with snes_fieldsplit_%d_fields.
  • Allow setting the order of the field solves with snes_fieldsplit_%d_fields.
  • Default fields with snes_fieldsplit_default.
  • Default options with fieldsplit prefix. If we collect them in initialize and pass them as a dictionary to the NLVS of each field, they will take lower priority than any fieldsplit_%d options in the global dictionary (including those put there by the parent NLVS).
  • view method.
  • Does the update method need to contain anything?
  • Documentation and demo.
  • Tests.

Returns
-------
F : ufl.Form
The preconditioning nonlinear form.
Copy link
Contributor

@pbrubeck pbrubeck Sep 5, 2025

Choose a reason for hiding this comment

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

Suggested change
The preconditioning nonlinear form.
The preconditioning linear Form (may be nonlinear in func).

y.aypx(-1, x)

def form(self, snes, state, func, test):
"""Return the preconditioning nonlinear form and boundary conditions.
Copy link
Contributor

@pbrubeck pbrubeck Sep 5, 2025

Choose a reason for hiding this comment

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

Suggested change
"""Return the preconditioning nonlinear form and boundary conditions.
"""Return the preconditioning residual Form and boundary conditions.

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

Successfully merging this pull request may close these issues.

2 participants