Skip to content

Conversation

@tlunet
Copy link
Member

@tlunet tlunet commented Aug 20, 2025

This PR makes use of the new update in qmat, that allows to generate any QDelta coefficients using always the same qGen argument, without any required code modification for new QDelta types.

It also re-activates the caching of the genQE and genQI attributes, which do not need to be re-built again when variable coefficients are updated between sweeps : it uses the internal cache of qmat that can store different QDelta matrices if they are different. Furthermore, it allows variable coefficients for explicit sweeps.

Finally, coefficient update are now done in the controller classes, more precisely in the it_fine method, rather than in the update_node of the sweeper class. It means that there is no need to modify the update_node of each sweeper implementation to allow the use of FLEX preconditionners (for instance). In case some implementation are still calling the updateVariableCoeffs method, it simply becomes a no-op.

In addition, a few cleaning / refactoring / type hints that appeared to be necessary during the changes mentionned above.

Args:
L (pySDC.Level.level): current level
"""
from pySDC.core.level import Level
Copy link
Member

Choose a reason for hiding this comment

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

Why is this here and not on top?

Copy link
Member Author

@tlunet tlunet Aug 21, 2025

Choose a reason for hiding this comment

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

Because when it's on top, it creates a circular dependency that produces an error on import

Copy link
Member

Choose a reason for hiding this comment

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

Now, that is a good answer/reason 😄 .

@pancetta pancetta merged commit 42a5fce into master Aug 21, 2025
98 checks passed
@tlunet tlunet deleted the qGen branch August 21, 2025 07:51
brownbaerchen pushed a commit to brownbaerchen/pySDC that referenced this pull request Aug 22, 2025
* TL: more generic and efficients QDelta coefficients computation + some refactoring

* TL: trying to solve circular imports

* TL: bugfixes

* TL: aaaaaah 😭

* TL: missing this
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.

3 participants