Skip to content

Build vertical line patches on mixed spaces in ASMLinesmoothPC - #5775

Open
pbrubeck wants to merge 1 commit into
mainfrom
pbrubeck/linesmooth-mixed-space
Open

pbrubeck wants to merge 1 commit into
mainfrom
pbrubeck/linesmooth-mixed-space

Conversation

@pbrubeck

@pbrubeck pbrubeck commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

ASMLinesmoothPC raised NotImplementedError on a mixed space. A patch now joins the vertical column of DoFs of every subspace above one base-mesh entity, so a coupled system can be relaxed one column at a time.

 get_patches(V)
-  if len(V) > 1: raise NotImplementedError
-  section = V._base_mesh_section
+  sections = [Vi._base_mesh_section for Vi in V]
   for each owned base entity p of the requested codimensions
-    indices = local_indices[0][column of p]
+    indices = concat(local_indices[i][column of p in sections[i]] for each subspace i)
     drop restricted DoFs (-1); skip empty patches

Use case: the Exner pressure Schur complement of a multi-stage Runge–Kutta method lives on a mixed space with one DG0 copy per stage. Its multigrid smoother needs column patches that hold every stage. This PR comes first in a stack; the DiagonalInverseMatrix PR builds on it.

Evidence

test_linesmoother_mixed_space_solves_column_operator[petscasm|tinyasm]. On DQ0 * DQ0 over an extruded quad mesh, the operator couples only the cells of a column (vertical jumps on dS_h) and the two subspaces in each cell. So exact column solves must converge in one Richardson iteration.

  • Before: NotImplementedError: Not implemeneted for mixed spaces (fails)
  • After: one iteration (passes)

test_linesmoother.py and test_linesmoother_vfs.py pass in full.

Merge Danger

Door: two-way

Blast Radius: small

Only mixed spaces take a new path; they raised before. A single space gives the same patches as before, and an empty column is now skipped explicitly instead of through dof <= 0.

AI tool used: Claude Code (Claude Opus 5.5).

🤖 Generated with Claude Code

ASMLinesmoothPC raised NotImplementedError on a mixed space. A patch now
holds the column of degrees of freedom of every subspace above one
entity of the base mesh, so that the smoother can relax a coupled
system, for example the Exner pressure of every stage of a Runge-Kutta
method, one column at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pbrubeck pbrubeck added the LLM used An LLM was used in the production of this PR label Dec 4, 2026
pbrubeck added a commit to colinjcotter/IAA_LFRic_Solver_notes that referenced this pull request Dec 5, 2026
Eliminate density and potential temperature, then velocity, with lumped
diagonals as in Maynard et al. (2020), and put the resulting Helmholtz
operator H in the Exner pressure block of the preconditioning operator.
Fieldsplit preconditions the Schur complement by H, and one multigrid
V-cycle with vertical line smoothing rediscretizes H on horizontally
coarsened meshes. This is the default; -preconditioner lu keeps the LU
factorization. -levels sets the number of multigrid levels.

Needs firedrakeproject/firedrake#5775 and #5776, and FEniCS/ufl#578
for composing forms with @.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

LLM used An LLM was used in the production of this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant