freegs.quadrature.polygon_quad#
- freegs.quadrature.polygon_quad(polygon, n=6)[source]#
Given a polygon in the form [(r1,z1), (r2,z2), (r3,z3), …] calculates a set of quadrature points and weights, by splitting the polygon into triangles.
returns a list of evaluation points and weights [(r,z,weight),…] These are normalised to calculate the average value of a function over the polygon; multiply by the area to get the integral.
- n number of quadrature points in each triangle
currently: 1, 3 or 6