warp.fem.SpaceTopology#
- class warp.fem.SpaceTopology(geometry, max_nodes_per_element)[source]#
Interface class for defining the topology of a function space.
The topology only considers the indices of the nodes in each element, and as such, the connectivity pattern of the function space. It does not specify the actual location of the nodes within the elements, or the valuation function.
Methods
element_node_count(geo_arg, topo_arg, ...)Return the actual number of nodes in a given element.
element_node_index(geo_arg, topo_arg, ...)Global node index for a given node in a given element
element_node_indices([out])Return a temporary array containing the global index for each node of each element.
fill_topo_arg(arg, device)Fill topology arguments for device functions.
Return the full space topology from which this topology is derived.
is_derived_from(other)Check whether two topologies are equal, or
selfis the trace ofother.Variant of side neighbor node counts that can be used for topologies with varying node counts per element.
Number of nodes in the interpolation basis
side_neighbor_node_counts(side_arg, ...)Return the number of nodes for both the inner and outer cells of a given sides.
topo_arg_value(device)trace()Trace of the function space over lower-dimensional elements of the geometry
Attributes
Underlying geometry
Whether this topology is defined on the trace of the geometry
Unique name of the topology.
Embedding dimension of the function space.
maximum number of interpolation nodes per element of the geometry.
Structure type holding the geometry element arguments passed to device functions.
- TopologyArg = <warp._src.codegen.Struct object>#
- MAX_NODES_PER_ELEMENT: int#
maximum number of interpolation nodes per element of the geometry.
Note
This will change to be defined per-element in future versions
- ElementArg: type#
Structure type holding the geometry element arguments passed to device functions.
Assigned per instance from the underlying geometry.
- property name#
Unique name of the topology.
- static element_node_count(geo_arg, topo_arg, element_index)[source]#
Return the actual number of nodes in a given element.
- Parameters:
geo_arg (SpaceTopology.ElementArg)
topo_arg (TopologyArg)
element_index (int)
- Return type:
- static element_node_index(
- geo_arg,
- topo_arg,
- element_index,
- node_index_in_elt,
Global node index for a given node in a given element
- Parameters:
geo_arg (SpaceTopology.ElementArg)
topo_arg (TopologyArg)
element_index (int)
node_index_in_elt (int)
- Return type:
- static side_neighbor_node_counts(
- side_arg,
- topo_arg,
- side_index,
Return the number of nodes for both the inner and outer cells of a given sides.
- Parameters:
side_arg (SpaceTopology.ElementArg)
topo_arg (TopologyArg)
side_index (int)
- Return type:
- element_node_indices(out=None)[source]#
Return a temporary array containing the global index for each node of each element.
- trace()[source]#
Trace of the function space over lower-dimensional elements of the geometry
- Return type:
TraceSpaceTopology
- full_space_topology()[source]#
Return the full space topology from which this topology is derived.
- Return type:
- is_derived_from(other)[source]#
Check whether two topologies are equal, or
selfis the trace ofother.- Parameters:
other (SpaceTopology)
- Return type: