pysdic.get_triangle_3_gauss_points#
- get_triangle_3_gauss_points(return_weights=False)[source]#
Get the natural coordinates \((\xi, \eta)\) and weights of Gauss quadrature points for a 3-node triangle element.
- Parameters:
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 returned array has shape (1, 2).weights (
numpy.ndarray, optional) – Ifreturn_weightsisTrue, the function also returns an array of weights with shape (1,) associated with each Gauss point.
- Return type:
Notes
A 3-node triangle element uses the following Gauss points and weights for numerical integration:
Point No.
\((\xi, \eta)\)
Weight \(w\)
1
\((\frac{1}{3}, \frac{1}{3})\)
\(\frac{1}{2}\)
See also
pysdic.compute_triangle_3_shape_functionsShape functions for 3-node triangle 2D-elements.
Examples
Get the Gauss points for a 3-node triangle element:
1import numpy 2from pysdic import get_triangle_3_gauss_points 3 4gauss_points = get_triangle_3_gauss_points() 5print("Gauss points:") 6print(gauss_points)
Gauss points: [[0.33333333 0.33333333]]