cpp: #include <stdio.h>\n#include <math.h>\n\n#define MSIZE 200\nint n=MSIZE, m=MSIZE;\ndouble alpha = 0.0543;\ndouble u[MSIZE][MSIZE], f[MSIZE][MSIZE], uold[MSIZE][MSIZE];\ndouble dx, dy;\n\nvoid\ninitialize ()\n{\n  int i, j, xx, yy;\n\n  dx = 2.0 / (n - 1);\n  dy = 2.0 / (m - 1);\n\n  /* Initialize initial condition and RHS */\n#pragma omp parallel for private(i,j,xx,yy)\n  for (i = 0; i < n; i++)\n    for (j = 0; j < m; j++)\n    {\n      xx = (int) (-1.0 + dx * (i - 1));       /* -1 < x < 1 */\n      yy = (int) (-1.0 + dy * (j - 1));       /* -1 < y < 1 */\n      u[i][j] = 0.0;\n      f[i][j] = -1.0 * alpha * (1.0 - xx * xx) * (1.0 - yy * yy)\n        - 2.0 * (1.0 - xx * xx) - 2.0 * (1.0 - yy * yy);\n\n    }\n}\n\nint main()\n{\n  initialize();\n  return 0;\n}\n
fortran: module DRB057\nuse omp_lib\nimplicit none\n\ninteger :: MSIZE\ninteger :: n,m,mits\ninteger, parameter :: dp = kind(1.0d0)\nreal(dp), dimension(:,:), pointer :: u,f,uold\nreal(dp) :: dx,dy,tol,relax,alpha\n\ncontains\nsubroutine initialize()\ninteger :: i,j,xx,yy\n\nMSIZE = 200\nmits = 1000\nrelax = 1.0\nalpha = 0.0543\nn = MSIZE\nm = MSIZE\nallocate(u(MSIZE,MSIZE))\nallocate(f(MSIZE,MSIZE))\nallocate(uold(MSIZE,MSIZE))\n\ndx = 2.0D0 / DBLE(n-1)\ndy = 2.0D0 / DBLE(m-1)\n\n!Initialize initial condition and RHS\n!$omp parallel do private(i,j,xx,yy)\ndo i = 1, n\ndo j = 1, m\nxx = int(-1.0 + dx * (i-1))\nyy = int(-1.0 + dy * (i-1))\nu(i,j) = 0.0\nf(i,j) = -1.0 * alpha * (1.0-xx*xx) * (1.0-yy*yy) - 2.0* (1.0-xx*xx) -2.0 * (1.0-yy*yy)\nend do\nend do\n!$omp end parallel do\n\nend subroutine\nend module program DRB057_jacobiinitialize_orig_no\n    use omp_lib\n    use DRB057\n    implicit none\n\n    call initialize()\nend program