Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CairoMakie broken #118

Open
termi-official opened this issue Feb 9, 2024 · 1 comment
Open

CairoMakie broken #118

termi-official opened this issue Feb 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@termi-official
Copy link
Member

Thanks @KnutAM for reporting this.

The MWE is

using Ferrite, Tensors
import CairoMakie # errors 
# import GLMakie # works 
import FerriteViz as Viz

grid = generate_grid(Quadrilateral, (30,30))
dh = DofHandler(grid)
add!(dh, :u, Lagrange{RefQuadrilateral,1}()^2)
#add!(dh, :p, Lagrange{RefQuadrilateral,1}())
close!(dh)

u = zeros(ndofs(dh))
#apply_analytical!(u, dh, :p, x -> sinpi(2*x[1])*cospi(2*x[2]))
apply_analytical!(u, dh, :u, x -> Vec(sinpi(2*x[1]), cospi(2*x[2])))

plt = Viz.MakiePlotter(dh, u)
Viz.solutionplot(plt, field=:u)

which throws

Error showing value of type Makie.FigureAxisPlot:
ERROR: TypeError: in typeassert, expected Vector{GeometryBasics.Point{2, Float32}}, got a value of type ShaderAbstractions.Buffer{GeometryBasics.Point{2, Float32}, Vector{GeometryBasics.Point{2, Float32}}}

We should be able to fix this with more dispatches.

@termi-official termi-official added the bug Something isn't working label Feb 9, 2024
@koehlerson
Copy link
Member

@SimonDanisch help. I think the ShaderAbstractions.Buffer was previously converted somewhere in the pipeline to something that CairoMakie could digest. Is there an easy convert function we can provide for CairoMakie ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants