fem.gmsh.snap_toward_patches
fem.gmsh.snap_toward_patches(scene, fields, points, rows, *, bar, steps=8)
Project boundary nodes onto the scene’s zero set where that helps ownership.
The public arity-1 :func:~cadjoint.fem.motion.project_points, clamped at bar; a node keeps the projected position only where it then clears the bar on more patches than before, or on as many at a lower residual. See the module docstring for why and for the numbers.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| scene | Any | The field to project onto (a callable). | required |
| fields | FieldTable | The patch table the ownership test will use. | required |
| points | np.ndarray | All node positions, (n, 3). |
required |
| rows | np.ndarray | The boundary rows to consider. | required |
| bar | float | The residual bar, which is also the displacement clamp. | required |
| steps | int | Newton iterations. | 8 |
Returns
| Name | Type | Description |
|---|---|---|
| tuple[np.ndarray, int] | (points, moved) — a copy with the accepted rows replaced, and how many rows were. |