From: John Peterson <peterson@cf...>  20060223 21:24:51

Roy Stogner writes: > On Thu, 23 Feb 2006, li pan wrote: > > Ben, John, is our QGauss documentation wrong? It says, "Gauss > quadrature rules of order p have the property of integrating > polynomials of degree 2p1 exactly.", but that's not true. That > sounds like the theorem for a 1D Gauss rule with p points, but looking > in the code, we aren't using the Order argument to choose a number of > points, we're using it to choose what degree of polynomial to exactly > integrate. The documentation is wrong. According to the source code, it's something like this: order p = # of points 2p1 ===== =============== ==== CONSTANT,FIRST 1 1 SECOND 3 5 THIRD 4 7 I think it's based on computing entries in the "mass matrix" M_ij = \int (phi_i * phi_j) dx. So, I think a "SECOND" order rule will compute M_ij exactly if both phi_i and phi_j are quadratic polynomials. A "THIRD" order rule will compute M_ij exactly if both phi_i and phi_j are cubic polys. etc. J 