Anisotropic h and p refinement for conforming FEM in 3D Philipp Frauenfelder Christian Lage Christoph Schwab pfrauenf@math.ethz.ch Seminar for Applied Mathematics Federal Institute of Technology, ETH Zürich Anisotropic h and p refinement for conforming FEM in 3D – p.1/48 Goal for Meshes • Hierarchy of hanging nodes • Anisotropic refinements Anisotropic h and p refinement for conforming FEM in 3D – p.2/48 Overview • Introduction • Anisotropic h refinements • S and T matrices • Assembly of Supports Anisotropic h and p refinement for conforming FEM in 3D – p.3/48 Overview • Introduction • Anisotropic h refinements • S and T matrices • Assembly of Supports • Anisotropic p refinements Anisotropic h and p refinement for conforming FEM in 3D – p.3/48 Overview • Introduction • Anisotropic h refinements • S and T matrices • Assembly of Supports • Anisotropic p refinements • hp Meshes Anisotropic h and p refinement for conforming FEM in 3D – p.3/48 Overview • Introduction • Anisotropic h refinements • S and T matrices • Assembly of Supports • Anisotropic p refinements • hp Meshes • Perspectives Anisotropic h and p refinement for conforming FEM in 3D – p.3/48 Previous hp Software • Szabó 1985: PROBE (p only) • Demkowicz, Oden, Rachowicz et al. 1989: PHLEX, hp90 • Anderson: STRIPE (p only on a-priori generated meshes) • Flaherty, Shephard: Tetrahedra only (3D anisotropy?) • Karniadakis, Sherwin: NEKTAR (regular meshes only, tetrahedra, hexahedra, prisms, p only) • Devloo • Szabó since 1995: STRESSCHECK (p only) • Heuveline et al.: HiFlow • In development: deal.II (Kanschat & Bangerth), ngsolve (Schöberl et al.) Anisotropic h and p refinement for conforming FEM in 3D – p.4/48 FE Method • Let Ω ⊂ Rd , d = 1, 2, 3 (dimension independent design) • Find u ∈ V such that a(u, v) = l(v) ∀v ∈ V, V a FE space, a(. , .) a bilinear form and l(.) a linear form. • Standard FE: V ⊂ H 1 (Ω) V = S 1,p (Ω, T ) 1 = u ∈ H (Ω) : u|K ◦ FK ∈ Qp ∀K ∈ T ⇒ u ∈ V is continuous, ie. C 0 (Ω̄). • Vector valued problems are possible Anisotropic h and p refinement for conforming FEM in 3D – p.5/48 FE Space: Generalities K • Basis {Φi }N constructed from element shape functions φ j on i=1 elements K ∈ T . • Reference element shape functions: Nj , element map: FK : K̂ → K ⇒ φK j ◦ F K = Nj . PSfrag replacements ξ x FK K K̂ Φj Nj 0.2 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 -0.2 -0.25 0.2 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 -0.2 1 0.8 0 0 0.6 0.2 0.4 x 0.4 0.6 0.8 0.2 1 0 y 0.2 0.4 0.6 x 0.8 1 1.2 1.4 1.6 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 y Anisotropic h and p refinement for conforming FEM in 3D – p.6/48 FE Meshes Local refinements as mean to improve approximation of exact solution by FE solution Anisotropic h and p refinement for conforming FEM in 3D – p.7/48 FE Meshes Local refinements as mean to improve approximation of exact solution by FE solution Anisotropic h and p refinement for conforming FEM in 3D – p.7/48 FE Meshes Local refinements as mean to improve approximation of exact solution by FE solution Anisotropic h and p refinement for conforming FEM in 3D – p.7/48 FE Meshes Local refinements as mean to improve approximation of exact solution by FE solution Anisotropic h and p refinement for conforming FEM in 3D – p.7/48 But standard FE forbids locally refined grids: discontinuities are possible. FE Meshes Local refinements as mean to improve approximation of exact solution by FE solution Anisotropic h and p refinement for conforming FEM in 3D – p.7/48 Mortar vs. Enforcing Continuity • Topolocigal closure Anisotropic h and p refinement for conforming FEM in 3D – p.8/48 Mortar vs. Enforcing Continuity • Topolocigal closure Anisotropic h and p refinement for conforming FEM in 3D – p.8/48 Mortar vs. Enforcing Continuity • Topolocigal closure Drawbacks: more elements, more element types, what about refining a ? Anisotropic h and p refinement for conforming FEM in 3D – p.8/48 Mortar vs. Enforcing Continuity • Topolocigal closure Drawbacks: more elements, more element types, what about refining a ? • Our philosophy: hexahedral meshes only (tensorized interpolants, spectral quadrature techniques) • Our solution: Treating the constraints induced by the hanging nodes Why conforming? a(u, v) = a(v, u) and a(u, u) ≥ αkuk2V ⇒ A SPD, pccg . . . Anisotropic h and p refinement for conforming FEM in 3D – p.8/48 Our Software: Concepts • Started by Christian Lage during his Ph.D. studies (1995). • Used and improved by Frauenfelder, Matache, Schmidlin, Schmidt and several students. • Concept Oriented Design using mathematical principles [1]. • Currently two parts: hp-FEM, BEM (wavelet and multipole methods). • C++ [1] P. F. and Ch. Lage, “Concepts—An Object Oriented Software Package for Partial Differential Equations”, Mathematical Modelling and Numerical Analysis 36 (5), pp. 937–951 (2002). Anisotropic h and p refinement for conforming FEM in 3D – p.9/48 Overview • Introduction • Anisotropic h refinements S and T matrices • • Assembly of Supports • Anisotropic p refinements • hp Meshes • Perspectives Anisotropic h and p refinement for conforming FEM in 3D – p.10/48 T Matrix K mK Definition 1 (T Matrix). Element shape functions φj j=1 on element K, N global basis functions {Φi }i=1 . The T matrix T K ∈ RmK ×N of element K is implicitly defined by Φi | K = mK X [T K ]ji φK j j=1 as vectors: K Φ|K = T > Kφ . Anisotropic h and p refinement for conforming FEM in 3D – p.11/48 Assembly using T Matrices Assembling: l = l(Φ) = l X K̃ K̃ T> φ K̃ = X K̃ K̃ T> l(φ ) K̃ = X T> l K̃ K̃ K̃ Anisotropic h and p refinement for conforming FEM in 3D – p.12/48 Assembly using T Matrices Assembling: l = l(Φ) = l X K̃ T> φ K̃ K̃ A = a(Φ, Φ) = X = X K̃ T> l(φ ) K̃ = K̃ K̃ K T> a(φ , φ )T K K̃ K,K̃ X T> l K̃ K̃ K̃ = X T> A T K̃ K̃K K K,K̃ Note: AK̃K = 0 in standard FEM for K̃ 6= K. Anisotropic h and p refinement for conforming FEM in 3D – p.12/48 Example: Regular Mesh Two elements with three local shape functions each and four global basis functions. 3 3 3 2 4 1 1 1 TI = 2 0 3 0 J 2 3 4 0 0 0 1 0 0 0 1 0 I 1 1 2 1 2 Anisotropic h and p refinement for conforming FEM in 3D – p.13/48 Example: Regular Mesh Two elements with three local shape functions each and four global basis functions. 3 3 3 2 4 1 1 TI = 2 0 3 0 J 1 I 1 1 1 2 1 2 2 3 4 0 0 0 1 0 0 0 1 0 2 3 1 0 1 0 TJ = 2 0 0 0 3 0 0 1 4 0 1 0 Anisotropic h and p refinement for conforming FEM in 3D – p.13/48 Example: Irregular Mesh Three elements with three local shape functions each and four global basis functions. The hanging node is marked with ◦. 3 3 3 2 K 4 2 TL 1 3 L 1 1 0 = 2 0 3 0 2 3 1 0 1/2 0 0 1/2 4 0 1 0 I 1 1 2 1 2 Anisotropic h and p refinement for conforming FEM in 3D – p.14/48 Example: Irregular Mesh Three elements with three local shape functions each and four global basis functions. The hanging node is marked with ◦. 3 3 3 2 K 4 2 TL 1 3 L 1 1 1 0 = 2 0 3 0 1 I 1 2 TK 1 2 1 0 = 2 0 3 0 2 3 1 0 1/2 0 0 1/2 2 3 1/2 1/2 0 0 0 1 4 0 1 0 4 0 1 0 ⇒ continuous basis functions. Anisotropic h and p refinement for conforming FEM in 3D – p.14/48 Generation of T Matrices • Regular Mesh: Counting and assigning indices with respect to topological entities such as vertices, edges and faces. Explained in detail later. Anisotropic h and p refinement for conforming FEM in 3D – p.15/48 Generation of T Matrices • Regular Mesh: Counting and assigning indices with respect to topological entities such as vertices, edges and faces. Explained in detail later. • Irregular Mesh: Irregularity due to a refinement of an initially regular mesh. OK: Explanation follows. , not OK: Anisotropic h and p refinement for conforming FEM in 3D – p.15/48 T Matrices for Irregular Meshes Irregularity due to a refinement of an initially regular mesh. M refine M0 Mesh Basis fcts. B = Brepl ∪ Bkeep −→ B 0 = Bins ∪ Bkeep Anisotropic h and p refinement for conforming FEM in 3D – p.16/48 T Matrices for Irregular Meshes Irregularity due to a refinement of an initially regular mesh. M refine M0 Mesh Basis fcts. B = Brepl ∪ Bkeep −→ B 0 = Bins ∪ Bkeep Brepl : basis fcts. which can be solely described by elements of M0 \M Bins : basis fcts. generated by regular parts of M0 \M Anisotropic h and p refinement for conforming FEM in 3D – p.16/48 T Matrices for Irregular Meshes Irregularity due to a refinement of an initially regular mesh. M refine M0 Mesh Basis fcts. B = Brepl ∪ Bkeep −→ B 0 = Bins ∪ Bkeep Brepl : basis fcts. which can be solely described by elements of M0 \M Bins : basis fcts. generated by regular parts of M0 \M Anisotropic h and p refinement for conforming FEM in 3D – p.16/48 T Matrices for Irregular Meshes (' (' &% &% $# $# *) *) ,+ ,+ 0/ 0/ 21 21 .- . "! "! Irregularity due to a refinement of an initially regular mesh. M refine M0 Mesh Basis fcts. B = Brepl ∪ Bkeep −→ B 0 = Bins ∪ Bkeep Brepl : basis fcts. which can be solely described by elements of M0 \M Bins : basis fcts. generated by regular parts of M0 \M Every element of B has a column in the T matrix. Generation is • easy for Bins (like regular mesh), • simple for Bkeep : modify column from M by S matrix. Anisotropic h and p refinement for conforming FEM in 3D – p.16/48 S Matrix Definition 2 (S Matrix). Let K 0 ⊂ K be the result of a refinement of element K. The S matrix S K 0 K ∈ RmK 0 ×mK is defined by mK 0 K φj K0 = X [S K0K K0 ]lj φl l=1 as vectors: φK j K0 φK K0 = K0 > SK0K φ is represented as a linear combination of the shape functions n 0 om K 0 φK of K 0 . l l=1 Anisotropic h and p refinement for conforming FEM in 3D – p.17/48 Application of S Matrix Proposition 1. Let K 0 ⊂ K be the result of a refinement of an element K. Then, the T matrix of K 0 can be computed as ins + T T K 0 = S K 0 K T keep K0 K where T keep denotes the T matrix of element K (with columns not K related to functions in Bkeep set to zero) and T ins K 0 the T matrix for functions in Bins with respect to K 0 . Proposition 2. Let K̂ 0 ⊂ K̂ be the result of a refinement of the reference element K̂ with H : K̂ → K̂ 0 the subdivision map. The element maps are FK : K̂ → K and FK 0 : K̂ → K 0 and FK 0 ◦ H −1 = FK holds. Then, S K̂ 0 K̂ = S K 0 K . Anisotropic h and p refinement for conforming FEM in 3D – p.18/48 Meshes Anisotropic h and p refinement for conforming FEM in 3D – p.19/48 Meshes Anisotropic h and p refinement for conforming FEM in 3D – p.19/48 Meshes Anisotropic h and p refinement for conforming FEM in 3D – p.19/48 S Matrix in Dimension d = 1 Subdividing Jˆ = (0, 1) in Jˆ0 = (0, 1/2) and Jˆ? = (1/2, 1) with the reference element shape functions j=1 1 − ξ j=2 Nj (ξ) = ξ 1,1 ξ(1 − ξ)Pj−3 (2ξ − 1) j = 3, . . . , J yields (solving a linear system) for J = 4: 1 1/2 S Jˆ0 Jˆ = 0 0 0 1/2 0 0 1 0 0 /2 1/4 0 and S ˆ? ˆ = 0 J J 0 1/4 −3/4 1/8 0 0 1/2 1/4 1 0 0 0 1/4 0 0 0 . 3/4 1/8 Hierarchic shape functions ⇒ hierarchic S matrices. Anisotropic h and p refinement for conforming FEM in 3D – p.20/48 S Matrices: Tensor Product in 2D • d > 1 with hexahedral meshes ⇒ S matrices are built from tensor products of 1D S matrices. Anisotropic h and p refinement for conforming FEM in 3D – p.21/48 S Matrices: Tensor Product in 2D • d > 1 with hexahedral meshes ⇒ S matrices are built from tensor products of 1D S matrices. • In 2D: Ni,j = Ni ⊗ Nj , the four bilinear shape functions are: N1,2 (ξ) = N1 (ξ1 ) · N2 (ξ2 ) N2,2 (ξ) = N2 (ξ1 ) · N2 (ξ2 ) N1,1 (ξ) = N1 (ξ1 ) · N1 (ξ2 ) N2,1 (ξ) = N2 (ξ1 ) · N1 (ξ2 ) Anisotropic h and p refinement for conforming FEM in 3D – p.21/48 S Matrices: Tensor Product in 2D • d > 1 with hexahedral meshes ⇒ S matrices are built from tensor products of 1D S matrices. • In 2D: Ni,j = Ni ⊗ Nj , the four bilinear shape functions are: N1,2 (ξ) = N1 (ξ1 ) · N2 (ξ2 ) N2,2 (ξ) = N2 (ξ1 ) · N2 (ξ2 ) N1,1 (ξ) = N1 (ξ1 ) · N1 (ξ2 ) N2,1 (ξ) = N2 (ξ1 ) · N1 (ξ2 ) PSfrag replacements • Consider the subdivisions: K̂ 0 K̂ ? K̂ ? K̂ d K̂ 0 K̂ a K̂ b K̂ c Anisotropic h and p refinement for conforming FEM in 3D – p.21/48 S Matrices: Tensor Product in 2D II Subdivision map of left variant: H : K̂ → K̂ 0 , ξ 7→ ξ1 /2 . S matrix S K̂ 0 K̂ ξ2 is defined by: Ni,j |K̂ 0 = X k,l S K̂ 0 K̂ −1 N ◦ H . k,l (k,l),(i,j) PSfrag replacements K̂ 0 K̂ ? Anisotropic h and p refinement for conforming FEM in 3D – p.22/48 S Matrices: Tensor Product in 2D II Subdivision map of left variant: H : K̂ → K̂ 0 , ξ 7→ ξ1 /2 . S matrix S K̂ 0 K̂ ξ2 is defined by: Ni,j |K̂ 0 = X S K̂ 0 K̂ k,l −1 N ◦ H . k,l (k,l),(i,j) PSfrag replacements K̂ 0 K̂ ? Tensor product shape functions: (Ni ⊗ Nj )|K̂ 0 = X k,l S K̂ 0 K̂ −1 (N ⊗ N ) ◦ H . k l (k,l),(i,j) (1) Anisotropic h and p refinement for conforming FEM in 3D – p.22/48 S Matrices: Tensor Product in 2D III S matrices for 1D reference element shape fcts. used in (1): X Ni |Jˆ0 = S Jˆ0 Jˆ mi Nm ◦ G−1 for the ξ1 part and m Nj = X [E]nj Nn for the ξ2 part, n where G : ξ 7→ ξ/2. Anisotropic h and p refinement for conforming FEM in 3D – p.23/48 S Matrices: Tensor Product in 2D III S matrices for 1D reference element shape fcts. used in (1): X Ni |Jˆ0 = S Jˆ0 Jˆ mi Nm ◦ G−1 for the ξ1 part and m Nj = X for the ξ2 part, [E]nj Nn n where G : ξ 7→ ξ/2. Plugging into the left hand side of (1) yields: (Ni ⊗ Nj )|K̂ 0 = Ni |Jˆ0 X ⊗ Nj = S Jˆ0 Jˆ mi Nm ◦ G−1 ⊗ [E]nj Nn m,n = X m,n S Jˆ0 Jˆ −1 · [E] N ◦ G ⊗ Nn . m nj mi Anisotropic h and p refinement for conforming FEM in 3D – p.23/48 S Matrices: Tensor Product in 2D IV Comparing with the right hand side of (1): X S Jˆ0 Jˆ mi · [E]nj Nm ◦ G−1 ⊗ Nn m,n = X k,l S K̂ 0 K̂ −1 N ◦ G ⊗ Nl . k (k,l),(i,j) Anisotropic h and p refinement for conforming FEM in 3D – p.24/48 S Matrices: Tensor Product in 2D IV Comparing with the right hand side of (1): X S Jˆ0 Jˆ mi · [E]nj Nm ◦ G−1 ⊗ Nn m,n = X k,l S K̂ 0 K̂ −1 N ◦ G ⊗ Nl . k (k,l),(i,j) Therefore for the vertical subdivision: S K̂ 0 K̂ = S Jˆ0 Jˆ ⊗ E S K̂ ? K̂ = S Jˆ? Jˆ ⊗ E for the left quad K̂ 0 , PSfrag replacements for the right quad K̂ ? . K̂ 0 K̂ ? Anisotropic h and p refinement for conforming FEM in 3D – p.24/48 S Matrices: Tensor Product in 2D V Horizontal subdivision: S K̂ 0 K̂ = E ⊗ S Jˆ0 Jˆ S K̂ ? K̂ = E ⊗ S Jˆ? Jˆ for the bottom quad K̂ 0 , PSfrag replacements for the top quad K̂ ? . K̂ ? K̂ 0 Anisotropic h and p refinement for conforming FEM in 3D – p.25/48 S Matrices: Tensor Product in 2D V Horizontal subdivision: S K̂ 0 K̂ = E ⊗ S Jˆ0 Jˆ S K̂ ? K̂ = E ⊗ S Jˆ? Jˆ for the bottom quad K̂ 0 , PSfrag replacements ? for the topPSfrag quad K̂replacements . K̂ ? 0 K̂ 0 K̂ K̂ ? Subdivision into four quads: • subdivide K̂ horizontally into two children • subdivide upper and lower child vertically into K̂ d and K̂ c and K̂ a and K̂ b resp. S K̂ d K̂ = S Jˆ0 Jˆ ⊗ E · E ⊗ S Jˆ? Jˆ S K̂ a K̂ = S Jˆ0 Jˆ ⊗ E · E ⊗ S Jˆ0 Jˆ K̂ d K̂ c K̂ a K̂ b S K̂ c K̂ = S Jˆ? Jˆ ⊗ E · E ⊗ S Jˆ? Jˆ S K̂ b K̂ = S Jˆ? Jˆ ⊗ E · E ⊗ S Jˆ0 Jˆ Anisotropic h and p refinement for conforming FEM in 3D – p.25/48 S Matrices: Tensor-Product in 3D Same idea as in 2D, just of this form: S K̂ 0 K̂ = Y (A ⊗ B ⊗ C) in each of the factors, one of A, B or C is an 1D S matrix. Depending on the factors, 7 subdivisions are possible: Concepts: allow arbitrary number and combination of these 7 subdivisions in 3D. Anisotropic h and p refinement for conforming FEM in 3D – p.26/48 Overview • Introduction • Anisotropic h refinements • S and T matrices • Assembly of Supports • Anisotropic p refinements • hp Meshes • Perspectives Anisotropic h and p refinement for conforming FEM in 3D – p.27/48 Anisotropic and Conforming Main point: find the cells (either coarse or fine) which belong to the support of a certain basis function. Anisotropic h and p refinement for conforming FEM in 3D – p.28/48 Anisotropic and Conforming Main point: find the cells (either coarse or fine) which belong to the support of a certain basis function. Anisotropic h and p refinement for conforming FEM in 3D – p.28/48 Anisotropic and Conforming Main point: find the cells (either coarse or fine) which belong to the support of a certain basis function. Anisotropic h and p refinement for conforming FEM in 3D – p.28/48 Anisotropic and Conforming Main point: find the cells (either coarse or fine) which belong to the support of a certain basis function. Anisotropic h and p refinement for conforming FEM in 3D – p.28/48 Anisotropic and Conforming Main point: find the cells (either coarse or fine) which belong to the support of a certain basis function. Anisotropic h and p refinement for conforming FEM in 3D – p.28/48 Anisotropic and Conforming Main point: find the cells (either coarse or fine) which belong to the support of a certain basis function. Anisotropic h and p refinement for conforming FEM in 3D – p.28/48 Anisotropic and Conforming II acements • Can easily be treated since all edges are broken Anisotropic h and p refinement for conforming FEM in 3D – p.29/48 Anisotropic and Conforming II acements • Can easily be treated since all edges are broken • “Level of refinement” on each cell is enough to handle hanging nodes Anisotropic h and p refinement for conforming FEM in 3D – p.29/48 Anisotropic and Conforming II acements • Can easily be treated since all edges are broken • “Level of refinement” on each cell is enough to handle hanging nodes • More complicated as not all edges are broken acements PSfrag replacements Anisotropic h and p refinement for conforming FEM in 3D – p.29/48 Anisotropic and Conforming II acements acements PSfrag replacements • Can easily be treated since all edges are broken • “Level of refinement” on each cell is enough to handle hanging nodes • More complicated as not all edges are broken • “Level of refinement” (also a vector valued level) is not enough Anisotropic h and p refinement for conforming FEM in 3D – p.29/48 Anisotropic and Conforming II acements acements PSfrag replacements • Can easily be treated since all edges are broken • “Level of refinement” on each cell is enough to handle hanging nodes • More complicated as not all edges are broken • “Level of refinement” (also a vector valued level) is not enough PSfrag replacements • conforming should be seen as Anisotropic h and p refinement for conforming FEM in 3D – p.29/48 Condition for Continuity • In order to have continuous global basis functions Φi , the unisolvent sets on the interfaces in the support of Φi have to match. Anisotropic h and p refinement for conforming FEM in 3D – p.30/48 Condition for Continuity • In order to have continuous global basis functions Φi , the unisolvent sets on the interfaces in the support of Φi have to match. • Unisolvent set for Q1 in a quad / hex are the corners: ⇒ matching edges which coincide in a vertex is sufficient Anisotropic h and p refinement for conforming FEM in 3D – p.30/48 Condition for Continuity • In order to have continuous global basis functions Φi , the unisolvent sets on the interfaces in the support of Φi have to match. • Unisolvent set for Q1 in a quad / hex are the corners: ⇒ matching edges which coincide in a vertex is sufficient • Unisolvent set for Qp are • additional p − 1 points on every edge • additional (p − 1)2 points on every face • additional (p − 1)3 points in the interior ⇒ matching faces which coincide in an edge is sufficient for continuous edge modes Anisotropic h and p refinement for conforming FEM in 3D – p.30/48 Algorithm for Continuity (Vertex) • In every cell of the finest mesh, register all edges and cells in their vertices. Anisotropic h and p refinement for conforming FEM in 3D – p.31/48 Algorithm for Continuity (Vertex) • In every cell of the finest mesh, register all edges and cells in their vertices. • For every vertex, while something changed in the last loop: • Check if some of the edges of the vertex have a relationship (ancestor / descendant). Anisotropic h and p refinement for conforming FEM in 3D – p.31/48 Algorithm for Continuity (Vertex) • In every cell of the finest mesh, register all edges and cells in their vertices. • For every vertex, while something changed in the last loop: • Check if some of the edges of the vertex have a relationship (ancestor / descendant). • If two edges are related, exchange the smaller cell in the list of the vertex by the cell matching the larger cell. • Delete the list of edges and rebuild it from the list of cells. Anisotropic h and p refinement for conforming FEM in 3D – p.31/48 Overview • Introduction • Anisotropic h refinements • S and T matrices • Assembly of Supports • Anisotropic p refinements • hp Meshes • Perspectives Anisotropic h and p refinement for conforming FEM in 3D – p.32/48 Anisotropic p Why anisotropic p? Necessary for thin plates, shells, films. • Every edge has p, every face has p = (p0 , p1 ), every cell has p = (p0 , p1 , p2 ). They can differ in a cell! • The minimum rule for edges and faces is enforced. PSfrag replacements K K0 The common edge of K and K 0 has p = min {pK , pK 0 }. • Higher p on an edge than neighbouring elements prescribe is possible! Anisotropic h and p refinement for conforming FEM in 3D – p.33/48 p Enrichment on Edges • p? ≥ 2 for the basis functions Φi on the marked edge must be possible to achieve exponential convergence. 3 PSfrag replacements 2 1 3 2 2 3 Analogly for edge and faces in 3D. Anisotropic h and p refinement for conforming FEM in 3D – p.34/48 p Enrichment on Edges • p? ≥ 2 for the basis functions Φi on the marked edge must be possible to achieve exponential convergence. • The basis functions on the red edges contribute to Φi ⇒ p ≥ p? must be possible and enforced. 3 PSfrag replacements 2 1 3 2 2 3 Analogly for edge and faces in 3D. Anisotropic h and p refinement for conforming FEM in 3D – p.34/48 Trunk Spaces • Tensor Product Space: p3 shape functions, internal shape functions have indices i = 2, . . . , pξ , j = 2, . . . , pη and k = 2, . . . , pζ • Trunk Space: O(p2 ) shape functions, internal shape functions have indices i = 2, . . . , pξ − 4, j = 2, . . . , pη − 4 and k = 2, . . . , pζ − 4 where i + j + k = 6, . . . , max {pξ , pη , pζ }, [2]. [2] Szabó and Babuška, “Finite Element Analysis”, John Wiley & Sons, 1991. Anisotropic h and p refinement for conforming FEM in 3D – p.35/48 Overview • Introduction • Anisotropic h refinements • S and T matrices • Assembly of Supports • Anisotropic p refinements • hp Meshes • Perspectives Anisotropic h and p refinement for conforming FEM in 3D – p.36/48 Some Basis Functions Anisotropic h and p refinement for conforming FEM in 3D – p.37/48 Some Basis Functions Anisotropic h and p refinement for conforming FEM in 3D – p.37/48 Some Basis Functions Anisotropic h and p refinement for conforming FEM in 3D – p.37/48 Some Basis Functions Anisotropic h and p refinement for conforming FEM in 3D – p.37/48 Some Basis Functions Anisotropic h and p refinement for conforming FEM in 3D – p.37/48 Exponential Convergence in Pseudo-3D Edge type singularity. relative energy error 0.1 0.01 0.001 0.0001 1e-05 2 4 6 8 10 12 14 16 18 dof^1/3 −∆u + u = f in Ω = (−1, 1) × (0, 1) × (0, 1/2) √ u(r, φ, z) = r sin(φ/2)z(1 − z) u=0 in Ω on {z = 0} ⊂ ∂Ω and on {y = 0} ∩ {x ≥ 0} ⊂ ∂Ω Anisotropic h and p refinement for conforming FEM in 3D – p.38/48 Exponential Convergence in 3D 0.1 relative energy error 0.01 0.001 0.0001 1e-05 1e-06 1e-07 2 3 4 5 6 7 dof^1/4 8 9 10 11 Vertex type singularity. 1000 100 time [s] 10 −∆u + u = f in Ω = (0, 1)3 √ u(r, θ, φ) = r sin θ sin φ 1 0.1 mesh solve integration 0.01 0.001 10 100 1000 dof 10000 100000 u=0 in Ω on {y = 0} ⊂ ∂Ω Anisotropic h and p refinement for conforming FEM in 3D – p.39/48 Exp. Conv. in 3D, Edge Mesh 0.1 relative energy error 0.01 0.001 0.0001 1e-05 1e-06 1 2 3 4 5 6 7 8 dof^1/5 Vertex type singularity. −∆u + u = f in Ω = (0, 1)3 √ u(r, θ, φ) = r sin θ sin φ u=0 in Ω on {y = 0} ⊂ ∂Ω Anisotropic h and p refinement for conforming FEM in 3D – p.40/48 Maxwell EVP Find Eigenvalues λ = ω 2 such that ∃(E, H) 6= 0 satisfying curl E − iωµH = 0 and curl H + iωεE = 0 in Ω, with perfect conductor b.c. E × n = 0, H · n = 0 on ∂Ω. E ∈ H0 (curl; Ω). Anisotropic h and p refinement for conforming FEM in 3D – p.41/48 Maxwell EVP Find Eigenvalues λ = ω 2 such that ∃(E, H) 6= 0 satisfying and curl E − iωµH = 0 curl H + iωεE = 0 in Ω, with perfect conductor b.c. E × n = 0, H · n = 0 on ∂Ω. E ∈ H0 (curl; Ω). “Electric” variational form: Find the frequencies ω > 0 such that ∃E ∈ H0 (curl; Ω) \ {0} with Z 1/µ curl E Ω · curl F = ω 2 Z Ω εE · F and div εE = 0 ∀F ∈ H0 (curl; Ω). Anisotropic h and p refinement for conforming FEM in 3D – p.41/48 Weighted Regularization for Maxwell EVP Find the frequencies ω > 0 such that ∃u ∈ XN with Z Ω curl u · curl v + hu, viY = ω 2 Z Ω u·v ∀v ∈ XN := {u ∈ H0 (curl; Ω) : div u ∈ L2 (Ω)} Anisotropic h and p refinement for conforming FEM in 3D – p.42/48 Weighted Regularization for Maxwell EVP Find the frequencies ω > 0 such that ∃u ∈ XN with Z Ω curl u · curl v + hu, viY = ω 2 Z Ω u·v ∀v ∈ XN := {u ∈ H0 (curl; Ω) : div u ∈ L2 (Ω)} Z hu, viY = s ρ(x) div u div v Ω Properly chosen weight ρ(x) and s ∈ R+ . Anisotropic h and p refinement for conforming FEM in 3D – p.42/48 Weighted Regularization for Maxwell EVP Find the frequencies ω > 0 such that ∃u ∈ XN with Z Ω curl u · curl v + hu, viY = ω 2 Z Ω u·v ∀v ∈ XN := {u ∈ H0 (curl; Ω) : div u ∈ L2 (Ω)} Z hu, viY = s ρ(x) div u div v Ω Properly chosen weight ρ(x) and s ∈ R+ . Good choice: ρ(x) = r α where r is the distance to a reentrant corner and α ≥ 0 in a range depending on the angle of the reentrant corner. [3] Martin Costabel and Monique Dauge, “Weighted regularization of Maxwell equations in polyhedral domains”, Numer. Math. 93 (2), pp. 239–277 (2002). Anisotropic h and p refinement for conforming FEM in 3D – p.42/48 EVP in the Thick L Shaped Domain 0.1 0.01 relativ error in eigenvalue 0.001 0.0001 1e-05 1e-06 1e-07 1e-08 1e-09 1e-10 ev 1 ev 2 ev 3 ev 4 ev 5 ev 6 ev 7 ev 8 ev 9 5 10 15 20 25 dof^1/3 24 σ = 0.15 22 eigenvalue 20 α=2 18 16 14 12 10 8 0 20 40 60 s 80 100 Anisotropic h and p refinement for conforming FEM in 3D – p.43/48 EVP in the Thick L Shaped Domain 0.1 0.01 relativ error in eigenvalue 0.001 0.0001 1e-05 1e-06 1e-07 1e-08 1e-09 1e-10 ev 1 ev 2 ev 3 ev 4 ev 5 ev 6 ev 7 ev 8 ev 9 5 10 15 20 25 30 dof^1/3 24 σ = 0.5 22 eigenvalue 20 α=2 18 16 14 12 10 8 30 35 40 45 s 50 55 60 Anisotropic h and p refinement for conforming FEM in 3D – p.44/48 Perspectives • Maxwell EVP in the Fichera corner • Anisotropic error estimation, anistropic regularity estimation • Improved mesh handling • Iterative multilevel domain decompositioning solvers: Toselli (Zürich), Schöberl (Linz) • Stochastic Eigenvalue Problems (e.g. stochastic ε and µ for Maxwell) Anisotropic h and p refinement for conforming FEM in 3D – p.45/48 Perspectives • Maxwell EVP in the Fichera corner • Anisotropic error estimation, anistropic regularity estimation • Improved mesh handling • Iterative multilevel domain decompositioning solvers: Toselli (Zürich), Schöberl (Linz) • Stochastic Eigenvalue Problems (e.g. stochastic ε and µ for Maxwell) Anisotropic h and p refinement for conforming FEM in 3D – p.45/48 Hanging Nodes in Isotropic Meshes • Traverse all cells on locally finest level: mark every vertex / edge / face being used. • On next (hierarchical) traversal of the mesh: • Add dofs which are marked to be on the current level to the list L of local dofs. Mark dof as registered. • If cell is on finest level L → T matrix • Otherwise S · L is added to L of child (next deeper level) Anisotropic h and p refinement for conforming FEM in 3D – p.46/48 Mortar • Give up C 0 , introduce Lagrange multiplier (the mortar) • −∆u = f in Ω with hom. Dirichlet bc. using mortar method leads to A Λ f u · = , ie. λ 0 Λ> 0 SPD PDE 6⇒ SPD matrix ⇒ conjugate gradients not applicable ⇒ no standard domain decompositioning solvers ⇒ inf-sup condition needed • The inf-sup cond. is OK in 2D, 3D for shape regular meshes. Not OK for hp FEM, existing proofs only for uniform meshes. • Analogly for Discontinous Galerkin in 3D: Stability of hp DG on geometric meshes is not clear. First results by Schwab, Toselli, Schötzau for Stokes (not Mortar). Anisotropic h and p refinement for conforming FEM in 3D – p.47/48 Shape Functions The reference element shape functions on (−1, 1) of order p [4]: 1−ξ 2 i=0 1+ξ 1,1 Ni (ξ) = 1−ξ 2 2 Pi−1 (ξ) 1 ≤ i ≤ p − 1 1+ξ i=p 2 1,1 (ξ) are integrated Legendre Polynomials: Li (ξ) = Pi0,0 (ξ) and Pi−1 Z ξ −1 α (1 − x) (1 + x) ⇒ Z β ξ −1 Piα,β (x) dx −1 α+1,β+1 (1 − ξ)α+1 (1 + ξ)β+1 Pi−1 = (ξ) 2i Pi0,0 (x) dx = −1 1,1 (ξ) (1 − ξ)(1 + ξ)Pi−1 2i [4] Karniadakis and Sherwin, “Spectral/hp Element Methods for CFD”, Oxford University Press, 1999. Anisotropic h and p refinement for conforming FEM in 3D – p.48/48 Shape Functions The reference element shape functions on (−1, 1) of order p [4]: 1−ξ 2 i=0 1+ξ 1,1 Ni (ξ) = 1−ξ 2 2 Pi−1 (ξ) 1 ≤ i ≤ p − 1 1+ξ i=p 2 1 1 1 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 0 0 0 -0.2 -0.2 -0.2 -0.4 -0.4 -1 -0.5 0 0.5 1 -1 -0.5 x 0 0.5 1 -0.4 1 1 1 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 0 0 0 -0.2 -0.2 -0.2 -1 -0.5 0 x -0.5 0.5 1 -0.4 -1 -0.5 0 x 0 0.5 1 0.5 1 x 0.8 -0.4 -1 x 0.5 1 -0.4 -1 -0.5 0 x Anisotropic h and p refinement for conforming FEM in 3D – p.48/48