pysdic.Mesh.compute_strains#

Mesh.compute_strains(displacements, integration_points, *, allow_unlocated_points=False, tolerance=0.0, default=nan)[source]#

Compute the linear strain tensor of a displacement field at integration points.

Shortcut for pysdic.fem.compute_strains() with the coordinates, connectivity and element type of the mesh.

Parameters:
  • displacements (Union[str, ArrayLike]) – The displacements of the vertices: the name of a vertex property (see mesh.vertices) or an array of shape \((N_v, E)\).

  • integration_points (pysdic.IntegrationPoints) – The integration points, consistent with the mesh (see validate_integration_points()).

  • allow_unlocated_points (bool, optional (default: False)) – If True, the unlocated points (element index -1) get the value default. Otherwise, they raise an error.

  • tolerance (Real, optional (default: 0.0)) – The tolerance to decide if a point is inside the reference element.

  • default (Real, optional (default: numpy.nan)) – The value of the unlocated points.

Returns:

An array of shape \((N_p, E, E)\) with the strain tensor at each point.

Return type:

numpy.ndarray