warp.fem.Cells#

class warp.fem.Cells(geometry)[source]#

A Domain containing all cells of the geometry or geometry partition.

Parameters:

geometry (Geometry)

__init__(geometry)[source]#
Parameters:

geometry (Geometry | GeometryPartition)

Methods

__init__(geometry)

cell_domain()

Return the corresponding cell domain.

element_arg_value(device)

Value of the element arguments for device functions.

element_count()

Number of elements in the domain.

element_index_arg_value(device)

Value of the element index arguments for device functions.

fill_element_arg(arg, device)

Fill the element arguments for device functions.

fill_element_index_arg(arg, device)

Fill the element index arguments for device functions.

geometry_element_count()

Number of elements in the underlying geometry.

notify_operator_usage(ops)

Makes the Domain aware that the operators ops will be applied

reference_element()

Reference element for the domain cells.

supports_lookup(device)

Return whether element lookup is supported on the given device.

Attributes

DomainArg

Argument structure combining element geometry and indices.

ElementArg

Structure containing arguments for element geometry.

ElementIndexArg

Structure containing arguments for element indexing.

dimension

Dimension of elements in the domain.

domain_cell_arg

Device function mapping domain arguments to cell-domain arguments.

element_closest_point

Device function returning closest points on elements.

element_coordinates

Device function returning element coordinates for a position.

element_deformation_gradient

Device function returning element deformation gradients.

element_index

Device function mapping partition indices to element indices.

element_kind

Kind of elements contained in the domain.

element_lookup

Device function for looking up elements from positions.

element_measure

Device function returning element measures.

element_measure_ratio

Device function returning element measure ratios.

element_normal

Device function returning element normals.

element_partition_index

Device function mapping element indices to partition indices.

element_partition_lookup

Device function for partition-restricted element lookup.

element_position

Device function returning element positions.

name

Unique name of the domain.

geometry_partition

Geometry partition containing the elements of the domain.

geometry

Underlying geometry.

property element_kind: ElementKind[source]#

Kind of elements contained in the domain.

property dimension: int[source]#

Dimension of elements in the domain.

reference_element()[source]#

Reference element for the domain cells.

Return type:

Element

element_count()[source]#

Number of elements in the domain.

Return type:

int

geometry_element_count()[source]#

Number of elements in the underlying geometry.

Return type:

int

property ElementIndexArg: Struct[source]#

Structure containing arguments for element indexing.

element_index_arg_value(device)[source]#

Value of the element index arguments for device functions.

Parameters:

device (Device | str | None)

Return type:

StructInstance

fill_element_index_arg(arg, device)[source]#

Fill the element index arguments for device functions.

Parameters:
  • arg (<property object at 0x7f8936126ca0>)

  • device (Device | str | None)

property element_index: Function[source]#

Device function mapping partition indices to element indices.

property element_partition_index: Function[source]#

Device function mapping element indices to partition indices.

element_arg_value(device)[source]#

Value of the element arguments for device functions.

Parameters:

device (Device | str | None)

Return type:

StructInstance

fill_element_arg(arg, device)[source]#

Fill the element arguments for device functions.

Parameters:
  • arg (ElementArg)

  • device (Device | str | None)

property ElementArg: Struct[source]#

Structure containing arguments for element geometry.

property element_position: Function[source]#

Device function returning element positions.

property element_deformation_gradient: Function[source]#

Device function returning element deformation gradients.

property element_measure: Function[source]#

Device function returning element measures.

property element_measure_ratio: Function[source]#

Device function returning element measure ratios.

property element_normal: Function[source]#

Device function returning element normals.

property element_closest_point: Function[source]#

Device function returning closest points on elements.

property element_coordinates: Function[source]#

Device function returning element coordinates for a position.

property element_lookup: Function[source]#

Device function for looking up elements from positions.

property element_partition_lookup: Function#

Device function for partition-restricted element lookup.

supports_lookup(device)[source]#

Return whether element lookup is supported on the given device.

property domain_cell_arg: Function[source]#

Device function mapping domain arguments to cell-domain arguments.

cell_domain()[source]#

Return the corresponding cell domain.