warp.fem.ExplicitQuadrature#

class warp.fem.ExplicitQuadrature(domain, points, weights)[source]#

Quadrature using explicit per-cell points and weights.

The number of quadrature points per cell is assumed to be constant and deduced from the shape of the points and weights arrays. Quadrature points may be provided for either the whole geometry or just the domain’s elements.

Parameters:
  • domain (GeometryDomain) – Domain of definition of the quadrature formula

  • points (wp.array2d(dtype=Coords)) – 2d array of shape (domain.element_count(), points_per_cell) or (domain.geometry_element_count(), points_per_cell) containing the coordinates of each quadrature point.

  • weights (wp.array2d(dtype=float)) – 2d array of shape (domain.element_count(), points_per_cell) or (domain.geometry_element_count(), points_per_cell) containing the weight for each quadrature point.

See also: PicQuadrature

__init__(domain, points, weights)[source]#
Parameters:

Methods

__init__(domain, points, weights)

arg_value(device)

element_index_arg_value(device)

evaluation_point_count()

fill_arg(arg, device)

Fill the quadrature argument structure for device functions.

max_points_per_element()

Maximum number of quadrature points per element.

point_coords(elt_arg, qp_arg, ...)

Coordinate values in element of the element's qp_index'th quadrature point.

point_evaluation_index(elt_arg, qp_arg, ...)

Quadrature point index according to evaluation order.

point_index(elt_arg, qp_arg, ...)

Global index of the element's qp_index'th quadrature point.

point_weight(elt_arg, qp_arg, ...)

Weight of the element's qp_index'th quadrature point.

total_point_count()

Total number of quadrature points.

Attributes

Arg

ElementIndexArg

Mapping from evaluation point indices to element indices.

domain

Domain over which this quadrature is defined

evaluation_point_element_index

name

Unique name of the quadrature rule.

point_count

Arg = <warp._src.codegen.Struct object>#
property name#

Unique name of the quadrature rule.

total_point_count()[source]#

Total number of quadrature points.

max_points_per_element()[source]#

Maximum number of quadrature points per element.

fill_arg(arg, device)[source]#

Fill the quadrature argument structure for device functions.

Parameters:

arg (Arg)

point_count = <Function ExplicitQuadrature__point_count(elt_arg: typing.Any, qp_arg: warp._src.fem.quadrature.quadrature.ExplicitQuadrature.Arg, domain_element_index: int, element_index: int)>#
Parameters:
  • elt_arg (Any)

  • qp_arg (Arg)

  • domain_element_index (int)

  • element_index (int)