Skip to content

Conversation

@pbrubeck
Copy link
Contributor

@pbrubeck pbrubeck commented Feb 19, 2025

Description

Assembling a linear combination of BaseForms, (i.e. a FormSum of Scalars, Cofunctions, or Matrices) was always allocating a new tensor for the result, ignoring the tensor kwarg. This PR fixes this.

Here we unify some basic functionality of the data carrier classes for 0-forms (Constant / R-space Cofunction), linear forms (Cofunction), and bilinear form (MatrixBase) by implementing the MatrixBase.zero() and MatrixBase.assign().

Fixes #3212

@pbrubeck pbrubeck force-pushed the pbrubeck/fix/base-form-tensor branch from dfec145 to a5b09af Compare February 19, 2025 16:02
@github-actions
Copy link

github-actions bot commented Feb 19, 2025

TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake complex8289 ran6643 passed1646 skipped0 failed

@github-actions
Copy link

github-actions bot commented Feb 19, 2025

TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake real7937 ran7312 passed625 skipped0 failed

@connorjward
Copy link
Contributor

Just noticed that this fixes #3212 so I have amended the PR description to make sure it gets closed.

@github-actions
Copy link

github-actions bot commented Feb 26, 2025

TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake default8289 ran7587 passed702 skipped0 failed

@pbrubeck pbrubeck force-pushed the pbrubeck/fix/base-form-tensor branch from b815048 to 179fe50 Compare February 26, 2025 19:39
@dham dham merged commit 12c20aa into master Mar 19, 2025
15 checks passed
@dham dham deleted the pbrubeck/fix/base-form-tensor branch March 19, 2025 16:42
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.

BUG: AssembledMatrix.__add__ implemented wrong

5 participants