sdynpy.core.sdynpy_geometry.id_map

class id_map(from_ids, to_ids)[source]

Bases: object

Class defining mapping between two sets of id numbers

__init__(from_ids, to_ids)[source]

Initializes the id map

Parameters
  • from_ids (np.ndarray) – Id numbers to map from

  • to_ids (np.ndarray) – Id numbers to map to

Return type

None.

Methods

__init__(from_ids, to_ids)

Initializes the id map

inverse()

Returns an inverse map, swapping the from and to ids.

inverse()[source]

Returns an inverse map, swapping the from and to ids.

If duplicate id entries exist, they will be overwritten.

Returns

An id_map object with swapped from and to ids.

Return type

id_map