Open snschune opened 8 years ago
The code for this is at: https://github.com/idaholab/moose/blob/devel/framework/src/base/AuxiliarySystem.C#L470
which is called at: https://github.com/idaholab/moose/blob/devel/framework/src/base/FEProblem.C#L2905
Typically auxiliary nodal variables depend on the primal variable and they should be in the same order. But @snschune provided a use case the order of aux nodal variables could differ from the one for primal variables, or higher. So maybe we should remove that check?
Interesting. The problem is that someone might be using a high order Aux Variable just for postprocessing (like, it doesn't feed back into the residual at all)... and they would get penalized in this scheme.
Maybe we could add this as an option?
FYI, removing that if causes one test failing:
bcs/nodal_normals.cylinder_hexes_2nd........................................................ FAILED (EXODIFF)
which shows another case of using higher order in aux variable.
Description of the enhancement or error report
Selection of quadrature is based only on the primal variables. In PR #7547 I implement the inner product (f,g) where f is second order Lagrange and g is first order Lagrange, so the integral is for a third order function.
The primal variable is first order Lagrange. Moose selects the quadrature order to integrate second order polynomials correctly.
I should add that there was a discussion of the inner product (f,f) to not be integrated exactly with a significant error (exact answer = 0.4, actual answer = 0.3996). I increased the quadrature order manually and got the right answer.
Rationale for the enhancement or information for reproducing the error
Should MOOSE take AuxVariables into account when selecting the quadrature rule?