Skip to content

gaussian quadrature for linear or quadratic function.

Notifications You must be signed in to change notification settings

dc-fukuoka/gauss_quad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

gaussian quadrature for linear or quadratic fuction.
this is a study for FEM.

1D version:

$ make
$ ./a.out 1
 integration alpha*x + beta from a to b
alpha, beta, gamma:   1.00000E+00   1.00000E+00
a, b:  -4.00000E+00   3.00000E+00
analytic solution  :   3.50000E+00
gaussian quadrature:   3.50000E+00
diff:   0.00000E+00

$ ./a.out 2
 integration alpha*x^2 + beta*x + gamma from a to b
alpha, beta, gamma:   1.00000E+00   1.00000E+00   1.00000E+00
a, b:  -4.00000E+00   3.00000E+00
analytic solution  :   3.38333E+01
gaussian quadrature:   3.38333E+01
diff:   7.10543E-15

About

gaussian quadrature for linear or quadratic function.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published