Skip to content

Commit

Permalink
modified: ext/cuda/operators_sem_shmem.jl
Browse files Browse the repository at this point in the history
	modified:   ext/cuda/operators_spectral_element.jl
  • Loading branch information
Akshay Sridhar committed Jun 17, 2024
1 parent 4db7322 commit e0558aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ext/cuda/operators_sem_shmem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,22 @@ Base.@propagate_inbounds function operator_fill_shmem!(
if RT <: Geometry.Covariant12Vector
(v,) = input
v[i, j, vt] = arg
elseif typeof(arg) <: Geometry.UVVector
elseif typeof(arg) <: Geometry.UVVector
# TODO classify based on returntype
v₁, v₂ = input
v₁[i, j, vt] = Geometry.LocalVector(arg, local_geometry).u
v₂[i, j, vt] = Geometry.LocalVector(arg, local_geometry).v
#v₁[i, j, vt] = Geometry.contravariant1(arg, local_geometry)
#v₂[i, j, vt] = Geometry.contravariant2(arg, local_geometry)
elseif typeof(arg) <: Geometry.UVWVector
# TODO classify based on returntype
v₁, v₂, v₃ = input
v₁[i, j, vt] = Geometry.LocalVector(arg, local_geometry).u
v₂[i, j, vt] = Geometry.LocalVector(arg, local_geometry).v
v₃[i, j, vt] = Geometry.LocalVector(arg, local_geometry).w
#v₁[i, j, vt] = Geometry.contravariant1(arg, local_geometry)
#v₂[i, j, vt] = Geometry.contravariant2(arg, local_geometry)
#v₃[i, j, vt] = Geometry.contravariant3(arg, local_geometry)
end
end

Expand Down
6 changes: 6 additions & 0 deletions ext/cuda/operators_spectral_element.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ Base.@propagate_inbounds function operator_evaluate(
return Geometry.AxisTensor((Geometry.Covariant12Axis(), Geometry.UVAxis()),
(∂f₁∂ξ₁, ∂f₂∂ξ₁,
∂f₁∂ξ₂, ∂f₂∂ξ₂))
#return Geometry.AxisTensor((Geometry.Covariant12Axis(), Geometry.Contravariant12Axis()),
# (∂f₁∂ξ₁, ∂f₂∂ξ₁,
# ∂f₁∂ξ₂, ∂f₂∂ξ₂))
else
v₁, v₂, v₃ = input
∂f₁∂ξ₁ = D[i, 1] v₁[1, j, vt]
Expand All @@ -312,6 +315,9 @@ Base.@propagate_inbounds function operator_evaluate(
return Geometry.AxisTensor((Geometry.Covariant12Axis(), Geometry.UVWAxis()),
(∂f₁∂ξ₁, ∂f₂∂ξ₁, ∂f₃∂ξ₁,
∂f₁∂ξ₂, ∂f₂∂ξ₂, ∂f₃∂ξ₂))
#return Geometry.AxisTensor((Geometry.Covariant12Axis(), Geometry.Contravariant123Axis()),
# (∂f₁∂ξ₁, ∂f₂∂ξ₁, ∂f₃∂ξ₁,
# ∂f₁∂ξ₂, ∂f₂∂ξ₂, ∂f₃∂ξ₂))
end
end

Expand Down

0 comments on commit e0558aa

Please sign in to comment.