pysdic.fem.get_triangle_6_gauss_points#
- get_triangle_6_gauss_points(return_weights=False)[source]#
Get the natural coordinates \((\xi, \eta)\) and weights of Gauss quadrature points for a 6-node triangle element.
A 3-point interior rule is used. It integrates exactly polynomials up to degree 2 over the reference triangle \(\{\xi, \eta \geq 0, \xi + \eta \leq 1\}\).
- Parameters:
return_weights (bool, optional (default:
False)) – If True, the function will also return the weights associated with each Gauss point.- Returns:
gauss_points (numpy.ndarray) – Natural coordinates of the Gauss points. The returned array has shape \((3, 2)\).
weights (numpy.ndarray) – Only returned if
return_weightsis True. Weights associated with each Gauss point, with shape \((3,)\). They sum to \(\frac{1}{2}\), the area of the reference triangle.
- Return type:
Notes
A 6-node triangle element uses the following Gauss points and weights for numerical integration:
Point No.
\((\xi, \eta)\)
Weight \(w\)
1
\((\frac{1}{6}, \frac{1}{6})\)
\(\frac{1}{6}\)
2
\((\frac{2}{3}, \frac{1}{6})\)
\(\frac{1}{6}\)
3
\((\frac{1}{6}, \frac{2}{3})\)
\(\frac{1}{6}\)
See also
pysdic.fem.compute_triangle_6_shape_functionsShape functions for 6-node triangle 2D-elements.
pysdic.fem.get_gauss_pointsGauss points for any supported element type.
Examples
Get the Gauss points for a 6-node triangle element:
1import numpy 2from pysdic.fem import get_triangle_6_gauss_points 3 4gauss_points = get_triangle_6_gauss_points() 5print("Gauss points:") 6print(gauss_points)
Gauss points: [[0.16666667 0.16666667] [0.66666667 0.16666667] [0.16666667 0.66666667]]