Muscat.ImplicitGeometry.ImplicitGeometryBase module

CheckIntegrity(GUI: bool = False)[source]
class ImplicitGeometryBase[source]

Bases: object

ApplyInsideOut(res)[source]
ApplyVector(support, cellCenter=False, dim=None)[source]
GetDistanceToPoint(pos)[source]
GetGradientDistanceToPoint(pos: ndarray, dx: float64 | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None) ndarray[source]

Compute the numerical gradient of the implicit geometry the child classes can overwrite it for a more efficient or exact result.

Parameters:
  • pos (np.ndarray) – the position to evaluate the gradient

  • dx (Optional[MuscatFloat,Arraylike], optional) – the step (per coordinate) to be used to compute the numerical gradient, by default dx is 1e-6

Returns:

a matrix of size (nb point, nb coordinates) with the gradient for each coordinate (d_distance/dx)

Return type:

np.ndarray

class ImplicitGeometryCachedData(internalImplicitGeometry)[source]

Bases: ImplicitGeometryBase

ApplyVector(support, cellCenter=False, dim=None)[source]
GetDistanceToPoint(pos)[source]
class ImplicitGeometryDelayedInit(name, ops={})[source]

Bases: ImplicitGeometryBase

ApplyVector(support, cellCenter=False, dim=None)[source]
GetDistanceToPoint(pos)[source]
Init()[source]
TryToCreate(name, ops=None)[source]
dcos(x)[source]
dsin(x)[source]
smoothmax(a, b, k=1)[source]
smoothmin(a, b, k=1)[source]