ssnx[i][j][k]=(ssn[i][j][k]+ssn[i+1][j][k])/2
ssny[i][j][k]=(ssn[i][j][k]+ssn[i][j+1][k])/2
ssnz[i][j][k]=(ssn[i][j][k]+ssn[i][j][k+1])/2
Listing 2: Computation of constants.