Dear All,
I’m using Julia 1.5.0 and Gridap v0.13.4 in Windows 10, and I was replicating the elasticity tutorial in Jupyter to learn how it works. Here is the code snippet:
using Gridap
# Creating a grid as the mesh
n = 10
domain = (0,1,0,1)
partition = (n,n)
model = CartesianDiscreteModel(domain,partition)
labels = get_face_labeling(model)
add_tag_from_tags!(labels,"diri1",[6,])
add_tag_from_tags!(labels,"diri0",[1,2,3,4,5,7,8])
println("These are the labels:");
println("entities: $(labels.tag_to_entities)")
println("names : $(labels.tag_to_name)")
text … explaining to myself what is this …
# GridapMakie.jl is an experimental package for plotting
# https://github.com/gridap/GridapMakie.jl
using Makie, GridapMakie
AbstractPlotting.inline!(true) # required in Jupyter to show inside the notebook (otherwise opens a new window to the plot)
scene = plot(model)
display(scene)
some other blocks in Jupyter with text, and then
# GridapMakie.jl is an experimental package for plotting
# https://github.com/gridap/GridapMakie.jl
using Makie, GridapMakie
AbstractPlotting.inline!(true) # required in Jupyter to show inside the notebook (otherwise opens a new window to the plot)
scene = plot(model)
display(scene)
Everything goes great, including GridapMakie, until suddenly, (and I wish to remark the “suddenly”),
V1 = TestFESpace(
reffe=:Lagrangian, conformity=:H1, valuetype=VectorValue{2,Float64},
model=model, labels=labels, order=1, dirichlet_tags=["diri0","diri1"]
)
UndefVarError: Args not defined
Stacktrace:
[1] Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Axes,F,Args} where Args<:Tuple where F where Axes(::typeof(==), ::Tuple{Tuple{var"#s302",var"#s302"} where var"#s302"<:Int64,Int64}, ::Nothing) at .\broadcast.jl:179
I restarted the kernel several times, and the same happens. But what’s surprising, at least to me, is that copying all the same code in REPL, runs perfectly and the last line throws UnconstrainedFESpace()
Restarting (again) the kernel in Jupyter, removing the block with GridMakie runs ok. I know GridapMakie is still experimental, but I’m curious about why it worked, and then the following sentence crashed just in Jupyter.
Any advice or comment is welcome, of course. And many thanks to the creators of Gridap: great PDE toolbox/solver/package for research and applications!