1#include "applu_share.h" 2#include "applu_macros.h" 3 4void setbv() { 5 6 int i, j, k; 7 int iglob, jglob; 8 int one = 1; 9 10//c--------------------------------------------------------------------- 11//c set the dependent variable values along the top and bottom faces 12//c--------------------------------------------------------------------- 13 for ( j = 1; j<= ny; j++) { 14 jglob = jpt + j; 15 for ( i = 1; i<= nx; i++) { 16 iglob = ipt + i; 17 exact(iglob,jglob,one,&u(1,i,j,1)); 18 exact(iglob,jglob,nz,&u(1,i,j,nz)); 19 } 20 } 21 22//c--------------------------------------------------------------------- 23//c set the dependent variable values along north and south faces 24//c--------------------------------------------------------------------- 25 if (west == -1) { 26 for ( k = 1; k<= nz; k++) { 27 for ( i = 1; i<= nx; i++) { 28 iglob = ipt + i; 29 exact(iglob,one,k,&u(1,i,1,k)); 30 } 31 } 32 } 33 34 if (east == -1) { 35 for ( k = 1; k<= nz; k++) { 36 for ( i = 1; i<= nx; i++) { 37 iglob = ipt + i; 38 exact(iglob,ny0,k,&u(1,i,ny,k)); 39 } 40 } 41 } 42 43//c--------------------------------------------------------------------- 44//c set the dependent variable values along east and west faces 45//c--------------------------------------------------------------------- 46 if (north == -1) { 47 for ( k = 1; k<= nz; k++) { 48 for ( j = 1; j<= ny; j++) { 49 jglob = jpt + j; 50 exact(one,jglob,k,&u(1,1,j,k)); 51 } 52 } 53 } 54 55 if (south == -1) { 56 for ( k = 1; k<= nz; k++) { 57 for ( j = 1; j<= ny; j++) { 58 jglob = jpt + j; 59 exact(nx0,jglob,k,&u(1,nx,j,k)); 60 } 61 } 62 } 63 64 return; 65} 66 67