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
A common pattern for users is to dive all the way into the backing SArray's data of an AxisTensor. For example, in ClimaAtmos: ᶠϵ₂₃ = ᶠϵ.components.data.:6.
We should probably internalize these data accesses with some API.
One reason that this is problematic is that it could also depend on the DataLayout. For example:
is only correct for certain geometric points. ClimaCore has a general version of this:
Δz_metric_component(::Type{<:Geometry.LatLongZPoint}) =9Δz_metric_component(::Type{<:Geometry.Cartesian3Point}) =1Δz_metric_component(::Type{<:Geometry.Cartesian13Point}) =4Δz_metric_component(::Type{<:Geometry.Cartesian123Point}) =9Δz_metric_component(::Type{<:Geometry.XYZPoint}) =9Δz_metric_component(::Type{<:Geometry.ZPoint}) =1Δz_metric_component(::Type{<:Geometry.XZPoint}) =4""" Δz_data(space::AbstractSpace)A DataLayout containing the `Δz` on a given space `space`."""functionΔz_data(space::AbstractSpace)
lg =local_geometry_data(space)
data_layout_type =eltype(lg.coordinates)
returngetproperty(
lg.∂x∂ξ.components.data,
Δz_metric_component(data_layout_type),
)
end
The text was updated successfully, but these errors were encountered:
Another pattern that we should probably fix/internalize is:
∂x∂ξ_level = local_geometry_level.∂x∂ξ.components.data
end_index =fieldcount(eltype(∂x∂ξ_level)) # This will be 4 in 2D and 9 in 3D.
∂x³∂ξ³_level = ∂x∂ξ_level.:($end_index)
A common pattern for users is to dive all the way into the backing SArray's
data
of anAxisTensor
. For example, in ClimaAtmos:ᶠϵ₂₃ = ᶠϵ.components.data.:6
.We should probably internalize these data accesses with some API.
One reason that this is problematic is that it could also depend on the DataLayout. For example:
is only correct for certain geometric points. ClimaCore has a general version of this:
The text was updated successfully, but these errors were encountered: