Module 4 :
Lecture 12Numerical Integration
 


Subroutine INTEG-PNTS

This subroutine generates the data about the Gauss point coordinates and the weight corresponding to various values of n (the number of Gauss points). We restrict the values of n to We use the following notation for the variables:

  • Scalar variables:
    n : number of Gauss points (integer)
  • Array variables
    psi (n) : Gauss point coordinates (real)
    w (n) : corresponding weights (real)
  • INPUT variables : n
  • OUTPUT variables : psi (n), w (n)

Now the subroutine can be written as follows.

Subroutine INTEG-PNTS (n, psi, w)

if , then
    
     
end if

if , then
     
    
    
    
end if

if , then
      
     
      
      
      
      
end if

if , then
     
      
      
      
      
      
      
      
end if

if then
     
      
      
      
      
     
     
     
     
end if