Geometry
ClimaCore.Geometry.mul_with_projection
— Functionmul_with_projection(x, y, lg)
Similar to x * y
, except that this version automatically projects y
to avoid DimensionMismatch
errors for AxisTensor
s. For example, if x
is a covector along the Covariant3Axis
(e.g., Covariant3Vector(1)'
), then y
will be projected onto the Contravariant3Axis
. In general, the first axis of y
will be projected onto the dual of the last axis of x
.
ClimaCore.Geometry.rmul_with_projection
— Functionrmul_with_projection(x, y, lg)
Similar to rmul(x, y)
, except that this version calls mul_with_projection
instead of *
.
ClimaCore.Geometry.mul_return_type
— Functionmul_return_type(X, Y)
Computes the return type of mul_with_projection(x, y, lg)
, where x isa X
and y isa Y
. This can also be used to obtain the return type of x * y
, although x * y
will throw an error when projection is necessary.
Note that this is equivalent to calling the internal function _return_type
: Base._return_type(mul_with_projection, Tuple{X, Y, LG})
, where lg isa LG
.
ClimaCore.Geometry.rmul_return_type
— Functionrmul_return_type(X, Y)
Computes the return type of rmul_with_projection(x, y, lg)
, where x isa X
and y isa Y
. This can also be used to obtain the return type of rmul(x, y)
, although rmul(x, y)
will throw an error when projection is necessary.
Note that this is equivalent to calling the internal function _return_type
: Base._return_type(rmul_with_projection, Tuple{X, Y, LG})
, where lg isa LG
.