[Libmesh-devel] Default quadrature order From: David Knezevic - 2008-08-14 10:46:35 ```I was wondering why default_quadrature_order in fe_type returns 2*order+1? It says in the documentation that the idea is that the default quadrature rule integrates the mass matrix exactly, so shouldn't 2*order be sufficient? Using tensor product Gauss quadrature rules, the "+1" doesn't make a difference since the Gauss rules for 2*order and 2*order+1 are the same, but it can make a difference on simplices, e.g. the order 4 and order 5 "Gauss" rules on triangles are different... Actually I just had a thought that on quadratic isoparametric elements the Jacobian will be a linear function, so is the idea of the 2*order+1 to cover this case? Cheers, Dave ```
 [Libmesh-devel] Default quadrature order From: David Knezevic - 2008-08-14 10:46:35 ```I was wondering why default_quadrature_order in fe_type returns 2*order+1? It says in the documentation that the idea is that the default quadrature rule integrates the mass matrix exactly, so shouldn't 2*order be sufficient? Using tensor product Gauss quadrature rules, the "+1" doesn't make a difference since the Gauss rules for 2*order and 2*order+1 are the same, but it can make a difference on simplices, e.g. the order 4 and order 5 "Gauss" rules on triangles are different... Actually I just had a thought that on quadratic isoparametric elements the Jacobian will be a linear function, so is the idea of the 2*order+1 to cover this case? Cheers, Dave ```
 Re: [Libmesh-devel] Default quadrature order From: Benjamin Kirk - 2008-08-14 12:32:35 ```> Actually I just had a thought that on quadratic isoparametric elements > the Jacobian will be a linear function, so is the idea of the 2*order+1 > to cover this case? That was my original thought. Even on distorted bilinear quadrilaterals the Jacobian will be non-constant. This predates Roy's has_affine_map() stuff -- presumably you could use that information to make an intelligent decision about the order needed for simplices? The problem there is that the default quadrature order is set independent of an individual element, so you might only take advantage of this optimization when all of the elements are affine... Then again, the default is just that - a default. You can override it if you want, and in some cases, for some problems, there is certainly a performance benefit to under-integrating. This is possible in my compressible navier-stokes stuff so long as you lump the mass matrix. -Ben ```
 Re: [Libmesh-devel] Default quadrature order From: David Knezevic - 2008-08-14 12:49:50 ``` > Then again, the default is just that - a default. You can override it if > you want, and in some cases, for some problems, there is certainly a > performance benefit to under-integrating. This is possible in my > compressible navier-stokes stuff so long as you lump the mass matrix. Yeah, no problems, thanks for the reply. I was just curious to ask about the motivation for the choice of 2*order+1 for the default rule... but it's obviously not a big deal and, as you pointed out, it's a good choice for the default anyway since the jacobian usually won't be constant. Cheers, Dave ```