warp.fem.GeometryDomain#

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

Interface class for domains, i.e. (partial) views of elements in a Geometry

Parameters:

geometry (Geometry)

__init__(geometry)[source]#
Parameters:

geometry (Geometry | GeometryPartition)

Methods

__init__(geometry)

element_arg_value(device)

Value of the argument to be passed to device functions

element_count()

Number of elements in the domain

element_index_arg_value(device)

Value of the argument to be passed to device functions

fill_element_arg(arg, device)

fill_element_index_arg(arg, device)

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()

Type of reference element

Attributes

DomainArg

dimension

Dimension of the elements of the domain

element_kind

Kind of elements that this domain contains (cells or sides)

name

geometry_partition

Geometry partition containing the elements of the domain

geometry

Underlying geometry

ElementIndexArg

Structure containing arguments to be passed to device functions computing element indices

element_index

Device function for retrieving an ElementIndex from a linearized index

element_partition_index

Device function for retrieving linearized index in the domain's partition from an ElementIndex

ElementArg

Structure containing arguments to be passed to device functions computing element geometry

element_measure

Device function returning the measure determinant (e.g. volume, area) at a given point.

element_measure_ratio

Device function returning the ratio of the measure of a side to that of its neighbour cells

element_position

Device function returning the element position at a sample point

element_deformation_gradient

Device function returning the gradient of the position with respect to the element's reference space

element_normal

Device function returning the element normal at a sample point

element_closest_point

Device function returning the coordinates of the closest point in a given element to a world position

element_coordinates

Device function returning the coordinates corresponding to a world position in a given element reference system

element_lookup

Device function returning the sample point in the domain's geometry corresponding to a world position

element_partition_lookup

Device function returning the sample point in the domain's geometry partition corresponding to a world position

geometry_partition: GeometryPartition#

Geometry partition containing the elements of the domain

geometry: Geometry#

Underlying geometry

property name: str#
property element_kind: ElementKind[source]#

Kind of elements that this domain contains (cells or sides)

property dimension: int[source]#

Dimension of the elements of the domain

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

reference_element()[source]#

Type of reference element

Return type:

Element

element_index_arg_value(device)[source]#

Value of the argument to be passed to device functions

Parameters:

device (Device | str | None)

Return type:

StructInstance

fill_element_index_arg(arg, device)[source]#
Parameters:
  • arg (GeometryDomain.ElementIndexArg)

  • device (Device | str | None)

element_arg_value(device)[source]#

Value of the argument to be passed to device functions

Parameters:

device (Device | str | None)

Return type:

StructInstance

fill_element_arg(arg, device)[source]#
Parameters:
  • arg (GeometryDomain.ElementArg)

  • device (Device | str | None)

ElementIndexArg: Struct#

Structure containing arguments to be passed to device functions computing element indices

element_index: Function#

Device function for retrieving an ElementIndex from a linearized index

element_partition_index: Function#

Device function for retrieving linearized index in the domain’s partition from an ElementIndex

ElementArg: Struct#

Structure containing arguments to be passed to device functions computing element geometry

element_measure: Function#

Device function returning the measure determinant (e.g. volume, area) at a given point

element_measure_ratio: Function#

Device function returning the ratio of the measure of a side to that of its neighbour cells

element_position: Function#

Device function returning the element position at a sample point

element_deformation_gradient: Function#

Device function returning the gradient of the position with respect to the element’s reference space

element_normal: Function#

Device function returning the element normal at a sample point

element_closest_point: Function#

Device function returning the coordinates of the closest point in a given element to a world position

element_coordinates: Function#

Device function returning the coordinates corresponding to a world position in a given element reference system

element_lookup: Function#

Device function returning the sample point in the domain’s geometry corresponding to a world position

element_partition_lookup: Function#

Device function returning the sample point in the domain’s geometry partition corresponding to a world position

notify_operator_usage(ops)[source]#

Makes the Domain aware that the operators ops will be applied

Parameters:

ops (set[Operator])

property DomainArg#