Bennu is a toolbox for discontinuous spectral element discretizations of partial differential equations that supports execution on either the CPU or GPU (via KernelAbstractions).
See Atum for examples using Bennu to solve balance laws.
License: MIT License
Bennu is a toolbox for discontinuous spectral element discretizations of partial differential equations that supports execution on either the CPU or GPU (via KernelAbstractions).
See Atum for examples using Bennu to solve balance laws.
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
MWE:
using Bennu
let
A = Array
T = Float64
cell = LobattoCell{T, A}(3, 3, 3)
vert_coord = one(T):1//2:4one(T)
ncells_h_panel = 2
grid = cubedspheregrid(cell, vert_coord, ncells_h_panel)
J = components(metrics(grid))[2]
@show extrema(J)
end
extrema(J) = (-0.6783613499228317, -0.02813129271278362)
A quick comparison to Clima seems to indicate that the values are correct, just the sign is wrong.
using Bennu
using StaticArrays
using Tullio
Nq = 5;
nelem = 10;
A = Array;
FT = Float64;
cell = LobattoCell{FT, A}(Nq, Nq);
v1d = range(FT(0), stop=FT(1), length=nelem+1);
grid = brickgrid(cell, (v1d, v1d); periodic = (true, false));
q = fieldarray(undef, SVector{3, FT}, grid);
v = last(components(q));
P = Bennu.toequallyspaced(cell);
P * v
results in
julia> P * v
ERROR: TypeError: in typeassert, expected Tuple{Int64, Int64, Int64}, got a value of type Nothing
Stacktrace:
[1] (ArrayInterface.StrideIndex{3, nothing, 1})(s::Tuple{Static.StaticInt{1}, Int64, Int64}, o::Tuple{Static.StaticInt{1}, Static.StaticInt{1}, Static.StaticInt{1}})
@ ArrayInterface ~/.julia/packages/ArrayInterface/TCj9U/src/array_index.jl:197
[2] (ArrayInterface.StrideIndex{3, nothing, 1})(a::Base.ReshapedArray{Float64, 3, SubArray{Float64, 2, Array{Float64, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}}}, false}, Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}})
@ ArrayInterface ~/.julia/packages/ArrayInterface/TCj9U/src/array_index.jl:200
[3] ArrayInterface.StrideIndex(a::Base.ReshapedArray{Float64, 3, SubArray{Float64, 2, Array{Float64, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}}}, false}, Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}})
@ ArrayInterface ~/.julia/packages/ArrayInterface/TCj9U/src/array_index.jl:203
[4] bytestrideindex
@ ~/.julia/packages/LayoutPointers/oZEWc/src/stridedpointers.jl:61 [inlined]
[5] stridedpointer_preserve
@ ~/.julia/packages/LayoutPointers/oZEWc/src/stridedpointers.jl:73 [inlined]
[6] ππΈπ!
@ ~/.julia/packages/Tullio/u7Tk0/src/macro.jl:1094 [inlined]
[7] tile_halves(fun!::Bennu.var"#ππΈπ!#282", ::Type{Array{Float64}}, As::Tuple{Array{Float64, 3}, Matrix{Float64}, Matrix{Float64}, Base.ReshapedArray{Float64, 3, SubArray{Float64, 2, Array{Float64, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}}}, false}, Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}}}, Is::Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, Js::Tuple{UnitRange{Int64}, UnitRange{Int64}}, keep::Nothing, final::Bool)
@ Tullio ~/.julia/packages/Tullio/u7Tk0/src/threads.jl:139
[8] tile_halves(fun!::Bennu.var"#ππΈπ!#282", ::Type{Array{Float64}}, As::Tuple{Array{Float64, 3}, Matrix{Float64}, Matrix{Float64}, Base.ReshapedArray{Float64, 3, SubArray{Float64, 2, Array{Float64, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}}}, false}, Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}}}, Is::Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, Js::Tuple{UnitRange{Int64}, UnitRange{Int64}}, keep::Nothing, final::Bool)
@ Tullio ~/.julia/packages/Tullio/u7Tk0/src/threads.jl:142
[9] tile_halves
@ ~/.julia/packages/Tullio/u7Tk0/src/threads.jl:136 [inlined]
[10] threader
@ ~/.julia/packages/Tullio/u7Tk0/src/threads.jl:65 [inlined]
[11] macro expansion
@ ~/.julia/packages/Tullio/u7Tk0/src/macro.jl:1005 [inlined]
[12] *(K::Bennu.Kron{Tuple{Matrix{Float64}, Matrix{Float64}}}, f::SubArray{Float64, 2, Array{Float64, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}}}, false})
@ Bennu ~/codes/Bennu.jl/src/kroneckeroperators.jl:59
[13] top-level scope
@ REPL[15]:1
[14] top-level scope
@ ~/.julia/packages/CUDA/Axzxe/src/initialization.jl:52
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.