Skip to content

Makie recipes fail #166

Open
Open

Description

@m-schwendt

The Makie recipes seem to fail. Here is a minimum working example, taken from the Poisson tutorial:

using Inti, Gmsh
meshsize = 0.1
gmsh.initialize()
jellyfish = Inti.gmsh_curve(0, 2π; meshsize) do s
    r = 1 + 0.3 * cos(4 * s + 2 * sin(s))
    return r * Inti.Point2D(cos(s), sin(s))
end
cl = gmsh.model.occ.addCurveLoop([jellyfish])
surf = gmsh.model.occ.addPlaneSurface([cl])
gmsh.model.occ.synchronize()
gmsh.option.setNumber("Mesh.MeshSizeMax", meshsize)
gmsh.model.mesh.generate(2)
gmsh.model.mesh.setOrder(2)
msh = Inti.import_mesh(; dim = 2)
gmsh.finalize()

Ω = Inti.Domain(e -> Inti.geometric_dimension(e) == 2, msh)
Γ = Inti.boundary(Ω)
Ω_msh = view(msh, Ω)
Γ_msh = view(msh, Γ)

using GLMakie
plot(Ω_msh; strokewidth = 1)
plot!(Γ_msh; color = :red)

The visualization of the mesh already fails. And later on, the solution can't be plotted either:

nodes = Inti.nodes(Ω_msh)
u_nodes = Inti.quadrature_to_node_vals(Ω_quad, u_quad)
er = u_nodes - map(uₑ, nodes)
colorrange = extrema(u_nodes)
fig = Figure(; size = (800, 300))
ax = Axis(fig[1, 1]; aspect = DataAspect())
plot!(Ω_msh; colorrange, color = u_nodes, interpolate = true)

I'm using the newest version of the packages:

Status `~/Projects/TestInti/Project.toml`
  [2d63477d] FMM2D v0.2.1
  [e9467ef8] GLMakie v0.13.16
  [705231aa] Gmsh v0.3.1
  [fb74042b] Inti v0.2.1
  [42fd0dbc] IterativeSolvers v0.9.4
  [90137ffa] StaticArrays v1.9.23

and Julia 1.13.2:

nodes = Inti.nodes(Ω_msh)
u_nodes = Inti.quadrature_to_node_vals(Ω_quad, u_quad)
er = u_nodes - map(uₑ, nodes)
colorrange = extrema(u_nodes)
fig = Figure(; size = (800, 300))
ax = Axis(fig[1, 1]; aspect = DataAspect())
plot!(Ω_msh; colorrange, color = u_nodes, interpolate = true)

I hope someone can look into this, and thanks for creating this package!

Activity

  1. maltezfaria commented on Oct 21, 2026

    @maltezfaria
    Member

    Hi @m-schwendt,

    Thanks for opening the issue. I think the problem comes from the fact that you are using syntax that works on the main branch (probably by reading the dev docs, as we indeed suggest in the README!), but you are running on a tagged version of inti (0.2.1 from what I can see above). I will tag a new 0.3 version later today so that you can just update the package and things should work.

  2. m-schwendt commented on Oct 23, 2026

    @m-schwendt
    Author

    Ups, yes, true, thanks for the pointer @maltezfaria!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions