mymesh.improvement.TangentialLaplacianSmoothing#
- mymesh.improvement.TangentialLaplacianSmoothing(M, options={})[source]#
Performs tangential Laplacian smoothing [OBP03], repositioning each node to the center of its adjacent nodes in the plane tangent to the surface. Primarily for use on surface meshes, interior nodes of a volume mesh will be fixed.
- Parameters:
M (mymesh.mesh) – Mesh object to smooth
options (dict) –
Smoothing options. Available options are:
- methodstr
’simultaneous’ or ‘sequential’. Specifies if smoothing is performed on all nodes at the same time, or one after another. Simultaneous laplacian smoothing will move nodes to the center of their neighbors’ initial positions, while sequential will use the current positions of previously smoothed nodes, by default ‘simultaneous’.
- iterateint or str
Fixed number of iterations to perform, or ‘converge’ to iterate until convergence, by default ‘converge’.
- tolerancefloat
Convergence tolerance. For local Laplacian smoothing, iteration will terminate if the largest movement of a node is less than the specified tolerance, by default 1e-6.
- maxIterint
Maximum number of iterations when iterate=’converge’, By default 10.
- FixedNodesset or array_like
Set of nodes that are held fixed during iteration, by default none are fixed.
- FixFeaturesbool
If true, feature nodes on edges or corners (identified by
DetectFeatures()
) will be held in place, by default False.- FixSurfbool
If true, all nodes on the surface will be held in place and only interior nodes will be smoothed, by default False.
- Returns:
Mnew – Mesh object with the new node locations.
- Return type: