Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies in calculation of A-matrix using Gauss-Lobatto quadrature #13

Closed
Balavarun5 opened this issue Aug 31, 2017 · 3 comments
Closed
Assignees
Labels

Comments

@Balavarun5
Copy link
Contributor

Balavarun5 commented Aug 31, 2017

Commit hash: 08b38d7

Description

The calculation of A matrix involves integral of product of Lagrange basis polynomials evaluated over Gauss-Lobatto nodes, This results in some inconsistencies when compared to values obtained by solvers (which use Gaussian quadrature)

Report

A report explaining this issue in detail can be found here

@Balavarun5
Copy link
Contributor Author

The problem with the existing approach of integrating the product of Lagrange basis polynomials using Lobatto quadrature was that the number of Lobatto points used for integration was same as the number of LGL points used to calculate the Lagrange basis polynomials.

As a test, the integral of lagrange basis polynomials L_0 and L_1 are calculated using 8 LGL points is calculated using both Gaussian and Lobatto quadrature.

The number of points used in each quadrature (N_quad) is varied and the error is plotted against N_quad.

image

As can be seen, The error while calculating the Lobatto quadrature using 8 (N_quad) points is non-trivial. The error drastically reduces for N_quad = 9.

The solution then is to use a higher number of Lobatto points to integrate than the number of LGL points used to evaluate the Lagrange basis polynomials.

@Balavarun5
Copy link
Contributor Author

The existing PR #16 is to be updated with the necessary changes and approved before closing this issue.

@Balavarun5
Copy link
Contributor Author

The PR #16 has been merged and the unit test for A matrix is passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants