-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
module TrixiGPU | ||
|
||
# Include other packages that are used in TrixiGPU.jl | ||
# using Reexport: @reexport | ||
|
||
using CUDA: @cuda, CuArray, HostKernel, launch_configuration, threadIdx | ||
using Trixi: AbstractEquations | ||
|
||
# Include other source files | ||
import Trixi: get_node_vars, get_node_coords, get_surface_node_vars | ||
|
||
# Include other source files | ||
include("function.jl") | ||
include("auxiliary/auxiliary.jl") | ||
|
||
# Export the public APIs | ||
export configurator_1d, configurator_2d, configurator_3d | ||
# export configurator_1d, configurator_2d, configurator_3d | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
include("configurator.jl") | ||
include("configurators.jl") | ||
include("methods.jl") |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Extend common helper methods from Trixi.jl | ||
|
||
@inline function get_node_vars(u, equations, indices...) | ||
SVector(ntuple(@inline(v->u[v, indices...]), Val(nvariables(equations)))) | ||
end | ||
|
||
@inline function get_node_coords(x, equations, indices...) | ||
SVector(ntuple(@inline(idx->x[idx, indices...]), Val(ndims(equations)))) | ||
end | ||
|
||
@inline function get_surface_node_vars(u, equations, indices...) | ||
u_ll = SVector(ntuple(@inline(v->u[1, v, indices...]), Val(nvariables(equations)))) | ||
u_rr = SVector(ntuple(@inline(v->u[2, v, indices...]), Val(nvariables(equations)))) | ||
|
||
return u_ll, u_rr | ||
end |