Skip to content

Commit

Permalink
modified: ext/cuda/topologies_dss.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaysridhar committed May 2, 2024
1 parent 8fd0a5d commit 78478f3
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions ext/cuda/topologies_dss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function dss_transform_kernel!(
pperimeter_data[level, p, fidx, elem] = pdata[data_idx] * weight
end
for fidx in covariant123fidx
data_idx1 = Topologies._get_idx(sizet_data, (level, ip, jp, fidx, elem))
data_idx1 = Topologies._get_idx(sizet_data, (level, ip, jp, fidx, elem))
data_idx2 =
Topologies._get_idx(sizet_data, (level, ip, jp, fidx + 1, elem))
data_idx3 =
Expand Down Expand Up @@ -436,18 +436,15 @@ function dss_untransform_kernel!(
) = Topologies._get_idx_metric(sizet_metric, (level, ip, jp, elem))
pdata[data_idx1] =
p∂x∂ξ[idx11] * pperimeter_data[level, p, fidx, elem] +
p∂x∂ξ[idx12] *
pperimeter_data[level, p, fidx + 1, elem] +
p∂x∂ξ[idx12] * pperimeter_data[level, p, fidx + 1, elem] +
p∂x∂ξ[idx13] * pperimeter_data[level, p, fidx + 2, elem]
pdata[data_idx2] =
p∂x∂ξ[idx21] * pperimeter_data[level, p, fidx, elem] +
p∂x∂ξ[idx22] *
pperimeter_data[level, p, fidx + 1, elem] +
p∂x∂ξ[idx22] * pperimeter_data[level, p, fidx + 1, elem] +
p∂x∂ξ[idx23] * pperimeter_data[level, p, fidx + 2, elem]
pdata[data_idx3] =
p∂x∂ξ[idx31] * pperimeter_data[level, p, fidx, elem] +
p∂x∂ξ[idx32] *
pperimeter_data[level, p, fidx + 1, elem] +
p∂x∂ξ[idx32] * pperimeter_data[level, p, fidx + 1, elem] +
p∂x∂ξ[idx33] * pperimeter_data[level, p, fidx + 2, elem]
end
for fidx in contravariant123fidx
Expand All @@ -470,18 +467,15 @@ function dss_untransform_kernel!(
) = Topologies._get_idx_metric(sizet_metric, (level, ip, jp, elem))
pdata[data_idx1] =
p∂ξ∂x[idx11] * pperimeter_data[level, p, fidx, elem] +
p∂ξ∂x[idx21] *
pperimeter_data[level, p, fidx + 1, elem] +
p∂ξ∂x[idx21] * pperimeter_data[level, p, fidx + 1, elem] +
p∂ξ∂x[idx31] * pperimeter_data[level, p, fidx + 2, elem]
pdata[data_idx2] =
p∂ξ∂x[idx12] * pperimeter_data[level, p, fidx, elem] +
p∂ξ∂x[idx22] *
pperimeter_data[level, p, fidx + 1, elem] +
p∂ξ∂x[idx22] * pperimeter_data[level, p, fidx + 1, elem] +
p∂ξ∂x[idx32] * pperimeter_data[level, p, fidx + 2, elem]
pdata[data_idx3] =
p∂ξ∂x[idx13] * pperimeter_data[level, p, fidx, elem] +
p∂ξ∂x[idx23] *
pperimeter_data[level, p, fidx + 1, elem] +
p∂ξ∂x[idx23] * pperimeter_data[level, p, fidx + 1, elem] +
p∂ξ∂x[idx33] * pperimeter_data[level, p, fidx + 2, elem]
end
end
Expand Down

0 comments on commit 78478f3

Please sign in to comment.