Lines Matching refs:nx
207 PetscInt i, j, k, nx = user->mx, ny = user->my; in FormInitialGuess() local
213 for (i = 0; i < nx; i++) { in FormInitialGuess()
214 k = nx * j + i; in FormInitialGuess()
215 val = PetscMin((PetscMin(i + 1, nx - i)) * hx, temp); in FormInitialGuess()
264 PetscInt nx = user->mx, ny = user->my, i, j, k; in FormFunction() local
272 for (i = -1; i < nx; i++) { in FormFunction()
273 k = nx * j + i; in FormFunction()
278 if (i < nx - 1 && j > -1) vr = x[k + 1]; in FormFunction()
279 if (i > -1 && j < ny - 1) vt = x[k + nx]; in FormFunction()
289 for (i = 0; i <= nx; i++) { in FormFunction()
290 k = nx * j + i; in FormFunction()
294 if (i < nx && j > 0) vb = x[k - nx]; in FormFunction()
296 if (i < nx && j < ny) v = x[k]; in FormFunction()
311 PetscCall(PetscLogFlops(24.0 * nx * ny)); in FormFunction()
331 PetscInt nx = user->mx, ny = user->my, ind, i, j, k; in FormGradient() local
346 for (i = -1; i < nx; i++) { in FormGradient()
347 k = nx * j + i; in FormGradient()
352 if (i < nx - 1 && j > -1) vr = x[k + 1]; in FormGradient()
353 if (i > -1 && j < ny - 1) vt = x[k + nx]; in FormGradient()
361 if (i != nx - 1 && j != -1) { in FormGradient()
367 ind = k + nx; in FormGradient()
376 for (i = 0; i <= nx; i++) { in FormGradient()
377 k = nx * j + i; in FormGradient()
381 if (i < nx && j > 0) vb = x[k - nx]; in FormGradient()
383 if (i < nx && j < ny) v = x[k]; in FormGradient()
386 if (i != nx && j != 0) { in FormGradient()
387 ind = k - nx; in FormGradient()
396 if (i != nx && j != ny) { in FormGradient()
412 PetscCall(PetscLogFlops(24.0 * nx * ny)); in FormGradient()
538 PetscInt nx, ny, i, j, k, ind; in HessianProduct() local
541 nx = user->mx; in HessianProduct()
557 for (i = -1; i < nx; i++) { in HessianProduct()
558 k = nx * j + i; in HessianProduct()
563 if (i != nx - 1 && j != -1) { in HessianProduct()
570 vt = s[k + nx]; in HessianProduct()
571 ind = k + nx; in HessianProduct()
585 for (i = 0; i <= nx; i++) { in HessianProduct()
586 k = nx * j + i; in HessianProduct()
590 if (i != nx && j != ny) v = s[k]; in HessianProduct()
591 if (i != nx && j != 0) { in HessianProduct()
592 vb = s[k - nx]; in HessianProduct()
593 ind = k - nx; in HessianProduct()
603 if (i != nx && j != ny) { in HessianProduct()
621 PetscCall(PetscLogFlops(18.0 * nx * ny)); in HessianProduct()