## [Libmesh-users] Re:QGauss

 [Libmesh-users] Re:QGauss From: li pan - 2006-02-24 11:54:38 thanks for your explaination. I'm dealing with nonlinear problem with quadratic strain gradient in my M(i,j) . So I might use QGauss(SECOND). best regards pan 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 2p-1 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 2p-1 ===== =============== ==== 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. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com 

 [Libmesh-users] Re:QGauss From: li pan - 2006-02-24 11:54:38 thanks for your explaination. I'm dealing with nonlinear problem with quadratic strain gradient in my M(i,j) . So I might use QGauss(SECOND). best regards pan 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 2p-1 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 2p-1 ===== =============== ==== 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. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com