warp.fem.make_restriction#

warp.fem.make_restriction(
field,
space_restriction=None,
domain=None,
device=None,
)[source]#

Restricts a discrete field to a subset of elements.

Parameters:
  • field (DiscreteField) – the discrete field to restrict

  • space_restriction (SpaceRestriction | None) – the function space restriction defining the subset of elements to consider

  • domain (GeometryDomain | None) – if space_restriction is not provided, the Domain defining the subset of elements to consider

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

Returns:

the field restriction

Return type:

FieldRestriction