pysdic.IntegrationPoints.from_gauss_points#

classmethod IntegrationPoints.from_gauss_points(element_type, n_elements)[source]#

Create the Gauss quadrature points of all the elements of a mesh.

The \(N_{gp}\) Gauss points of the element type (see pysdic.fem.get_gauss_points()) are repeated for each element, with their quadrature weights. The points are sorted by element: the points \(e N_{gp}\) to \((e + 1) N_{gp} - 1\) belong to the element \(e\).

Parameters:
  • element_type (str) – The type of the elements (case insensitive, see pysdic.Connectivity).

  • n_elements (Integral) – The number of elements \(N_e\) of the mesh (non-negative).

Returns:

\(N_p = N_e N_{gp}\) integration points, all located.

Return type:

pysdic.IntegrationPoints

Examples

1from pysdic import IntegrationPoints
2
3integration_points = IntegrationPoints.from_gauss_points("quadrangle_4", 2)
4print(integration_points.element_indices)  # [0 0 0 0 1 1 1 1]
5print(integration_points.weights)          # [1. 1. 1. 1. 1. 1. 1. 1.]