warp.fem.ExplicitGeometryPartition#

class warp.fem.ExplicitGeometryPartition(
geometry,
cell_mask,
max_cell_count=-1,
max_side_count=-1,
temporary_store=None,
)[source]#
Parameters:
__init__(
geometry,
cell_mask,
max_cell_count=-1,
max_side_count=-1,
temporary_store=None,
)[source]#

Creates a geometry partition from an active cell mask

Parameters:
  • geometry (Geometry) – the geometry to partition

  • cell_mask (array(ndim=1, dtype=int32)) – warp array of length geometry.cell_count() indicating which cells are selected. Array values must be either 1 (selected) or 0 (not selected).

  • max_cell_count (int) – if positive, will be used to limit the number of cells to avoid device/host synchronization

  • max_side_count (int) – if positive, will be used to limit the number of sides to avoid device/host synchronization

  • temporary_store (TemporaryStore | None)

Methods

__init__(geometry, cell_mask[, ...])

Creates a geometry partition from an active cell mask

boundary_side_count()

cell_arg_value(device)

cell_count()

compute_side_indices_from_cells(...[, ...])

fill_cell_arg(args, device)

fill_side_arg(args, device)

frontier_side_count()

rebuild(cell_mask[, temporary_store])

Rebuilds the geometry partition from a new active cell mask

side_arg_value(device)

side_count()

Attributes

CellArg

SideArg

boundary_side_index

cell_index

frontier_side_index

name

partition_cell_index

side_index

side_to_cell_arg

geometry

Underlying geometry

rebuild(cell_mask, temporary_store=None)[source]#

Rebuilds the geometry partition from a new active cell mask

Parameters:
  • geometry – the geometry to partition

  • cell_mask (array(ndim=1, dtype=int32)) – warp array of length geometry.cell_count() indicating which cells are selected. Array values must be either 1 (selected) or 0 (not selected).

  • max_cell_count – if positive, will be used to limit the number of cells to avoid device/host synchronization

  • max_side_count – if positive, will be used to limit the number of sides to avoid device/host synchronization

  • temporary_store (TemporaryStore | None)

cell_count()[source]#
Return type:

int

CellArg = <warp._src.codegen.Struct object>#
fill_cell_arg(args, device)[source]#
Parameters:

args (CellArg)

cell_index = <Function ExplicitGeometryPartition__cell_index(args: warp._src.fem.geometry.partition.ExplicitGeometryPartition.CellArg, partition_cell_index: int)>#
Parameters:
  • args (CellArg)

  • partition_cell_index (int)

partition_cell_index = <Function ExplicitGeometryPartition__partition_cell_index(args: warp._src.fem.geometry.partition.ExplicitGeometryPartition.CellArg, cell_index: int)>#
Parameters:
  • args (CellArg)

  • cell_index (int)