Integration Points for quadrilaterals
I think this is similar to #1351 (closed) but for quadrilaterals.
import gmsh
import numpy as np
gmsh.initialize()
for i in range(3):
gpts_line, gwts_line = gmsh.model.mesh.getIntegrationPoints(1, f'Gauss{i}')
gpts_line= np.array(gpts_line).reshape(-1, 3)
gpts_quad, gwts_quad= gmsh.model.mesh.getIntegrationPoints(3, f'Gauss{i}')
gpts_quad = np.array(gpts_quad).reshape(-1, 3)
print(f"Quadrature: {i}, \nGauss points on Line:\n{gpts_line}, \non Quadrilateral: \n{gpts_quad}")
gmsh.finalize()
This is the result
Quadrature: 0,
Gauss points on Line:
[[0. 0. 0.]],
on Quadrilateral:
[[0. 0. 0.]]
Quadrature: 1,
Gauss points on Line:
[[0. 0. 0.]],
on Quadrilateral:
[[ 0.81649658 0. 0. ]
[-0.40824829 0.84089642 0. ]
[-0.40824829 -0.84089642 0. ]]
Quadrature: 2,
Gauss points on Line:
[[-0.57735027 0. 0. ]
[ 0.57735027 0. 0. ]],
on Quadrilateral:
[[ 0. 0. 0. ]
[ 0. 0.96609178 0. ]
[ 0. -0.96609178 0. ]
[ 0.77459667 0.77459667 0. ]
[ 0.77459667 -0.77459667 0. ]
[-0.77459667 0.77459667 0. ]
[-0.77459667 -0.77459667 0. ]]
As far as i know for quadrilateral we can imagine two 1D line elements. So for quadrature=1 there should also be only one point and for quadrature 2 there should be 4 points. In this element type=3 is mentioned as quadrangle. Is this different from quadrilaterals?