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

Ferrite 1.0 compat #103

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open

Ferrite 1.0 compat #103

wants to merge 34 commits into from

Conversation

termi-official
Copy link
Member

@termi-official termi-official commented Oct 14, 2023

In this branch and PR I develop the preparation for the upcoming Ferrite release.

TODOs

  • Replace transfer_quadrature_face_to_cell with the Ferrite internal one
  • Remove getgrid

Post-Merge

@termi-official termi-official linked an issue Oct 14, 2023 that may be closed by this pull request
3 tasks
src/utils.jl Outdated
Comment on lines 17 to 31
function Ferrite.shape_value(ipv::VectorizedInterpolation{4, shape}, ξ::Tensors.Vec{2, T}, I::Int) where {shape <: Ferrite.AbstractRefShape{2}, T}
i0, c0 = divrem(I - 1, 4)
i = i0 + 1
c = c0 + 1
v = Ferrite.shape_value(ipv.ip, ξ, i)
return SVector(ntuple(j -> j == c ? v : zero(v), 4))
end

function field_offset(dh::Ferrite.DofHandler, field_idx::Int)
offset = 0
for i in 1:(field_idx-1)
offset += Ferrite.getnbasefunctions(dh.field_interpolations[i])::Int * dh.field_dims[i]
end
return offset
function Ferrite.shape_value(ipv::VectorizedInterpolation{9, shape}, ξ::Tensors.Vec{3, T}, I::Int) where {shape <: Ferrite.AbstractRefShape{3}, T}
i0, c0 = divrem(I - 1, 9)
i = i0 + 1
c = c0 + 1
v = Ferrite.shape_value(ipv.ip, ξ, i)
return SVector(ntuple(j -> j == c ? v : zero(v), 9))
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/runtests.jl Outdated Show resolved Hide resolved
@termi-official termi-official mentioned this pull request Nov 8, 2023
@termi-official
Copy link
Member Author

We need to add JuliaDocs/Documenter.jl#2211

@KnutAM
Copy link
Member

KnutAM commented Mar 22, 2024

Found today that elementinfo(::Interpolation) is broken on this branch.

…n for some reason when there is also a 2D version of it.
@termi-official
Copy link
Member Author

Reminder for myself - There is some kind of regression in the Makie API behavior which I need to investigate. MWE:

using FerriteViz.Makie, WGLMakie, Bonito

Page()

struct MakiePlotter{dim}
end

@recipe(MyLines) do scene
    Attributes(
        plotnodes=true,
    )
end


function Makie.plot!(WF::MyLines{<:Tuple{<:MakiePlotter{dim}}}) where dim
    plotter = WF[1][]
    if dim == 2
        lines = [Point2f(0.0,0.0)]
    else
        lines = [Point3f(1.0,1.0,0.0), Point3f(0.0,0.0,1.0)]
        @info "Peekaboo"
    end
    Makie.scatter!(WF, lines)
end

mylines(MakiePlotter{2}())  # 2D
mylines(MakiePlotter{3}())  # 2D
scatter([Point2f(0.0,0.0)]) # 2D
scatter([Point3f(1.0,1.0,0.0), Point3f(0.0,0.0,1.0)]) # 3D

@termi-official termi-official marked this pull request as ready for review September 30, 2024 18:25
@termi-official
Copy link
Member Author

termi-official commented Sep 30, 2024

There is some issue regarding the depth with the interactivity. Other than that good from my side. @koehlerson if you agree with the changes we can merge and bump.

@koehlerson
Copy link
Member

There is some issue regarding the depth with the interactivity. Other than that good from my side. @koehlerson if you agree with the changes we can merge and bump.

Anything in particular? Will look into that this week

@termi-official
Copy link
Member Author

There is some issue regarding the depth with the interactivity. Other than that good from my side. @koehlerson if you agree with the changes we can merge and bump.

Anything in particular? Will look into that this week

CI changes and some changes in utils.jl (e.g. I removed ε as it caused issues). Everything else should be a very mechanistic update.

@termi-official
Copy link
Member Author

elementinf

Okay I need to fix this first.

@koehlerson
Copy link
Member

while checking if everything interactive works, I stumbled across this problem: #131

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

Successfully merging this pull request may close these issues.

Plotting surface for second order triangular mesh fails Getting ready for Ferrite v1.0.0 release
4 participants