Muscat.Bridges.PacmanBridge module¶
- CheckIntegrity(GUI: bool = False) str[source]¶
Check Pacman bridge helpers using the actual Pacman package.
- GetFieldTransferPacmanFE(inputField: FEField, targetPoints: ArrayLike, method: str | None = None, elementFilter: FilterLike | None = None) tuple[ndarray, ndarray][source]¶
- GetFieldTransferPacmanFE(inputMesh: Mesh, targetPoints: ArrayLike, method: str | None = None, elementFilter: FilterLike | None = None) tuple[dict[str, ndarray], ndarray]
Transfer a finite-element field to target points using Pacman.
- Parameters:
inputField (FEField, optional) – Source finite-element field. A
Meshcan also be passed positionally as the first argument. Provide eitherinputFieldorinputMesh, not both.inputMesh (Mesh, optional) – Source mesh containing one or more nodal fields in
mesh.nodeFields. Nodal fields are packed before transfer and reconstructed by field name in the returned dictionary.targetPoints (ArrayLike) – Target point coordinates.
method (Union[str, None], optional) – Transfer method. Supported values are
"Nearest/Nearest","Interp/Clamp","Interp/Nearest","Interp/ZeroFill"and"Interp/Extrap".Noneselects"Interp/Clamp".elementFilter (FilterLike, optional) – Filter to select elements from the source mesh. By default, all elements with the highest dimensionality are selected.
- Returns:
Interpolated values and status. If
inputFieldis provided, values are returned as an array. IfinputMeshis provided, values are returned as a dictionary keyed bymesh.nodeFieldsnames. Status can be one of these:0: “Nearest”
1: “Interp”
2: “Extrap”
3: “Clamp”
4: “ZeroFill”
- Return type:
tuple[np.ndarray | dict[str, np.ndarray], np.ndarray]
- GetFieldTransferPacmanMLS(inputField: FEField | None = None, inputMesh: Mesh | None = None, targetPoints: ArrayLike | None = None) ndarray | dict[str, ndarray][source]¶
Transfer a field to target points using Pacman’s MLS interpolation.
- Parameters:
- Returns:
Interpolated target values. Mesh input returns a dictionary keyed by
mesh.nodeFieldsnames.- Return type:
np.ndarray | dict[str, np.ndarray]
- GetFieldTransferPacmanRBF(inputField: FEField | None = None, inputMesh: Mesh | None = None, targetPoints: ArrayLike | None = None, method: str = 'WENDLANDC2') ndarray | dict[str, ndarray][source]¶
Transfer scalar nodal values using Pacman’s RBF interpolation.
- GetPacmanExecSpace() int[source]¶
Return the default Pacman execution space.
The first available execution space is selected following the order CUDA, HIP, OPENMP and SERIAL. The selected name is cached for subsequent calls.
- Returns:
Pacman execution-space identifier.
- Return type:
int
- Raises:
RuntimeError – If no supported Pacman execution space is available.
- MuscatElementTypeToPacman(cellTypes: ArrayLike, inplace: bool = False) ndarray[source]¶
Convert Muscat element type identifiers to Pacman identifiers.
- Parameters:
cellTypes (ArrayLike) – Array of Muscat element type identifier (values).
inplace (bool, optional) – If
True, overwritecellTypeswith the converted Pacman types. Otherwise, return a converted copy. By default False.
- Returns:
Array containing the matching Pacman cell type identifiers.
- Return type:
np.ndarray