warp.fem.CellBasedGeometryPartition#
- class warp.fem.CellBasedGeometryPartition(geometry, device=None)[source]#
Geometry partition based on a subset of cells. Interior, boundary and frontier sides are automatically categorized.
- Parameters:
geometry (Geometry)
Methods
__init__(geometry[, device])Return the number of boundary sides in the partition.
cell_arg_value(device)cell_count()Number of cells that are 'owned' by this partition
cell_index(args, partition_cell_index)Index in the geometry of a partition cell
compute_side_indices_from_cells(...[, ...])Compute partition, boundary, and frontier side indices from a cell mask.
fill_cell_arg(args, device)Fill the arguments to be passed to cell-related device functions.
fill_side_arg(args, device)Fill the arguments to be passed to side-related device functions.
Return the number of frontier sides in the partition.
partition_cell_index(args, cell_index)Index of a geometry cell in the partition (or
NULL_ELEMENT_INDEX)side_arg_value(device)Return the number of sides in the partition.
Attributes
Argument structure for side-related device functions.
nameName of the geometry partition.
geometryUnderlying geometry.
- property SideArg#
Argument structure for side-related device functions.
- fill_side_arg(args, device)[source]#
Fill the arguments to be passed to side-related device functions.
- Parameters:
args (<functools.cached_property object at 0x7f89368f2420>)
- side_index = <Function CellBasedGeometryPartition__side_index(args: typing.Any, partition_side_index: int)>#
- boundary_side_index = <Function CellBasedGeometryPartition__boundary_side_index(args: typing.Any, boundary_side_index: int)>#
- frontier_side_index = <Function CellBasedGeometryPartition__frontier_side_index(args: typing.Any, frontier_side_index: int)>#
- compute_side_indices_from_cells(
- cell_arg_value,
- cell_inclusion_test_func,
- device,
- max_side_count=-1,
- temporary_store=None,
Compute partition, boundary, and frontier side indices from a cell mask.
- Parameters:
cell_arg_value (Any) – Cell argument structure for the inclusion test.
cell_inclusion_test_func (Function) – Device function deciding whether a cell is in the partition.
device – Warp device to run the computation on.
max_side_count (int) – Optional cap on the number of sides to allocate.
temporary_store (TemporaryStore) – Optional temporary storage for intermediate arrays.