pysdic.Connectivity.concatenate#

Connectivity.concatenate(other, *, propagate_properties=True)[source]#

Concatenate two connectivities (the elements of other come after).

Note

The vertex indices are not shifted: both connectivities must refer to the same set of vertices.

The element type of the result is the common element type of both connectivities, or None if one of them has no type.

The properties are concatenated with pysdic.core.property_container.PropertyContainer.concatenate(): a property present in only one connectivity is completed with numpy.nan for the elements of the other one (integer and boolean properties are then promoted to float).

Parameters:
  • other (pysdic.Connectivity) – The connectivity to append, with the same \(N_{vpe}\).

  • propagate_properties (bool, optional (default: True)) – If False, the new connectivity has no properties.

Returns:

A new connectivity with \(N_e + N_e^{other}\) elements.

Return type:

pysdic.Connectivity

Raises:

ValueError – If the numbers of vertices per element differ, or if both connectivities have different element types.