Thank-you for the answer. > >> if(PRESSURE_ORDER==2) >> integrando_pres=2; >> else if(PRESSURE_ORDER==2) >> integrando_pres=1; > > The two if-conditions are the same, so you'll always end up with > integrando_pres=2.
Yes, I made a mistake copying the code, I meant: if(PRESSURE_ORDER==2) integrando_pres=2; else if(PRESSURE_ORDER==1) integrando_pres=1; I work with the above if-conditions, not the first ones. > > >> If I use Q2 for pressure, I will use a Gauss-Legendre quadrature of 2 >> order (QGauss<DIMENSION(integrando_pres) with integrando_pres=2). And if >> I use Q1 for pressure, I will use a Gauss-Legendre quadrature of 1 order >> (QGauss<DIMENSION(integrando_pres) with integrando_pres=1), since with n >> quadrature points I get an exact integration for polynomials of degree >> 2n-1. > > If you use elements of order p, you need to choose a quadrature formula > with p+1 points in each direction, since your integrand is a polynomial of > degree 2p and your quadrature formula needs to integrate that correctly. You mean the integrand is a polynomial of degree 2p using elements of order p because I am working with a 2D problem, doesn't it? > > If you use elements of order p, and a quadrature with p Gauss points, you > may see a higher order of convergence than you should because of > superconvergence effects. > > >> However, if I use QGauss<DIMENSION(3), i.e. with a bigger order in the >> quadrature, in the VectorTools::integrate_difference() method, I get a >> pressure error that isn't smaller with a small mesh size, on the >> contrary: pressure error with a mesh size of h=1/32 is smaller than the >> pressure error with a mesh size of h=1/64. >> >> Could you help me explaining me this behaviour? Is this result possible? > > I can't tell what is going wrong, but you should definitely use a > quadrature formula that has enough points to make sure the integration is > exact (or that the integration error is of higher order than the error in > the numerical approximation). So, to avoid having the integration error of higher order than the error in the numerical approximation, the only way is using (PRESSURE_ORDER+1) in the quadrature formula, isn't it? Thanks in advance. Best regards. Isa. _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
