pysdic.Mesh.compute_property_projection#
- Mesh.compute_property_projection(property_array, integration_points, *, sparse=False, skip_m1=True)[source]#
Project a property defined at integration points within elements back to the vertices of a mesh using mesh and integration point information (convenient method for
pysdic.compute_property_projection()). Theelement_typemust be specified in the mesh connectivity to compute the shape functions for the elements of the mesh, which are used to perform the projection of the property.Note
The function is a convenience wrapper around the
pysdic.compute_property_projection()function.Important
If
shape_functionsare precomputed inIntegrationPoints, they will be used, otherwise they will be computed on the fly using theMesh.compute_shape_functions()method.
Warning
No test are performed to check if the provided integration points are consistent with the mesh (i.e., existing element indices). Only shape check is performed. The behavior of the function is undefined if the provided integration points are not consistent with the mesh.
- Parameters:
property_array (Union[
str, ArrayLike]) – An array of shape \((N_{p}, P)\) containing the property values defined at the \(N_{p}\) integration points. If 1D-array is provided, it will be treated as a single-component property of shape \((N_{p}, 1)\). If a string, the property will be retrieved from the properties of the integration points using the string as a key.integration_points (
pysdic.objects.IntegrationPoints) – The integration points at which the property values are defined and from which the projection to the vertices is to be computed.sparse (bool, optional) – If set to
True, the shape functions matrix will be constructed as a sparse matrix to optimize memory usage for large meshes. Default isFalse.skip_m1 (bool, optional) – If set to
True, any element index of -1 inelement_indiceswill result in the corresponding contribution to the vertex property being skipped (i.e., not added to the vertex property values). Default isTrue.
- Returns:
projected_properties – An array of shape \((N_{v}, P)\) containing the projected property values at the nodes of the mesh.
- Return type:
See also
pysdic.compute_shape_functions()For more information on shape functions and their role in property projection.
pysdic.compute_property_projection()For more information on the algorithm used to compute the property projection and an example of how to use it.