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)

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

geometry (Geometry)

Methods

__init__(geometry[, device])

boundary_side_count()

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.

frontier_side_count()

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)

side_count()

Return the number of sides in the partition.

Attributes

SideArg

Argument structure for side-related device functions.

boundary_side_index

frontier_side_index

name

Name of the geometry partition.

side_index

side_to_cell_arg

geometry

Underlying geometry.

property SideArg#

Argument structure for side-related device functions.

side_count()[source]#

Return the number of sides in the partition.

Return type:

int

boundary_side_count()[source]#

Return the number of boundary sides in the partition.

Return type:

int

frontier_side_count()[source]#

Return the number of frontier sides in the partition.

Return type:

int

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)>#
Parameters:
  • args (Any)

  • partition_side_index (int)

boundary_side_index = <Function CellBasedGeometryPartition__boundary_side_index(args: typing.Any, boundary_side_index: int)>#
Parameters:
  • args (Any)

  • boundary_side_index (int)

frontier_side_index = <Function CellBasedGeometryPartition__frontier_side_index(args: typing.Any, frontier_side_index: int)>#
Parameters:
  • args (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,
)[source]#

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.

side_to_cell_arg = <Function CellBasedGeometryPartition__side_to_cell_arg(side_arg: typing.Any)>#
Parameters:

side_arg (Any)