lagrange 2d

Download Lagrange 2D

If you can't read please download the document

Upload: mihaela-nastase

Post on 15-Nov-2015

214 views

Category:

Documents


0 download

DESCRIPTION

Lagrange 2D

TRANSCRIPT

program Laplace1integer i,j,marker,k,freal pivot,temp,check1,check2,RBC,LBC,TBC,BBC,num1REAL, ALLOCATE :: A(:,:),B(:,:)integer :: N=6,EE=(N-2)**2allocate (A(N,N),B(E,E+1))num1=N !Integer to real, needed for check 1, below!Se definesc conditiile la limitaRBC=100LBC=100TBC=500BBC=100do i=1,NA(i,1)=LBCA(i,N)=RBCA(1,i)=TBCA(N,i)=BBCend do!Se initializeaza toate elementeledo i=1,Edo=j=1,E+1B(i,j)=0end doend do!Big loop sets all elements in extended matrixdo i=1,EB(i,i)=-4 !Diagonala principalaif(i>1) thenB(i,i-1)=1 !Diagonala principala stangaend ifif(i