Mathematical Physics - Volume II - Numerical Methods

Chapter 3. Comparison of finite element method and finite difference method

104

DO 200 k = 2 , n i = np1 - k j1 = i + 1

j2 = min0(n,i+ib-1) sum = 0.0 DO 150 j = j1 , j2 mm = j - j1 + 2

sum = sum + x(j)*a(i,mm)

150 CONTINUE

x(i) = (b(i)-sum)/a(i,1)

200 CONTINUE RETURN END

SUBROUTINE post PARAMETER (maxn=400,maxe=100,maxm=5,maxbce=70,maxbcn=40,maxpt=10, & maxband=25) COMMON /ccon / nnode , nelem , nmat , nbce , nbcn , npoint , & nband

COMMON /cnode / x(2,maxn) , u(maxn) PRINT * , ’writing solutions ... ’ WRITE (6,*) WRITE (6,*) ’ node x

y

u ’

WRITE (6,*) &

’ -----------------------------------------------------’

DO 100 i = 1 , nnode WRITE (6,99001) i , x(1,i) , x(2,i) , u(i)

100 CONTINUE 99001 FORMAT (2X,I4,1X,3F15.3) END

Made with FlippingBook flipbook maker