Lines Matching refs:nx

191   PetscInt  i, j, k, nx = user->mx, ny = user->my;  in FormInitialGuess()  local
197 for (i = 0; i < nx; i++) { in FormInitialGuess()
198 k = nx * j + i; in FormInitialGuess()
199 val = PetscMin((PetscMin(i + 1, nx - i)) * hx, temp); in FormInitialGuess()
248 PetscInt nx = user->mx, ny = user->my, i, j, k; in FormFunction() local
256 for (i = -1; i < nx; i++) { in FormFunction()
257 k = nx * j + i; in FormFunction()
262 if (i < nx - 1 && j > -1) vr = x[k + 1]; in FormFunction()
263 if (i > -1 && j < ny - 1) vt = x[k + nx]; in FormFunction()
273 for (i = 0; i <= nx; i++) { in FormFunction()
274 k = nx * j + i; in FormFunction()
278 if (i < nx && j > 0) vb = x[k - nx]; in FormFunction()
280 if (i < nx && j < ny) v = x[k]; in FormFunction()
295 PetscCall(PetscLogFlops(24.0 * nx * ny)); in FormFunction()
315 PetscInt nx = user->mx, ny = user->my, ind, i, j, k; in FormGradient() local
330 for (i = -1; i < nx; i++) { in FormGradient()
331 k = nx * j + i; in FormGradient()
336 if (i < nx - 1 && j > -1) vr = x[k + 1]; in FormGradient()
337 if (i > -1 && j < ny - 1) vt = x[k + nx]; in FormGradient()
345 if (i != nx - 1 && j != -1) { in FormGradient()
351 ind = k + nx; in FormGradient()
360 for (i = 0; i <= nx; i++) { in FormGradient()
361 k = nx * j + i; in FormGradient()
365 if (i < nx && j > 0) vb = x[k - nx]; in FormGradient()
367 if (i < nx && j < ny) v = x[k]; in FormGradient()
370 if (i != nx && j != 0) { in FormGradient()
371 ind = k - nx; in FormGradient()
380 if (i != nx && j != ny) { in FormGradient()
396 PetscCall(PetscLogFlops(24.0 * nx * ny)); in FormGradient()
522 PetscInt nx, ny, i, j, k, ind; in HessianProduct() local
525 nx = user->mx; in HessianProduct()
541 for (i = -1; i < nx; i++) { in HessianProduct()
542 k = nx * j + i; in HessianProduct()
547 if (i != nx - 1 && j != -1) { in HessianProduct()
554 vt = s[k + nx]; in HessianProduct()
555 ind = k + nx; in HessianProduct()
569 for (i = 0; i <= nx; i++) { in HessianProduct()
570 k = nx * j + i; in HessianProduct()
574 if (i != nx && j != ny) v = s[k]; in HessianProduct()
575 if (i != nx && j != 0) { in HessianProduct()
576 vb = s[k - nx]; in HessianProduct()
577 ind = k - nx; in HessianProduct()
587 if (i != nx && j != ny) { in HessianProduct()
605 PetscCall(PetscLogFlops(18.0 * nx * ny)); in HessianProduct()