Muscat.ImplicitGeometry.ImplicitGeometryTools module¶
- CutMeshIsoZero(mesh: Mesh, isoZeroFunction: Callable[[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]] | ndarray, snapTolerance=None, computePointFieldTransferOperator=False) Tuple[Mesh, ndarray] [source]¶
Cut a mesh using the iso zero computed by the function isoZeroFunction. This function works for meshes composed only by Point_1, Bar_2, Triangle_3 and Tetrahedron_4
- 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 in 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 simplex 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