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

ElementHex2 #327

Closed
gdmcbain opened this issue Jan 29, 2020 · 6 comments · Fixed by #468
Closed

ElementHex2 #327

gdmcbain opened this issue Jan 29, 2020 · 6 comments · Fixed by #468
Assignees

Comments

@gdmcbain
Copy link
Contributor

The next element to be added under #23 is probably the 27-node quadratic three-dimensional ElementHex2.

Quadratic hexahedral elements were recommended over ElementHex1 by Benzley et al (1995), as consulted in #75.

The use of quadratic displacement formulated finite elements significantly improve the
performance of the tetrahedral as well as the hexahedral elements.

ElementHex2 will also be required for Taylor–Hood element for Stokes or Navier–Stokes problems on a MeshHex.

@gdmcbain
Copy link
Contributor Author

I guess the definition begins like:

class ElementHex2(ElementH1):
    nodal_dofs = 1
    facet_dofs = 1
    interior_dofs = 1
    edge_dofs = 1
    dim = 3
    maxdeg = 6
    dofnames = ['u', 'u', 'u', 'u']

but what is the rule for how the dofs are ordered within each group (8 nodal, 6 facets, 1 interior, 12 edges)? I assume the nodal dofs are the same as ElementHex1 but how are the facets and edges numbered? (And is the order indeed nodal, faces, interior, edges?)

@kinnala
Copy link
Owner

kinnala commented Jan 29, 2020

Tricky question because it depends on how the mesh connectivity is defined in MeshHex._build_mappings(). E.g. by looking at this definition of edges:

        self.edges = np.sort(np.hstack((
            self.t[[0, 1]],
            self.t[[0, 2]],
            self.t[[0, 3]],
            self.t[[1, 4]],
            self.t[[1, 5]],
            self.t[[2, 4]],
            self.t[[2, 6]],
            self.t[[3, 5]],
            self.t[[3, 6]],
            self.t[[4, 7]],
            self.t[[5, 7]],
            self.t[[6, 7]],
        )), axis=0)

Basically you would need to make sure that the first edge basis function would be the one which gets value 1 between the nodes numbered 0 and 1 (rows 0 and 1 in mesh.p[:, mesh.t]), the second basis function gets value 1 between the nodes numbered 0 and 2, etc.

I hope it makes sense. If it doesn't, ask more info and I'll provide.

@kinnala
Copy link
Owner

kinnala commented Feb 14, 2020

I'm now looking into implementing the p-version of the finite element method in scikit-fem, starting with ElementQuadP for arbitrary order. I'll probably change the reference element used for quads and hexes (from (-1, 1)^d to (0, 1)^d) because the book I'm using as a reference uses those and it seems that the notation for the basis functions will be slightly more concise.

Just a remark in case you already started working on this.

@gdmcbain
Copy link
Contributor Author

Great! As in potentially different p in each cell? Very exciting.

Which book?

+1 for relocating the tensorial elements to the first ray/quadrant/octant. I had briefly lamented when working in one dimension that the canonical line segment element was not both the one-dimensional simplex and the one-dimensional factor from which the quadrilateral and hexahedron are formed as products.

@kinnala
Copy link
Owner

kinnala commented Feb 14, 2020

I'm now using Leszek Demkowicz' books since I got a recommendation from a friend:

https://www.amazon.com/Computing-Hp-Adaptive-Finite-Elements-Vol/dp/1584886714

I'm also simultaneously studying theory from Schwab's book:

https://www.amazon.com/hp-Finite-Element-Methods-Applications/dp/0198503903

@kinnala
Copy link
Owner

kinnala commented Feb 14, 2020

I'm not yet sure how hp-adaptivity would work in scikit-fem, but I'll know better after studying these books. I'm going to start with integrated Legendre polynomial -based basis functions for quads and triangles for arbitrary p.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants