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

make_element_inner_weight_gradient()

make_element_outer_weight()

make_element_outer_weight_gradient()

make_node_coords_in_element()

make_node_quadrature_weight()

make_trace_node_quadrature_weight()

node_positions([out])

Returns a temporary array containing the world position for each node

trace()

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

weight_type

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]#

Returns a temporary array containing the world position for each node

Parameters:

out (array | None)

Return type:

array

make_node_coords_in_element()[source]#
make_node_quadrature_weight()[source]#
make_element_inner_weight()[source]#
make_element_outer_weight()[source]#
make_element_inner_weight_gradient()[source]#
make_element_outer_weight_gradient()[source]#
make_trace_node_quadrature_weight()[source]#
trace()[source]#
Return type:

TraceBasisSpace

property weight_type[source]#
property weight_gradient_type[source]#