-
Notifications
You must be signed in to change notification settings - Fork 86
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
Reimplementation of skfem.mesh #556
Conversation
Let me add that in theory it supports arbitrarily high order meshes. |
One thing that must be verified is that the performance cost is not too large because it's using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert (a-A).sum() < 1e-10
Possibly not the best test since
a.sum() == A.sum() == 0
and almost numerically also for a2
, A2
, …, by definition the laplacian of a constant vanishing.
Maybe
assert (a - A).nnz == (a3 - A3).nnz == (a4 - A4).nnz == 0
but (a2 - A2).nnz == 452
and has data ranging from -504.5 to 251.6.
skfem/mesh/graph.py
Outdated
[1, 2], | ||
[0, 2], | ||
] | ||
elif self.t.shape[0] == 4: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not immediately obvious to me how this distinguishes quadrilaterals from tetrahedra, but I'll step through the (obviously working) example to see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, is it just that quadrilaterals aren't included yet and will be handled by something like
elif self.dim == 2 and self.mesh.t2f.shape[0] == 4: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[np.array_equal(m.facets, M.facets) for m, M in [(m, M), (m2, M2), (m3, M3), (m4, M4)]]
[True, True, False, False]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing these out. It seems that the quadratic Grid still has some issues. It's a bit complicated to wrap my head around it, however, at least we have the working reference MeshTri2
to compare against.
... |
Although it's very nice approach, currently the performance difference is so large that I won't replace
There are some bottlenecks that I immediately recognize. I'll start looking into it tomorrow. |
TODO hexahedron save reordering |
MeshHex2
MeshTet2
MeshHex.to_meshtet
MeshHex.element_finder
so thatBasis.interpolator
works for hexahedral meshes. Fixes Implement MeshHex.element_finder #503Mesh.{refine,scale,translate}
Mesh.define_boundary
Mesh.with_boundaries
andMesh.with_subdomains
Mesh{Tri,Quad}.refined
to clearsubdomains
andboundaries
, and not update them based on the new indexing (this will be hopefully reintroduced when resolving load auxiliary data with meshes #271)