warp.fem.LinearGeometryPartition#

class warp.fem.LinearGeometryPartition(
geometry,
partition_rank,
partition_count,
device=None,
temporary_store=None,
)[source]#

Geometry partition that uniformly divides cells by index range.

Creates a partition by assigning contiguous ranges of cell indices to each partition rank. Useful for simple domain decomposition where cells are numbered sequentially.

Parameters:
__init__(
geometry,
partition_rank,
partition_count,
device=None,
temporary_store=None,
)[source]#

Create a geometry partition by uniformly partitioning cell indices.

Parameters:
  • geometry (Geometry) – The geometry to partition.

  • partition_rank (int) – The index of the partition being created (0 to partition_count-1).

  • partition_count (int) – The total number of partitions over the geometry.

  • device – Warp device on which to perform and store computations.

  • temporary_store (TemporaryStore) – Optional temporary storage for intermediate arrays.

Methods

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

Create a geometry partition by uniformly partitioning cell indices.

boundary_side_count()

Return the number of boundary sides in the partition.

cell_arg_value(device)

cell_count()

Return the number of cells in the partition.

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.

frontier_side_count()

Return the number of frontier sides in the partition.

side_arg_value(device)

side_count()

Return the number of sides in the partition.

Attributes

CellArg

SideArg

Argument structure for side-related device functions.

boundary_side_index

cell_index

frontier_side_index

name

Name of the geometry partition.

partition_cell_index

side_index

side_to_cell_arg

geometry

Underlying geometry.

cell_count()[source]#

Return the number of cells in the partition.

Return type:

int

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

Fill the arguments to be passed to cell-related device functions.

Parameters:

args (CellArg)

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

  • partition_cell_index (int)

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

  • cell_index (int)