Muscat.ImplicitGeometry.ImplicitGeometryTools module

CheckIntegrity(GUI: bool = False)[source]
ComputeDistanceToIsoZero(mesh, phi, targetPoints, method='Interp/Extrap')[source]
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

DistanceToSurface(mesh, surfMesh, out=None, method='Interp/Clamp')[source]
class IGToMesh(imesh=None, phi=None)[source]

Bases: object

ComputeInterfaceMesh()[source]
SetPhi(phi, snapValues=True, snapTol=1e-05)[source]
Redistance(mesh, phi, method='Interp/Extrap')[source]