dragonfly_sim.utils.meshwarping_utils

Functions

find_local_surface_nodes(→ numpy.ndarray)

Return local geometry indices of owned surface nodes (ghosts excluded).

inner_bdry_function_from_corner_list(ffd_block_corner_list)

Build an inner-boundary indicator function out of an FFD block corner list.

Module Contents

dragonfly_sim.utils.meshwarping_utils.find_local_surface_nodes(msh, facet_tags, surface_tag: int) → numpy.ndarray

Return local geometry indices of owned surface nodes (ghosts excluded).

Parameters:
mshdolfinx.mesh.Mesh
facet_tagsdolfinx.mesh.MeshTags | None
surface_tagint
Returns:
np.ndarray, int64, shape (M_local,)
dragonfly_sim.utils.meshwarping_utils.inner_bdry_function_from_corner_list(ffd_block_corner_list, overset_margin=0.0001, rel_tol=1e-06)

Build an inner-boundary indicator function out of an FFD block corner list.

ffd_block_corner_list carries the same information an inner_bdry_function encodes: the inner boundary facets are the ones contained in the FFD block, so the block itself can serve as the containment test. The returned closure has the signature Mesh expects: it takes x of shape (n_dimensions, n_points) and returns a boolean mask of the points inside the block.

The block is reconstructed exactly as in shape_parameterization.ffd_corners_from_corner_list – two surfaces offset along a single connecting direction, linearly interpolated in between – so a swept or tapered block is tested against its actual tapered extent rather than its bounding box.

overset_margin matches the one the control point construction applies, so the test region is the FFD block itself rather than the bare corner list; rel_tol widens it further by that fraction of the block extent in each direction, so that geometry sitting exactly on the block boundary still counts as inside.

NOTE the test is purely geometric: any OTHER boundary passing through the FFD block (e.g. the symmetry plane at the root of a wing) is flagged as well, whereas a hand-written inner_bdry_function can exclude it by construction.