efurlanm / ml

Machine Learning
Creative Commons Attribution 4.0 International
1 stars 0 forks source link

In burgers\burgers_solution, what role does variable 'qn' play? #1

Open lyy132 opened 2 months ago

lyy132 commented 2 months ago

I wonder what role does variable 'qn' play?

    qn = 8   # original value  
    qn = 50  
    print('  Quadrature order = %d' % (qn))

If I change 'nu':

    vtn = 100
    vxn = 256
    nu = 0.01 / np.pi

do i need to change 'qn' to get a accurate approximation?

efurlanm commented 1 month ago

As I understand it, the variable 'qn', or order, in the context of Gauss-Hermite quadrature, refers to the number of sample points used in approximating integrals, denoted as (x_i), and are the roots of the polynomial of Hermite (H_n(x)), where (n) represents the order (see: https://en.wikipedia.org/wiki/Gauss%E2%80%93Hermite_quadrature). The higher the order, the more accurate the approximation becomes.