pysdic.Connectivity.elements#

property Connectivity.elements: ndarray#

[Get/Set] The vertex indices of the elements, an array of shape \((N_e, N_{vpe})\).

The getter returns a read-only view. The setter copies the given array, whose shape must be \((N_e, N_{vpe})\): to change the number of elements, use filter_elements() or concatenate() (which return a new connectivity). The setter is refused if the connectivity is locked.

Parameters:

value (ArrayLike) – An integer array of shape \((N_e, N_{vpe})\) with non-negative indices. A 1D array of shape \((N_e,)\) is accepted if \(N_{vpe} = 1\).

Returns:

A read-only view of shape \((N_e, N_{vpe})\) on the elements.

Return type:

numpy.ndarray

Raises:
  • TypeError – If the input does not contain integers.

  • ValueError – If the shape of the input is not \((N_e, N_{vpe})\) or if it contains negative indices.

  • RuntimeError – If the connectivity is locked (see locked_message).