-
Notifications
You must be signed in to change notification settings - Fork 191
Fix solver options for Real space #5144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ def set_defaults(solver_parameters, arguments, *, ksp_defaults=None, snes_defaul | |
| if "pc_type" in keys: | ||
| # Might reasonably expect to get petsc defaults | ||
| skip.update({"pc_factor_mat_solver_type", "ksp_type"}) | ||
| if parameters.get("mat_type") in {"matfree", "nest"}: | ||
| if parameters.get("mat_type") in {"matfree", "nest", "python"}: | ||
| # Non-LU defaults. | ||
| ksp_defaults["ksp_type"] = "gmres" | ||
| ksp_defaults["pc_type"] = "jacobi" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be unrelated, but MUMPS supports MatNest when all blocks are aij. We shouldn't default to jacobi in that case.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that's definitely unrelated to this. But we should open an issue for it at least. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoever populated this dictionary with
{"mat_type": A.type}within the adjoint should have set{"mat_type": "matfree" if A.type == "python" else A.type}.Or more correclty, the matrix type should come from
_SNESContext.mat_typeUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the logic here could be responsible, but not 100% sure
firedrake/firedrake/matrix.py
Lines 22 to 27 in 2018173
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's what I found. I think we should:
mat_type=pythonmatfree,denserowetc