Poissong equation with parallel
    • poissong fdm ȭϰ ̸ parallel ̿Ͽ cpu ϰ ȴ.
    • ڴ ũ⸦ Ͽ ܼȭ Ͽ.
    • ũ 1 x 1 ũ 2 Ͽ.
    • ҽڵ ִ.(zip Ǿ )

     

  • poissong İ ȭ
    • governer equation : del ^2 u=f(x,y)
    • boundary condition : u(x,y)=g(x,y)
    • (u(i-1,j) + u(i,j+1) + u(i,j-1) + u(i+1,j) )/h^2 =f(i,j)
    • u(i,j)_k+! = 1/4*(u(i-1,j) + u(i,j+1) + u(i,j-1) + u(i+1,j) -h^2 f(i,j))

     

  • subroutines
    • decomp.cpp : 1 parallel ϱ 迭 ۰
    • diff.cpp : ż Ǻ
    • exchng1.cpp : node Ѵ.
    • onedbase.cpp : ʱȭ
    • poissong.cpp : main program
    • sweep.cpp : 庰 poissong Ѵ.

     

  • decomp.cpp
    • double diff(double a[MAXN][MAXN],double b[MAXN][MAXN], int ny, int s, int e)
      • ۰ [cpu Ҵ ] step ̹ step Ѵ.
      • s Ÿ e Ÿ.

       

  • exchng1.cpp
    • int exchng1(double a[MAXN][MAXN], int nx, int s, int e, int comm1d, int nbrbottom, int nbrtop)
      • MPI_Send, MPI_Recv ̿Ͽ θ[e] ڷḦ Ϻθ[s-1] ڷḦ ޴ ڷ Ͼ Ǿ ð .
      • Ư cpu ̷ ð ȴ.
      • ÿ ϰ Ǵ MPI_Sendrecv Ͽ. ׷ cpu MPI_Send, MPI_Recv Ÿ.

       

  • onedbase.cpp
    • int onedinit(double a[MAXN][MAXN], double b[MAXN][MAXN], double f[MAXN][MAXN],int ny, int s, int e)
      • ش cpu 迭 ʱȭ Ѵ.
      • ǿ شϴ i=0,j=0 Ͽ 1.0 ش.

       

  • poissong.cpp
    • main
      • sweep/exchange 2ȸ ǽϰ ִ.
      • ̰ iteration a matrix ǵ ϰ ִ.

       

  • sweep.cpp
    • int sweep1d(double a[MAXN][MAXN], double f[MAXN][MAXN], int ny, int s, int e, double b[MAXN][MAXN])
      • ش poissong Ѵ.