Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Smooth

smooth adjusts the positions of the nodes in a finite element mesh, using either Laplacian or Taubin smoothing. Laplacian smoothing moves each node toward the average position of its neighbors, which reduces high-frequency noise but shrinks the domain. Taubin smoothing is a two-pass extension of Laplacian smoothing — a smoothing pass followed by a re-expansion pass — that avoids that shrinkage. Hierarchical control can restrict which nodes are free to move, so a mesh's exterior or interface geometry can be preserved during smoothing. The element type is detected automatically from the input mesh file; there is no separate hex/tri subcommand to choose. See Smoothing Theory for the full derivations.

automesh smooth --help
Applies smoothing to an existing mesh

Usage: automesh smooth [OPTIONS] --input <FILE> --output <FILE> [COMMAND]

Commands:
  remesh  Applies remeshing to the mesh before output [default mode: uniform]
  help    Print this message or the help of the given subcommand(s)

Options:
  -i, --input <FILE>      Mesh input file (exo | inp | stl | vtu)
  -o, --output <FILE>     Smoothed mesh output file (exo | inp | mesh | stl | vtu)
  -n, --iterations <NUM>  Number of smoothing iterations [default: 20]
  -m, --method <NAME>     Smoothing method (Laplace | Taubin) [default: Taubin]
  -k, --pass-band <FREQ>  Pass-band frequency (for Taubin only) [default: 0.1]
  -s, --scale <SCALE>     Scaling parameter for all smoothing methods [default: 0.6307]
  -b, --hierarchical      Enables hierarchical smoothing
      --metrics <FILE>    Quality metrics output file (csv | npy)
      --log <FILE>        Mirror terminal output to a log file
  -q, --quiet             Pass to quiet the terminal output
  -h, --help              Print help

Smooth Remesh

An optional remesh subcommand can be chained directly onto smoothing, regardless of the input mesh's element type:

automesh smooth remesh --help
Applies remeshing to the mesh before output [default mode: uniform]

Usage: automesh smooth --input <FILE> --output <FILE> remesh [OPTIONS] [COMMAND]

Commands:
  uniform   Uniform target edge length over the whole mesh
  adaptive  Curvature-adaptive target edge length
  help      Print this message or the help of the given subcommand(s)

Options:
      --log <FILE>  Mirror terminal output to a log file
  -q, --quiet       Pass to quiet the terminal output
  -h, --help        Print help

Examples

  • Laplace — a two-element example worked by hand, showing neighborhoods and node positions across iterations of Laplace smoothing.
  • Laplace with Hierarchical Control — the Bracket example, contrasting unrestricted Laplace smoothing with hierarchically-controlled smoothing that preserves prescribed geometry.
  • Taubin — a noised hexahedral sphere mesh, compared directly against Taubin's original paper figure.
  • Python Visualization — the source scripts used to generate the Laplace and hierarchical Laplace figures above.