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

WIP: Add compat for new AbstractCell type. #78

Closed
wants to merge 1 commit into from

Conversation

fredrikekre
Copy link
Member

No description provided.

@fredrikekre
Copy link
Member Author

I think the new interface will be a win in FerriteViz too, most dispatches seem to be based on the reference shape, which you can now to directly instead of figuring out the correct numbers in Cell{refdim, nnodes, nfaces}.

@termi-official
Copy link
Member

I introduced the abstract methods for now to have at least some kind of viz. Actually the high order stuff needs quite a different treatment but I could not find time yet.

Copy link
Member

@termi-official termi-official left a comment

Choose a reason for hiding this comment

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

LGTM otherwise. Fixing the first one should make the CI happy (fails because the first order refinement for interpolations is missing).

@@ -10,65 +10,65 @@ for_nodes(::Union{Ferrite.Lagrange{2,Ferrite.RefTetrahedron,2},Ferrite.Discontin
(3,6,5),
(5,4,2),
)
# Cubic Triangle
for_nodes(::Union{Ferrite.Lagrange{2,Ferrite.RefTetrahedron,3},Ferrite.DiscontinuousLagrange{2,Ferrite.RefTetrahedron,3},Ferrite.Cell{2,10,3}}) = (
Copy link
Member

Choose a reason for hiding this comment

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

Note that this also includes the refinement for interpolations. Maybe we just want to remove the Cell from the type union for now. Same for ones below.

ntriangles(cell::Ferrite.AbstractCell{3,N,6}) where N = 6*4 # Hex
ntriangles(cell::TriangleBasedCells) = 1 # Tris in 2D and 3D
ntriangles(cell::QuadrilateralBasedCells) = 4 # Quads in 2D and 3D
# ntriangles(cell::Ferrite.AbstractCell{3,N,1}) where N = 4 # Tets as a special case of a Quad, obviously :)
Copy link
Member

Choose a reason for hiding this comment

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

Can be removed now that embedded cells do not have the case distinction anymore.

Suggested change
# ntriangles(cell::Ferrite.AbstractCell{3,N,1}) where N = 4 # Tets as a special case of a Quad, obviously :)

@fredrikekre
Copy link
Member Author

I am donating this PR to someone who knows better :) The current changes are mostly mechanical without knowing much how these things are used.

@termi-official
Copy link
Member

Will take over then.

@termi-official
Copy link
Member

Handled in #103

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.

2 participants