subroutine Gauss_Seidel(N,it_interna, AW,AP,AE,BP,TN)
	
	implicit none
	integer,intent(in)                 :: N, it_interna
	real*8,dimension(N),intent(in)     :: AW,AP,AE,BP
	real*8,dimension(N),intent(inout)  :: TN
	integer::i, k

do k=1,it_interna

	do i=2,N-1

		TN(i)=(BP(i)+AW(i)*TN(i-1)+AE(i)*TN(i+1))/AP(i)

	end do

end do 

end subroutine Gauss_Seidel

