Skip to content

Commit

Permalink
Merge pull request #21 from ErikQQY/qqy/unpack
Browse files Browse the repository at this point in the history
Drop unpack and use standard destructing syntax
  • Loading branch information
huiyuxie authored Aug 10, 2024
2 parents 79a5987 + 7eb585a commit 7a54e12
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ version = "1.0.0-DEV"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SimpleUnPack = "ce78b400-467f-4804-87d8-8f486da07d0a"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StrideArrays = "d1fa6d79-ef01-42a6-86c9-f7c551f8593b"
Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
Expand All @@ -16,7 +15,6 @@ TrixiBase = "9a0f1c46-06d5-4909-a5a3-ce25d3fa3284"
[compat]
BenchmarkTools = "1"
CUDA = "5"
SimpleUnPack = "1"
SciMLBase = "2"
StaticArrays = "1"
StrideArrays = "0.1"
Expand Down
2 changes: 0 additions & 2 deletions src/TrixiGPU.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ using StrideArrays: PtrArray

using StaticArrays: SVector

using SimpleUnPack: @unpack

# Include other source files
include("function.jl")
include("auxiliary/auxiliary.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include("dg_2d.jl")

# Ref: `rhs!` function in Trixi.jl
function rhs_gpu!(du_ode, u_ode, semi::SemidiscretizationHyperbolic, t)
@unpack mesh, equations, initial_condition, boundary_conditions, source_terms, solver, cache = semi
(; mesh, equations, initial_condition, boundary_conditions, source_terms, solver, cache) = semi

u = wrap_array(u_ode, mesh, equations, solver, cache)
du = wrap_array(du_ode, mesh, equations, solver, cache)
Expand Down
8 changes: 1 addition & 7 deletions test/test_solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ semi = SemidiscretizationHyperbolic(mesh,
initial_condition_convergence_test,
solver)

@unpack mesh,
equations,
initial_condition,
boundary_conditions,
source_terms,
solver,
cache = semi
(; initial_condition, boundary_conditions, source_terms, cache) = semi

t = 0.0f0
tspan = (0.0f0, 1.0f0)
Expand Down

0 comments on commit 7a54e12

Please sign in to comment.