1#ifdef _OPENMP 2#include <omp.h> 3#endif 4#include "RCCE.h" 5#include "npbparams.h" 6#include "applu_protos.h" 7 8//c--------------------------------------------------------------------- 9//c npbparams.h defines parameters that depend on the class and 10//c number of nodes 11//c--------------------------------------------------------------------- 12 13 int ipr_default = 1; 14 double omega_default = 1.2; 15 double tolrsd1_def=1.0e-08, 16 tolrsd2_def=1.0e-08, tolrsd3_def=1.0e-08, 17 tolrsd4_def=1.0e-08, tolrsd5_def=1.0e-08; 18 19 double c1 = 1.4, c2 = 0.40, c3 = 0.1, c4 = 1.0, c5 = 1.4; 20 21//c--------------------------------------------------------------------- 22//c grid 23//c--------------------------------------------------------------------- 24 int nx, ny, nz; 25 int nx0, ny0, nz0; 26 int ipt, ist, iend; 27 int jpt, jst, jend; 28 int ii1, ii2; 29 int ji1, ji2; 30 int ki1, ki2; 31 double dxi, deta, dzeta; 32 double tx1, tx2, tx3; 33 double ty1, ty2, ty3; 34 double tz1, tz2, tz3; 35 36//c--------------------------------------------------------------------- 37//c dissipation 38//c--------------------------------------------------------------------- 39 double dx1, dx2, dx3, dx4, dx5; 40 double dy1, dy2, dy3, dy4, dy5; 41 double dz1, dz2, dz3, dz4, dz5; 42 double dssp; 43//c--------------------------------------------------------------------- 44//c field variables and residuals 45//c--------------------------------------------------------------------- 46 double u[5*(isiz1+4)*(isiz2+4)*isiz3], 47 rsd[5*(isiz1+4)*(isiz2+4)*isiz3], 48 frct[5*(isiz1+4)*(isiz2+4)*isiz3], 49 flux[5*(isiz1+2)*(isiz2+2)*isiz3]; 50 51//c--------------------------------------------------------------------- 52//c output control parameters 53//c--------------------------------------------------------------------- 54 int ipr, inorm; 55 56//#pragma omp threadprivate(ipr, inorm) 57 58//c--------------------------------------------------------------------- 59//c newton-raphson iteration control parameters 60//c--------------------------------------------------------------------- 61 int itmax, invert; 62 double dt, omega, tolrsd[5], rsdnm[5], errnm[5], frc, ttotal; 63 64 double a[5*5*isiz1*isiz2], 65 b[5*5*isiz1*isiz2], 66 c[5*5*isiz1*isiz2], 67 d[5*5*isiz1*isiz2]; 68 69 70//c--------------------------------------------------------------------- 71//c coefficients of the exact solution 72//c--------------------------------------------------------------------- 73 double ce[5*13]; 74 75//#pragma omp threadprivate(ce) 76 77//c--------------------------------------------------------------------- 78//c multi-processor common blocks 79//c--------------------------------------------------------------------- 80 int id, ndim, num, xdim, ydim, row, col; 81 82 int north,south,east,west; 83 84 int npmax=isiz01+isiz02; 85 86// double buf[5*2*isiz2*isiz3], buf1[5*2*isiz2*isiz3]; 87 88 double maxtime; 89 90//c--------------------------------------------------------------------- 91//c coordination flags 92//c--------------------------------------------------------------------- 93 RCCE_FLAG flagsent[4], flagready[4]; 94 double *buf1_exch_1; 95 96#ifdef _OPENMP 97#pragma omp threadprivate (nx, ny, nz, nx0, ny0, nz0, \ 98 ipt, ist, iend, jpt, jst, jend, \ 99 ii1, ii2, ji1, ji2, ki1, ki2, \ 100 dxi, deta, dzeta, \ 101 tx1, tx2, tx3, ty1, ty2, ty3, tz1, tz2, tz3) 102#pragma omp threadprivate (dx1, dx2, dx3, dx4, dx5, \ 103 dy1, dy2, dy3, dy4, dy5, \ 104 dz1, dz2, dz3, dz4, dz5, \ 105 dssp) 106#pragma omp threadprivate(u, rsd, frct, flux) 107 108#pragma omp threadprivate(itmax, invert, \ 109 dt, omega, tolrsd, rsdnm, errnm, frc, ttotal, \ 110 a, b, c, d) 111#pragma omp threadprivate (id, ndim, num, xdim, ydim, row, col, \ 112 north,south,east,west, flagsent, flagready, \ 113 buf1_exch_1, npmax, maxtime) 114#endif 115 116//c--------------------------------------------------------------------- 117//c end of include file 118//c--------------------------------------------------------------------- 119