Skip to content

Fix _SNESContext.options_prefix#5092

Merged
pbrubeck merged 9 commits into
releasefrom
pbrubeck/fix/options-prefix
May 14, 2026
Merged

Fix _SNESContext.options_prefix#5092
pbrubeck merged 9 commits into
releasefrom
pbrubeck/fix/options-prefix

Conversation

@pbrubeck
Copy link
Copy Markdown
Contributor

@pbrubeck pbrubeck commented May 10, 2026

Description

Adds options prefix in _SNESContext.split in order to support
-mat_type matfree -fieldsplit_0_mg_coarse_mat_type aij

Comment thread firedrake/solving_utils.py Outdated
@pbrubeck pbrubeck force-pushed the pbrubeck/fix/options-prefix branch from 4899c14 to 2604786 Compare May 11, 2026 10:19
Comment thread firedrake/solving_utils.py Outdated
@pbrubeck pbrubeck force-pushed the pbrubeck/fix/options-prefix branch from 9228af7 to 285db1f Compare May 11, 2026 14:53
@pbrubeck pbrubeck requested a review from JHopeCollins May 13, 2026 09:32
@pbrubeck pbrubeck force-pushed the pbrubeck/fix/options-prefix branch from 3878378 to 8d22ff2 Compare May 13, 2026 09:35
Comment thread tests/firedrake/multigrid/test_options_prefix.py Outdated
Comment thread firedrake/mg/ufl_utils.py
@pbrubeck pbrubeck requested a review from JHopeCollins May 13, 2026 14:00
Comment thread tests/firedrake/multigrid/test_options_prefix.py Outdated
Copy link
Copy Markdown
Member

@JHopeCollins JHopeCollins left a comment

Choose a reason for hiding this comment

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

One comment about using the FunctionSpace name for components. Once we've sorted that this is good to go.

Comment thread firedrake/solving_utils.py Outdated
Comment thread tests/firedrake/multigrid/test_options_prefix.py Outdated
@pbrubeck
Copy link
Copy Markdown
Contributor Author

One comment about using the FunctionSpace name for components. Once we've sorted that this is good to go.

What is enforcing it only using V.name if V has a single component?

The name of each single field subspace now gets propagated when we split the problem (this wasn't the case before). But if we split into a multi-field subspace we need to create a MixedFunctionSpace, and we never set the name kwarg for that case

@JHopeCollins
Copy link
Copy Markdown
Member

One comment about using the FunctionSpace name for components. Once we've sorted that this is good to go.

What is enforcing it only using V.name if V has a single component?

The name of each single field subspace now gets propagated when we split the problem (this wasn't the case before). But if we split into a multi-field subspace we need to create a MixedFunctionSpace, and we never set the name kwarg for that case

But if we don't manually set the name of a MixedFunctionSpace then it gets set according to the names of the component spaces here:

self.name = name or "_".join(str(s.name) for s in spaces)

Comment thread firedrake/solving_utils.py Outdated
@JHopeCollins JHopeCollins dismissed their stale review May 14, 2026 12:47

Addressed

Copy link
Copy Markdown
Member

@JHopeCollins JHopeCollins left a comment

Choose a reason for hiding this comment

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

LGTM

@pbrubeck pbrubeck enabled auto-merge (squash) May 14, 2026 12:52
@pbrubeck pbrubeck merged commit 6b4b19b into release May 14, 2026
15 of 16 checks passed
@pbrubeck pbrubeck deleted the pbrubeck/fix/options-prefix branch May 14, 2026 15:24
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.

2 participants