Skip to content

SmallMatrix operator*= for MM#4880

Closed
ax3l wants to merge 1 commit intoAMReX-Codes:developmentfrom
ax3l:smallmatrix-selfmul
Closed

SmallMatrix operator*= for MM#4880
ax3l wants to merge 1 commit intoAMReX-Codes:developmentfrom
ax3l:smallmatrix-selfmul

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented Jan 7, 2026

Summary

Add a short-hand to multiply SmallMatrix with another value and assign the result.

Additional background

Often useful in ImpactX, e.g., latest is BLAST-ImpactX/impactx#1256

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

Add a short-hand to multiply `SmallMatrix` with another
value and assign the result.
@WeiqunZhang
Copy link
Member

This only makes sense for square matrix, because the number of rows and cols are part of the type. So we should make that clear with enable_if when defining the function. We might also want to enforce that they have the same order and starting index.

@ax3l
Copy link
Member Author

ax3l commented Jan 16, 2026

Ah you are totally right. Will improve accordingly.

@ax3l
Copy link
Member Author

ax3l commented Feb 10, 2026

Don't need it after all.

@ax3l ax3l closed this Feb 10, 2026
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.

2 participants