pysdic.workflows.create_grid_integration_points#
- create_grid_integration_points(mesh, n, *, elements=None)[source]#
Create a regular grid of \(n^2\) integration points in each element of a surface mesh.
The reference element is divided into \(n^2\) cells of the same area and a point is placed at the center of each cell, with the area of the cell as weight (midpoint rule): the weights of an element sum to the area of the reference element, as the Gauss points.
quadrangles (
quadrangle_4,quadrangle_8): \(n \times n\) squares;triangles (
triangle_3,triangle_6): the \(n^2\) sub-triangles of the regular subdivision of each edge in \(n\) segments, points at their centroids.
The points are ordered element by element (the \(n^2\) points of the first element, then the next one).
- Parameters:
mesh (
pysdic.Mesh) – A surface mesh with one of the element types above.n (Integral) – The number of subdivisions of the reference element along an edge (at least 1).
elements (Optional[ArrayLike], optional) – The indices of the elements receiving points. By default, all the elements.
- Returns:
The \(n^2 N_e\) points, all located.
- Return type:
- Raises:
TypeError – If
meshis not apysdic.Mesh.ValueError – If the element type is not supported, or an input has a wrong value.
Examples
from pysdic.workflows import create_grid_integration_points integration_points = create_grid_integration_points(analysis.mesh, 6) # 36 points per element