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

1D visualization doesn't work? #127

Closed
asinghvi17 opened this issue Sep 17, 2024 · 2 comments
Closed

1D visualization doesn't work? #127

asinghvi17 opened this issue Sep 17, 2024 · 2 comments

Comments

@asinghvi17
Copy link

It looks like FerriteViz always assumes triangles are available, meaning 1D visualizations won't work. This isn't a problem for 2+ dimensional data because triangles are always available.

Is there any interest in fixing that? I just tried to visualize a system created with generate_grid(Line, (20,)) and immediately got an error:

ERROR: MethodError: no method matching ntriangles(::Line)

Closest candidates are:
  ntriangles(::Ferrite.AbstractCell{<:RefHexahedron})
   @ FerriteViz ~/.julia/dev/FerriteViz/src/utils.jl:194
  ntriangles(::Ferrite.AbstractCell{<:RefTetrahedron})
   @ FerriteViz ~/.julia/dev/FerriteViz/src/utils.jl:193
  ntriangles(::Ferrite.AbstractCell{<:RefQuadrilateral})
   @ FerriteViz ~/.julia/dev/FerriteViz/src/utils.jl:192
  ...

Stacktrace:
 [1] MakiePlotter(dh::DofHandler{1, Grid{1, Line, Float64}}, u::Vector{Float64}, topology::Nothing)
   @ FerriteViz ~/.julia/dev/FerriteViz/src/utils.jl:68
 [2] MakiePlotter(dh::DofHandler{1, Grid{1, Line, Float64}}, u::Vector{Float64})
   @ FerriteViz ~/.julia/dev/FerriteViz/src/utils.jl:97
 [3] top-level scope
   @ REPL[49]:1

@koehlerson
Copy link
Member

related #41

I think the way to go is to add a field to the plotter that can hold line information #41 (comment)

This would be of high interest, because I think there will be a lot of people that use structural elements such as trusses and beams that require 1D elements to be plotted (as well as Dennis' mentioned examples in the linked comment)

@asinghvi17
Copy link
Author

Thanks for the reference! Closing as duplicate then.

@asinghvi17 asinghvi17 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants