warp.fem.BasisSpace#

class warp.fem.BasisSpace(topology)[source]#

Interface class for defining shape functions over a geometry.

A basis space is a component of a function space, and is responsible for defining the node positions and their weights over individual elements of the geometry. The connectivity pattern between elements of geometry is defined by the SpaceTopology. The actual valuation of the space is defined by the FunctionSpace, allowing to reuse a single basis space for multiple value types (e.g, scalar, vector, or tensor).

See also: make_polynomial_basis_space(), make_collocated_function_space()

Parameters:

topology (SpaceTopology)

__init__(topology)[source]#
Parameters:

topology (SpaceTopology)

Methods

__init__(topology)

basis_arg_value(device)

fill_basis_arg(arg, device)

Fill the arguments to be passed to basis-related device functions

make_element_inner_weight()

Create a device function returning inner element shape weights.

make_element_inner_weight_gradient()

Create a device function returning gradients of inner element weights.

make_element_outer_weight()

Create a device function returning outer element shape weights.

make_element_outer_weight_gradient()

Create a device function returning gradients of outer element weights.

make_node_coords_in_element()

Create a device function returning node coordinates within an element.

make_node_quadrature_weight()

Create a device function returning node quadrature weights.

make_trace_node_quadrature_weight()

Create a device function returning trace node quadrature weights.

node_positions([out])

Return a temporary array containing the world position for each node.

trace()

Return a trace basis space on lower-dimensional elements.

Attributes

BasisArg

geometry

Underlying geometry of the basis space

topology

Underlying topology of the basis space

value

Value type for the underlying shape functions

weight_gradient_type

Data type of node weight gradients returned by the basis.

weight_type

Data type of node weights returned by the basis.

BasisArg = <warp._src.codegen.Struct object>#
property topology: SpaceTopology[source]#

Underlying topology of the basis space

property geometry: Geometry[source]#

Underlying geometry of the basis space

property value: Value[source]#

Value type for the underlying shape functions

basis_arg_value(device)[source]#
fill_basis_arg(arg, device)[source]#

Fill the arguments to be passed to basis-related device functions

node_positions(out=None)[source]#

Return a temporary array containing the world position for each node.

Parameters:

out (array | None)

Return type:

array

make_node_coords_in_element()[source]#

Create a device function returning node coordinates within an element.

make_node_quadrature_weight()[source]#

Create a device function returning node quadrature weights.

make_element_inner_weight()[source]#

Create a device function returning inner element shape weights.

make_element_outer_weight()[source]#

Create a device function returning outer element shape weights.

make_element_inner_weight_gradient()[source]#

Create a device function returning gradients of inner element weights.

make_element_outer_weight_gradient()[source]#

Create a device function returning gradients of outer element weights.

make_trace_node_quadrature_weight()[source]#

Create a device function returning trace node quadrature weights.

trace()[source]#

Return a trace basis space on lower-dimensional elements.

Return type:

TraceBasisSpace

property weight_type[source]#

Data type of node weights returned by the basis.

property weight_gradient_type[source]#

Data type of node weight gradients returned by the basis.