Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stencil cleanup #328

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def reference(
)
)
- 2.0 * vn
) * (inv_primal_edge_length**2)
) * (inv_primal_edge_length * inv_primal_edge_length)

z_nabla2_e = z_nabla2_e + (
(
Expand All @@ -145,7 +145,7 @@ def reference(
)
)
- 2.0 * vn
) * (inv_vert_vert_length**2)
) * (inv_vert_vert_length * inv_vert_vert_length)

z_nabla2_e = 4.0 * z_nabla2_e

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _mo_velocity_advection_stencil_09(
e_bln_c_s: Field[[CEDim], wpfloat],
) -> Field[[CellDim, KDim], vpfloat]:
z_w_concorr_me_wp = astype(z_w_concorr_me, wpfloat)
z_w_concorr_mc_wp = neighbor_sum(z_w_concorr_me_wp(C2E) * e_bln_c_s(C2CE), axis=C2EDim)
z_w_concorr_mc_wp = neighbor_sum(e_bln_c_s(C2CE) * z_w_concorr_me_wp(C2E), axis=C2EDim)
return astype(z_w_concorr_mc_wp, vpfloat)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def _mo_intp_rbf_rbf_vec_interpol_vertex(
ptr_coeff_1: Field[[VertexDim, V2EDim], wpfloat],
ptr_coeff_2: Field[[VertexDim, V2EDim], wpfloat],
) -> tuple[Field[[VertexDim, KDim], wpfloat], Field[[VertexDim, KDim], wpfloat]]:
p_u_out = neighbor_sum(p_e_in(V2E) * ptr_coeff_1, axis=V2EDim)
p_v_out = neighbor_sum(p_e_in(V2E) * ptr_coeff_2, axis=V2EDim)
p_u_out = neighbor_sum(ptr_coeff_1 * p_e_in(V2E), axis=V2EDim)
p_v_out = neighbor_sum(ptr_coeff_2 * p_e_in(V2E), axis=V2EDim)
return p_u_out, p_v_out


Expand Down