Skip to content

Refactor GMG global coarsening code so it uses the same block stokes preconditioning class as AMG and GMG local smoothing.#6865

Merged
gassmoeller merged 1 commit intogeodynamics:mainfrom
quangx:global_coarsening_refactor
Feb 23, 2026
Merged

Refactor GMG global coarsening code so it uses the same block stokes preconditioning class as AMG and GMG local smoothing.#6865
gassmoeller merged 1 commit intogeodynamics:mainfrom
quangx:global_coarsening_refactor

Conversation

@quangx
Copy link
Copy Markdown
Contributor

@quangx quangx commented Feb 21, 2026

Follow up to #6806. With this pull request, GMG global coarsening uses the BlockSchurPreconditioner class instead of BlockSchurGMGPreconditioner. This means that now, the same block Schur preconditioning class is used for AMG, GMG local smoothing, and GMG global coarsening. As such, we can safely delete the BlockSchurGMGPreconditioner class.

@tjhei
Copy link
Copy Markdown
Member

tjhei commented Feb 21, 2026

/rebuild

Copy link
Copy Markdown
Member

@gassmoeller gassmoeller left a comment

Choose a reason for hiding this comment

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

Nice, thanks for the cleanup 👍. I have two minor comments on the code style, but everything else looks good.

Comment thread source/simulator/solver/stokes_matrix_free_global_coarsening.cc Outdated
Comment on lines +1196 to +1197
internal::InverseVelocityBlock<GMGPreconditioner, VectorType, ABlockMatrixType> inverse_velocity_block_cheap(
A_block_matrix,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please be consistent about which lines you place the name of the object and the parameters to the constructor in. You currently use 3 different convection:

type name(
parameters

and

type
name (parameters,
...

and

type
name(
parameters,
...

I would use the following for long lines here and for the other lines you changed:

Suggested change
internal::InverseVelocityBlock<GMGPreconditioner, VectorType, ABlockMatrixType> inverse_velocity_block_cheap(
A_block_matrix,
internal::InverseVelocityBlock<GMGPreconditioner, VectorType, ABlockMatrixType>
inverse_velocity_block_cheap(A_block_matrix,
...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I just made edits. Please let me know if I missed anything else.

@quangx quangx force-pushed the global_coarsening_refactor branch from 51b9fdd to 4137a3b Compare February 22, 2026 19:51
@quangx quangx force-pushed the global_coarsening_refactor branch from c7f9770 to f6c8f77 Compare February 22, 2026 19:53
@quangx quangx changed the title Refactor GMG global coarsening code so it uses the same block stokes preconditioning class as AMG and GMG local smoothing [WIP]. Refactor GMG global coarsening code so it uses the same block stokes preconditioning class as AMG and GMG local smoothing. Feb 23, 2026
Copy link
Copy Markdown
Member

@gassmoeller gassmoeller left a comment

Choose a reason for hiding this comment

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

Looks all good. Thanks!

@gassmoeller gassmoeller merged commit 7b88bcd into geodynamics:main Feb 23, 2026
9 checks passed
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.

3 participants