You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using SPHKernels, StaticArrays
sphk = WendlandC6(Float64, 3)
r = 0.5
h = 1.0
h_inv = 1.0 / h
u = r * h_inv
Δx = SVector((0.1,0.1,0.1))
∇𝒲(sphk, r, h⁻¹, Δx)
Seems StaticArrays and tuples not supported.
ERROR: MethodError: no method matching ∇𝒲 (::WendlandC6{Float64}, ::Float64, ::Float64, ::SVector{3, Float64})
Closest candidates are:
∇𝒲(::AbstractSPHKernel, ::Real, ::Real, ::Union{Real, Vector{<:Real}}) at .julia\packages\SPHKernels\SDriS\src\sph_functions\gradient.jl:87
∇𝒲(::AbstractSPHKernel, ::Real, ::Union{Real, Vector{<:Real}}, ::Union{Real, Vector{<:Real}}) at .julia\packages\SPHKernels\SDriS\src\sph_functions\gradient.jl:74
Stacktrace:
function kernel_gradient( k::AbstractSPHKernel, h_inv::Real, xᵢ::Vector{<:Real}, xⱼ::Vector{<:Real} ) # f1
function kernel_gradient( k::AbstractSPHKernel, r::Real, h_inv::Real, Δx::Union{Real, Vector{<:Real}}) # f2
function kernel_gradient( k::AbstractSPHKernel, h_inv::Real, xᵢ::Real, xⱼ::Real ) # f3
Seems f2 will never run for kernel_gradient( k::AbstractSPHKernel, r::Real, h_inv::Real, Δx::Real) because it should call f3
Seems function f1 and function f2 have same code inside.
May be better to make:
function kernel_gradient( k::AbstractSPHKernel, h_inv, xᵢ, xⱼ ) # f1
function kernel_gradient( k::AbstractSPHKernel, h_inv, r, Δx::Union{AbstractVector{<:Real}, NTuple{N, Real}}) where N # f2
then just
∇𝒲 = kernel_gradient
The text was updated successfully, but these errors were encountered:
Hello!
I used concept-code:
Seems StaticArrays and tuples not supported.
So maybe make method definition:
So I see 3 functions:
Seems f2 will never run for kernel_gradient( k::AbstractSPHKernel, r::Real, h_inv::Real, Δx::Real) because it should call f3
Seems function f1 and function f2 have same code inside.
May be better to make:
then just
The text was updated successfully, but these errors were encountered: