pysdic.get_gauss_points#
- get_gauss_points(element_type, return_weights=False)[source]#
Get the natural coordinates and weights of Gauss quadrature points for a specified element type.
- Parameters:
element_type (
str) –The type of element for which to retrieve Gauss points. Supported types are:
'segment_2': 2-node segment element'segment_3': 3-node segment element'triangle_3': 3-node triangle element'triangle_6': 6-node triangle element'quadrangle_4': 4-node quadrangle element'quadrangle_8': 8-node quadrangle element
return_weights (
bool, optional) – IfTrue, the function will also return the weights associated with each Gauss point. Default isFalse.
- Returns:
gauss_points (
numpy.ndarray) – Natural coordinates of the Gauss points. The shape of the returned array is \((N_{gp}, K)\), where \(N_{gp}\) is the number of Gauss points for the specified element type and \(K\) is the topological dimension of the element.weights (
numpy.ndarray, optional) – Ifreturn_weightsisTrue, the function also returns an array of weights with shape \((N_{gp},)\) associated with each Gauss point.
- Return type:
See also
pysdic.get_segment_2_gauss_pointsGauss points for 2-node segment elements.
pysdic.get_segment_3_gauss_pointsGauss points for 3-node segment elements.
pysdic.get_triangle_3_gauss_pointsGauss points for 3-node triangle elements.
pysdic.get_triangle_6_gauss_pointsGauss points for 6-node triangle elements.
pysdic.get_quadrangle_4_gauss_pointsGauss points for 4-node quadrangle elements.
pysdic.get_quadrangle_8_gauss_pointsGauss points for 8-node quadrangle elements.
Examples
Get the Gauss points for a 3-node triangle element:
1import numpy 2from pysdic import get_gauss_points 3 4gauss_points_array = get_gauss_points("triangle_3") 5print("Gauss points for triangle_3:") 6print(gauss_points_array)
Gauss points for triangle_3: [[0.33333333 0.33333333]]