pysdic.IntegrationPoints.from_npz#

classmethod IntegrationPoints.from_npz(filepath, load_properties=True)[source]#

Create a IntegrationPoints object from a NumPy NPZ file.

The NPZ file should contain an array named ‘natural_coordinates’ with shape \((N_p, K)\) representing the natural coordinates of the integration points, and an array named ‘element_indices’ with shape \((N_p,)\) representing the element indices of the integration points. Optionally, it can also contain an array named ‘weights’ with shape \((N_p,)\) representing the weights of the integration points. Additional properties can be stored as separate arrays in the NPZ file.

See also

  • to_npz() method for saving the integration points to a NPZ file.

Parameters:
  • filepath (str) – The path to the NPZ file.

  • load_properties (bool, optional) – If True, all arrays in the NPZ file with format "_properties/{property_name}" will be loaded as properties of the integration points. Default is True.

Returns:

A IntegrationPoints object containing the natural coordinates, element indices, weights, and properties read from the NPZ file.

Return type:

IntegrationPoints