warp.fem.Subdomain#
- class warp.fem.Subdomain(
- domain,
- element_mask=None,
- element_indices=None,
- temporary_store=None,
Restriction of domain to a subset of its elements.
- Parameters:
domain (GeometryDomain)
element_mask (array | None)
element_indices (array | None)
temporary_store (TemporaryStore | None)
- __init__(
- domain,
- element_mask=None,
- element_indices=None,
- temporary_store=None,
Create a subdomain from a subset of elements.
Exactly one of element_mask and element_indices should be provided.
- Parameters:
domain (GeometryDomain) – the containing domain
element_mask (array | None) – Array of length
domain.element_count()indicating which elements should be included. Array values must be either1(selected) or0(not selected).element_indices (array | None) – Explicit array of element indices to include
temporary_store (TemporaryStore | None)
Methods
__init__(domain[, element_mask, ...])Create a subdomain from a subset of elements.
Return the corresponding cell domain.
element_arg_value(device)Value of the argument to be passed to device functions
Number of elements in the domain.
element_index_arg_value(device)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()Type of reference element
supports_lookup(device)Return whether element lookup is supported on the given device.
Attributes
DomainArgArgument structure combining element geometry and indices.
Dimension of elements in the domain.
Device function mapping domain arguments to cell-domain arguments.
Kind of elements contained in the domain.
Name of the subdomain.
geometry_partitionGeometry partition containing the elements of the domain.
geometryUnderlying geometry.
ElementIndexArgStructure containing arguments to be passed to device functions computing element indices.
element_indexDevice function for retrieving an
ElementIndexfrom a linearized index.element_partition_indexDevice function for retrieving linearized index in the domain's partition from an
ElementIndex.ElementArgStructure containing arguments to be passed to device functions computing element geometry.
element_measureDevice function returning the measure determinant (e.g. volume, area) at a given point.
element_measure_ratioDevice function returning the ratio of the measure of a side to that of its neighbour cells.
element_positionDevice function returning the element position at a sample point.
element_deformation_gradientDevice function returning the gradient of the position with respect to the element's reference space.
element_normalDevice function returning the element normal at a sample point.
element_closest_pointDevice function returning the coordinates of the closest point in a given element to a world position.
element_coordinatesDevice function returning the coordinates corresponding to a world position in a given element reference system.
element_lookupDevice function returning the sample point in the domain's geometry corresponding to a world position.
element_partition_lookupDevice function returning the sample point in the domain's geometry partition corresponding to a world position.
- property element_kind: ElementKind[source]#
Kind of elements contained in the domain.