Muscat.Containers.ConstantRectilinearMeshTools module

CheckIntegrity(GUI: bool = False) str[source]
CreateConstantRectilinearMesh(dimensions, origin, spacing) Mesh[source]
GetConstantRectilinearPoints(dimensions, origin, spacing) ndarray[source]

Create a point array in the space

Returns:

A 2-dimensional array, the first axis corresponds to the node index, the second axis corresponds to space dimension index.

Return type:

numpy.array

GetMonoIndex(indices: _SupportsArray[dtype] | _NestedSequence[_SupportsArray[dtype]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], dimensions: _SupportsArray[dtype] | _NestedSequence[_SupportsArray[dtype]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) ndarray[source]

return the mono indices from multi indices

Parameters:
  • indices (ArrayLike) – the ij or ijk indices

  • dimensions (ArrayLike) – Number of element in each dimension

Returns:

the mono index

Return type:

np.ndarray

GetMultiIndex(indices: _SupportsArray[dtype] | _NestedSequence[_SupportsArray[dtype]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], dimensions: _SupportsArray[dtype] | _NestedSequence[_SupportsArray[dtype]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) ndarray[source]

Return the multi-index (ijk) from linear indices

Parameters:
  • indices (ArrayLike) – the indices of the nodes to treat

  • dimensions (ArrayLike) – Number of element in each dimension

Returns:

an array with the ijk indices for every point in indices size (nb points, 2 (ij) or 3 (ijk) )

Return type:

np.ndarray

ToUnstructuredMesh(mesh: Mesh, inPlace=True) Mesh[source]