-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Here is a reproducer:
using ClimaComms
using LinearAlgebra
ClimaComms.@import_required_backends
using ClimaCore.CommonSpaces
using ClimaCore: Operators, Fields, MatrixFields, Geometry, Spaces
FT = Float64;
space = ExtrudedCubedSphereSpace(FT;
z_elem = 10,
z_min = 0,
z_max = 1,
radius = 10,
h_elem = 10,
n_quad_points = 4,
staggering = CellCenter()
);
interpc2f_op = Operators.InterpolateC2F(
bottom = Operators.Extrapolate(),
top = Operators.Extrapolate(),
);
divf2c_op = Operators.DivergenceF2C();
divf2c_matrix = MatrixFields.operator_matrix(divf2c_op);
gradc2f_op = Operators.GradientC2F(
top = Operators.SetGradient(Geometry.WVector(FT(0))),
bottom = Operators.SetGradient(Geometry.WVector(FT(0))),
);
gradc2f_matrix = MatrixFields.operator_matrix(gradc2f_op);
K = Fields.Field(FT, space);
ϑ = Fields.Field(FT, space);
F = Fields.Field(FT, Spaces.face_space(space));
L = Fields.Field(FT, Spaces.face_space(space));
topBC_op = Operators.SetBoundaryOperator(
top = Operators.SetValue(F),
bottom = Operators.SetValue(
Geometry.Covariant3Vector(zero(FT)),
),
);
# works
@. (divf2c_matrix() * (
MatrixFields.DiagonalMatrixRow(
interpc2f_op(K),
) * gradc2f_matrix())) - (I,)
# breaks
@. (divf2c_matrix() ⋅ (
MatrixFields.DiagonalMatrixRow(
interpc2f_op(K),
) ⋅ gradc2f_matrix())) - (I,)The error is ERROR: Broacasted spaces are not the same.. cc @dennisYatunin
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working