You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiplciation/division of a FieldMatrix by a scalar throws an error
Base.one of a FieldMatrix with non-scalar subblocks generates a FieldMatrix with scalar subblocks, which then throws an error when combined with a FieldMatrix similar to the original
LinearAlgebra.ldiv! generates NaNs when using a FieldMatrix with a single UniformScaling block.
Steps to Reproduce
Using W to denote the ImplicitEquationJacobian used in ClimaAtmos, the bugs can be reproduced as follows:
For the first bug, running W.matrix[@name(f.u₃), @name(f.u₃)] ./ 2 reproduces the error
For the second bug, running W.matrix .* 2 reproduces the error
For the third bug, running one(W.matrix) generates the incorrect result, and running W.matrix .+ one(W.matrix) reproduces the error
For the fourth bug, ldiv!(x, W.matrix, b) with a matrix that contains a single UniformScaling block and a FieldVector x that is full of ones generates the incorrect result
The text was updated successfully, but these errors were encountered:
Describe the bug
In the process of working the RosSSP timestepper, @Sbozzolo has uncovered 4 bugs in the Field/FieldMatrix broadcasting machinery:
Division (not multiplication) of a Field of BandMatrixRows of non-scalars by a scalar throws an error[fixed in Remove unnecessary method specializations for Numbers #2014]Base.one
of a FieldMatrix with non-scalar subblocks generates a FieldMatrix with scalar subblocks, which then throws an error when combined with a FieldMatrix similar to the originalLinearAlgebra.ldiv!
generatesNaN
s when using a FieldMatrix with a singleUniformScaling
block.Steps to Reproduce
Using
W
to denote theImplicitEquationJacobian
used in ClimaAtmos, the bugs can be reproduced as follows:For the first bug, runningW.matrix[@name(f.u₃), @name(f.u₃)] ./ 2
reproduces the errorW.matrix .* 2
reproduces the errorone(W.matrix)
generates the incorrect result, and runningW.matrix .+ one(W.matrix)
reproduces the errorldiv!(x, W.matrix, b)
with amatrix
that contains a singleUniformScaling
block and a FieldVectorx
that is full of ones generates the incorrect resultThe text was updated successfully, but these errors were encountered: