-
Notifications
You must be signed in to change notification settings - Fork 13
Add in riesz map and remove pc update #713
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
Changes from 5 commits
335d6bf
fbd42ea
baa395a
8cdfab1
30d8284
e29a439
0caafbf
3ee0a5e
7f2bf74
aa884e8
85d18c6
2f9349a
765f869
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 |
|---|---|---|
|
|
@@ -67,12 +67,75 @@ def trace_nullsp(T): | |
| # Compressible Euler equations - (u, rho, theta) system. We use a | ||
| # bespoke hybridization preconditioner for this system owing to the | ||
| # nonlinear pressure gradient term. | ||
| r_tol = 1e-8 | ||
| a_tol = 1e-8 | ||
|
Member
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. The right
Collaborator
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. You would suggest just not setting it at all?
Member
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. Personally no, but that's it is opinion, I was just pointing it out. If
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. If both
Member
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. Yes, it will stop as soon as any of The message from either
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. @atb1995 @tommbendall do either of you have any logs that contain the convergence reasons? In general, I agree with Josh that we should not be setting
Member
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. I imagine it is unlikely for you to be hitting
Collaborator
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. It is always hitting r_tol as far as I am aware, we are getting nowhere near 1e-8 atol for a lot of the runs I am doing at least
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. let's get rid then |
||
|
|
||
| theta_backsub_settings = { | ||
| 'ksp_type': 'cg', | ||
| 'pc_type': 'bjacobi', | ||
| 'sub_pc_type': 'ilu', | ||
| 'ksp_rtol': r_tol, | ||
| 'ksp_atol': a_tol, | ||
| } | ||
|
|
||
| exner_ave_settings = { | ||
| 'ksp_type': 'cg', | ||
| 'pc_type': 'bjacobi', | ||
| 'sub_pc_type': 'ilu', | ||
| 'ksp_rtol': r_tol, | ||
| 'ksp_atol': a_tol, | ||
| } | ||
|
|
||
| rho_ave_settings = { | ||
| 'ksp_type': 'cg', | ||
| 'pc_type': 'bjacobi', | ||
| 'sub_pc_type': 'ilu', | ||
| 'ksp_rtol': r_tol, | ||
| 'ksp_atol': a_tol, | ||
| } | ||
|
|
||
| riesz_map_settings = { | ||
| 'ksp_type': 'cg', | ||
| 'pc_type': 'bjacobi', | ||
| 'sub_pc_type': 'ilu', | ||
| 'ksp_rtol': r_tol, | ||
| 'ksp_atol': a_tol, | ||
| } | ||
|
|
||
| scpc_solve_settings = { | ||
| 'mat_type': 'matfree', | ||
| 'ksp_type': 'preonly', | ||
| 'pc_type': 'python', | ||
| 'pc_python_type': 'firedrake.SCPC', | ||
| 'pc_sc_eliminate_fields': '0,1', | ||
| # The reduced operator is not symmetric | ||
| 'condensed_field': { | ||
| 'ksp_type': 'fgmres', | ||
| 'ksp_rtol': r_tol, | ||
| 'ksp_atol': a_tol, | ||
| 'ksp_max_it': 100, | ||
| 'pc_type': 'gamg', | ||
| 'pc_gamg_sym_graph': None, | ||
| 'mg_levels': { | ||
| 'ksp_type': 'gmres', | ||
| 'ksp_max_it': 5, | ||
| 'pc_type': 'bjacobi', | ||
| 'sub_pc_type': 'ilu' | ||
| } | ||
| } | ||
| } | ||
|
|
||
| settings = { | ||
| 'ksp_monitor': None, | ||
| 'ksp_type': 'preonly', | ||
| 'mat_type': 'matfree', | ||
| 'pc_type': 'python', | ||
| 'pc_python_type': 'gusto.CompressibleHybridisedSCPC', | ||
| 'theta_backsub': theta_backsub_settings, | ||
| 'exner_ave': exner_ave_settings, | ||
| 'rho_ave': rho_ave_settings, | ||
| 'riesz_map': riesz_map_settings, | ||
| 'scpc_solve': scpc_solve_settings, | ||
| } | ||
|
|
||
| # We pass the implicit weighting parameter (alpha) and tau_values to the | ||
|
|
||
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.
This isn't necessary, just give each solver the right prefix and they will grab these options themselves.
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.
So something like:
What about RieszMap which has no
options_prefixas an argument?Uh 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.
Arguably that is an oversight. Nevertheless, you can ask PETSc to get all the options with a particular prefix:
If
PETSc.Options()contains"prefix_obj_option"thenPETSc.Options("prefix_") will contain"obj_option"`.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.
But yes for the other solvers that is exactly what I meant.