Laplacian smoothing¶
smooth.laplace evens a mesh by many cheap passes. One pass, step by step, computed by the smoother itself:
One pass on a 3 × 3 patch with w = 0.7 (the default is 0.97; a smaller w is drawn so the moves show). The bottom and sides are frozen, the two middle top vertices are on the arc (red). The result is identical to laplace(passes=1, w=0.7). The followed vertex moves 0.15 of an edge in (b); the snap moves are smaller, 0.029 and 0.024 of an edge in the insets.
Key points¶
A pass is shrink, average, snap, with no neighbour list: a vertex sees only the shrunk corners of its own quads.
Boundary vertices slide along the boundary, in three layers (Boundary settings).
A pass that hurts is refused: one that adds an inverted quad, or lowers the minimum scaled Jacobian by more than
max_sj_drop, is rolled back and the stage stops.
The pass¶
The bilinear map of quad \(q\) is \(x_q(r,s)=\sum_j N_j(r,s)\,x_j\) with \(N_j=\tfrac14(1+r_jr)(1+s_js)\). Step (a) re-reads the four corners at \(\pm w\) instead of \(\pm1\):
Steps (b) and (c), with \(m_v\) the number of quad corners at \(v\), \(P\) the projection onto its target, \(i\) the pass and \(N\) the number of passes:
The last pass is a full snap; a frozen vertex returns to its anchor every pass.
Boundary vertices¶
A boundary vertex has quads on one side only, so a plain average pulls it inward. Three layers keep it on the boundary: source (a boundary side is not shrunk across its normal), movement (under Tangent, the move loses its component normal to the boundary) and constraint (the snap). One vertex under each setting: Boundary settings. The same rules over a whole disk:
free disk, uneven boundary
min J 0.27
area -15.7 % · off circle 1.0 h
area +0.2 % · off circle 0.00058 h
area +0.2 % · off circle 0.0012 h
The comparison’s free disk, its boundary vertices slid along the circle by up to 0.3 of their spacing, after laplace(passes=100, w=0.95). free: boundary="free"; tangent: boundary="tangent"; slide: boundary="slide". Off circle: the largest distance of a boundary vertex from the circle, in mean boundary edges h.
Parameters¶
parameter |
default |
meaning |
|---|---|---|
|
|
number of passes |
|
|
shrink factor per pass, in (0, 1]; 1 is a no-op, smaller moves vertices more |
|
|
reference normals for the readings (default: the input’s winding) |
|
|
boolean mask of quads: only their vertices move (the local variant) |
|
|
a pass that adds an inverted quad or lowers the minimum scaled J by more than this is refused and the stage stops on the last accepted pass |
|
|
inversion-penalty weight, used only for the F/quad reading in the log |
|
|
inversion-penalty threshold on the scaled J, likewise only for the reading |
laplace_local is the same call with elements set to the failing quads.
Limitations¶
No shape objective: it never reads \(\varphi\).
boundary="tangent"holds a boundary only approximately: it keeps the area, but a tangent step can leave a curved boundary slightly (figure above);"slide"or an attached curve holds the shape.boundary="free"shrinks a convex boundary: repeated averaging is diffusion.No repair of folds by design: nothing in a pass aims at validity, and a fold can stay, as on a concave outline (Winslow smoothing).
It relaxes designed grading (Boundary layers and grading).
The update on a regular interior vertex
With four quads around \(v\), the pass is the weighted average
a Laplacian update with self-weight \(\alpha\): repeated passes are repeated diffusion.
References¶
K. Mittal, P. Fischer, “Mesh smoothing for the spectral element method”, J. Sci. Comput. 78(2), 1152-1173 (2019), doi:10.1007/s10915-018-0812-9. Used for: The approach this smoother follows for spectral-element meshes. Cited as a record; its method is not summarised here.
K. Mittal, “Spectral element mesh generation and improvement methods”, M.S. thesis, University of Illinois at Urbana-Champaign (2016), hdl:2142/95509. Used for: With the paper above, the mesh-improvement approach this smoother follows for spectral-element meshes.
D. A. Field, “Laplacian smoothing and Delaunay triangulations”, Communications in Applied Numerical Methods 4(6), 709-712 (1988), doi:10.1002/cnm.1630040603. Used for: Laplacian smoothing relocates vertices to improve an existing mesh; Field studies it on Delaunay triangulations.
P. M. Knupp, “A method for hexahedral mesh shape optimization”, Int. J. Numer. Meth. Engng 58(2), 319-332 (2003), doi:10.1002/nme.768. Used for: Abstract: Laplacian smoothing “fails to guarantee improvement of mesh quality” and can create inverted elements; the paper proposes a shape-improvement method that guarantees untangled elements, with element quality based on the condition number of Jacobian matrices (hexahedra).