# Normalization of polynomials for discontinuous Galerkin methods (DGM)

I was curious if someone could share their opinion on this matter. I have noticed that some people in literature normalize their Legendre polynomials, i.e. divide or multiply the polynomial by $$\sqrt{\frac{2n+1}{2}},$$ where $$n$$ is the order of the polynomial. I am quite new to DG, but I am experiencing better results when I normalize my Legendre polynomial than when I don't. Is there a particular reason why people normalize?

Density at $$T = 0.3$$ with normalized Legendre polynomial. Density at $$T = 0.3$$ with unnormalized Legendre Polynomial In terms of the resolution, I am running on a $$50\times 50$$ grid points.

Polynomial subroutine:

function legendre (x,n)
integer :: n
real(kind=8) :: x
real(kind=8) :: legendre
x = min(max(x,-1.0),1.0)
select case(n)
case(0)
legendre = 1.0
case(1)
legendre = x
case(2)
legendre = 0.5*(3*x**2-1)
case(3)
legendre = 0.5*(5.0*x**3-3.0*x)
case(4)
legendre = 0.125*(35.0*x**4-30.0*x**2+3.0)
case(5)
legendre = 0.125*(63.0*x**5-70.0*x**3+15.0*x)
case(6)
legendre = 1.0/16.0*(231.0*x**6-315.0*x**4+105.0*x**2-5.0)
end select
legendre = sqrt((2.0*dble(n)+1.0)/2.0)*legendre
return
end function legendre

function legendre_prime (x,n)
integer :: n
real(kind=8) :: x
real(kind=8) :: legendre_prime
x = min(max(x,-1.0),1.0)

select case(n)
case(0)
legendre_prime = 0.0
case(1)
legendre_prime = 1.0
case(2)
legendre_prime = 3.0*x
case(3)
legendre_prime = 0.5*(15.0*x**2-3.0)
case(4)
legendre_prime = 0.125*(140.0*x**3-60.0*x)
case(5)
legendre_prime = 0.125*(315.0*x**4-210.0*x**2+15.0)
case(6)
legendre_prime = 1.0/16.0*(1386.0*x**5-1260.0*x**3+210.0*x)
end select
legendre_prime = sqrt((2.0*dble(n)+1.0)/2.0)*legendre_prime
return
end function legendre_prime

• Are you using explicit or implicit schemes ? For explicit schemes, it does not matter. For implicit schemes, the matrix conditioning may depend on this scaling. Can you elaborate in what way your results are worse/better and for what problem ? – cfdlab Feb 13 '19 at 11:22
• What problem are you solving? Are you doing modal or nodal DG? – Vikram Feb 13 '19 at 16:20
• Sorry for the late replies. I am solving the 2D compressible Euler equations for an ideal gas. In this case I am solving a 4 shock Riemann problem as a means to benchmark my code. In terms of the time integration, I am using a 3rd-order SSP Runge-Kutta method. I have edited my post to include solutions at T = 0.3 of the normalized and unnormalized polynomials. – Simon Feb 19 '19 at 2:54
• Are you using a limiter ? If yes, then you have to be careful with its implementation since it depends on the normalization used. – cfdlab Feb 19 '19 at 5:12
• GIven I am dealing with a Riemann problem, as far as I know I have to use a limiter to ensure stability. The type of limiter I am using is the TVB Minmod limiter. In terms of the normalization, does it matter if its multiplicative or not? I have edited my post to share the way I am doing the normalization process. – Simon Feb 21 '19 at 18:07

You have to careful while applying TVD limiter and account for the normalization of your basis functions. With reference to , if your solution is as $$u_h(x,y) = \bar{u} + u_x \phi_i(x) + u_y \psi_j(y)$$ where $$\phi_i(x) = \frac{x - x_i}{\Delta x_i/2}, \qquad \psi_j(y) = \frac{y - y_j}{\Delta y_j/2}$$ Here $$\bar{u}, u_x, u_y$$ are the dofs or solution variables and $$\bar{u}$$ is the cell average value. You limit the slope as $$u_x = minmod(u_x, \bar{u}_{i,j} - \bar{u}_{i-1,j}, \bar{u}_{i+1,j} - \bar{u}_{i,j})$$ Due to your normalization, your solution is of the form $$u_h(x,y) = \bar{u} \sqrt{1/2} + u_x \sqrt{3/2} \phi_i(x) + u_y \sqrt{3/2} \psi_j(y)$$ Now $$\bar{u}$$ is not the cell average value. You have to account for these differences and properly modify the limiter step.