private void gridCoefficients(){

    	    double[] yt = new double[4];
    	    double[] dydx1t = new double[4];
    	    double[] dydx2t = new double[4];
    	    double[] d2ydx1dx2t = new double[4];
    	    double[] ct = new double[16];
    	    double[] xt = new double[16];
    	    double d1 = 0.0;
    	    double d2 = 0.0;
    	    for(int i=0; i<this.nPoints-1; i++){
    	        d1 = this.x1[i+1] - this.x1[i];
    	        for(int j=0; j<this.mPoints-1; j++){

    	            // Calculate grid coefficients for 4-point grid square with point i,j at the top left corner
                    double[][] cc = new double[4][4];
    	            d2 = this.x2[j] - this.x2[j+1];
    	            coeff.add(new Double(d1));
    	            coeff.add(new Double(this.x1[i]));
    	            coeff.add(new Double(d2));
    	            coeff.add(new Double(this.x2[j+1]));
    	            yt[0] = this.y[i][j+1];
    	            dydx1t[0] = this.dydx1[i][j+1];
    	            dydx2t[0] = this.dydx2[i][j+1];
    	            d2ydx1dx2t[0] = this.d2ydx1dx2[i][j+1];
    	            yt[1] = this.y[i+1][j+1];
    	            dydx1t[1] = this.dydx1[i+1][j+1];
    	            dydx2t[1] = this.dydx2[i+1][j+1];
    	            d2ydx1dx2t[1] = this.d2ydx1dx2[i+1][j+1];
    	            yt[2] = this.y[i+1][j];
    	            dydx1t[2] = this.dydx1[i+1][j];
    	            dydx2t[2] = this.dydx2[i+1][j];
    	            d2ydx1dx2t[2] = this.d2ydx1dx2[i+1][j];
    	            yt[3] = this.y[i][j];
    	            dydx1t[3] = this.dydx1[i][j];
    	            dydx2t[3] = this.dydx2[i][j];
    	            d2ydx1dx2t[3] = this.d2ydx1dx2[i][j];

    	            for(int k=0; k<4; k++){
    	                xt[k] = yt[k];
    	                xt[k+4] = dydx1t[k]*d1;
    	                xt[k+8] = dydx2t[k]*d2;
    	                xt[k+12] = d2ydx1dx2t[k]*d1*d2;
    	            }

                    double xh = 0.0;
    	            for(int k=0; k<16; k++){
    	                for(int kk=0; kk<16; kk++){
    	                    xh += this.weights[k][kk]*xt[kk];
    	                }
    	                ct[k] = xh;
    	                xh = 0.0;
    	            }

    	            int counter = 0;
    	            for(int k=0; k<4; k++){
    	                for(int kk=0; kk<4; kk++){
    	                    cc[k][kk] = ct[counter++];
    	                }
    	            }

    	            // Add grid coefficient 4x4 array to ArrayList
    	            coeff.add(cc);
    	        }
    	    }
    	}