Muscat.ImplicitGeometry.ImplicitGeometryTools module
- CutMeshIsoZero(mesh: Mesh, isoZeroFunction: Callable[[_SupportsArray[dtype] | _NestedSequence[_SupportsArray[dtype]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], _SupportsArray[dtype] | _NestedSequence[_SupportsArray[dtype]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]] | ndarray, snapTolerance=None, computePointFieldTransferOperator=False, createPointElements=True) Tuple[Mesh, ndarray][source]
Cut a mesh using the iso zero computed by the function isoZeroFunction. This function works only for 2D meshes composed only by Point_1, Bar_2 and Triangle_3
- Parameters:
mesh (Mesh) – Mesh to cut by the iso zero
isoZeroFunction (Callable[[ArrayLike], np.ndarray] or ArrayLike) – if Callable Function to compute the level-set field. if arrayLike iso at the nodes
snapTolerance (float,) – tolerance to apply the snap of the izoZero to the nodes is absolute values (zero == no snap, default 1e-6 of the bounding box )
computePointFieldTransferOperator (bool, default False) – if True a transfer operator for a point field is constructed
- Returns:
Mesh – a new mesh cut by the iso zeros value of the isoZeroFunction
pointFieldTransferOperator – None if computePointFieldTransferOperator is False
- Raises:
RuntimeError – if iso zero not found
RuntimeError – if elements of non supported types are present