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
{{ message }}
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
The following code (MWE) results in LoadError: MethodError: objects of type TypeVar are not callable
Both Win10 and Mac, Julia 1.4.2, freshly updated all packages (SparsityDetection 0.3.2, DiffEqOperators 4.10.0)
using DiffEqOperators
using SparsityDetection, SparseArrays
nknots = 10
h = 1.0/(nknots+1)
const Δ = CenteredDifference(2, 2, h, nknots)
u0 = rand(nknots, nknots)
function st!(du,u,p,t)
du .= 0.0
du[1,:] .= Δ*Dirichlet0BC(Float64)*view(u,1,:)
return nothing
end
outp = similar(u0)
# st!(outp,u0, nothing, 0.0)
sparsity_pattern = jacobian_sparsity(st!,outp,u0, nothing, 0.0)
The text was updated successfully, but these errors were encountered:
The quickest way to get the sparsity pattern here would be to just directly make SparseMatrixCSC(Δ*Dirichlet0BC(Float64)) and the sparsity is then clear from there. That should work on any DiffEqOperators problem.
Chris, thank you for the advice. I have in the meanwhile just got the sparsity pattern numerically. It may take a few minutes to calculate, but then I save it onto the disk, so I have to do it only once for every mesh size.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following code (MWE) results in
LoadError: MethodError: objects of type TypeVar are not callable
Both Win10 and Mac, Julia 1.4.2, freshly updated all packages (SparsityDetection 0.3.2, DiffEqOperators 4.10.0)
The text was updated successfully, but these errors were encountered: