Use generic feectools LinearOperator.toarray()/tosparse(), remove LinOpWithTransp - #662
Merged
Merged
Conversation
LinOpWithTransp only added toarray_struphy() (transpose is already abstract in feectools). This method now lives in feectools as the default LinearOperator.toarray(), so all struphy operators subclass LinearOperator directly. BoundaryOperator and StencilMatrixFreeMassOperator use the generic toarray(); their toarray/tosparse are plain methods again (were properties). Bump feectools submodule to the feature branch commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove toarray/tosparse overrides that only raised NotImplementedError (several as properties) or forwarded to toarray(is_sparse=True), so the generic feectools LinearOperator.toarray()/tosparse() apply. Bump feectools submodule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solves the following issue(s):
Paired with struphy-hub/feectools#89. The feectools submodule points to that PR's branch, so struphy's tests run against it.
Core changes:
LinOpWithTranspis removed. Its only extra wastoarray_struphy(), sincetransposeis already abstract in feectools. That method is now the defaultLinearOperator.toarray()in feectools (feectools#89), so all struphy operators subclassLinearOperatordirectly.toarray/tosparseoverrides that only raisedNotImplementedError(several declared as properties) or just forwarded totoarray(is_sparse=True). These classes now use the feectools defaults: the basis projection operators,StencilMatrixFreeMassOperator,AverageOperator, the preconditioners, projectors, variational transport operators, polar operators,BoundaryOperator, andGT_MAT_G.toarray_struphy()now callLinearOperator.toarray(M, ...).Model-specific changes:
None
Documentation changes:
None
Before merging: merge feectools#89 into
devel-tinyfirst, then move the submodule to the newdevel-tinyhead. Until then the "feectools submodule freshness" check is expected to fail.🤖 Generated with Claude Code