Lines Matching refs:zctx
29 ZoomCtx *zctx = (ZoomCtx *)ctx; in VecView_MPI_Draw_DA2d_Zoom() local
36 m = zctx->m; in VecView_MPI_Draw_DA2d_Zoom()
37 n = zctx->n; in VecView_MPI_Draw_DA2d_Zoom()
38 dof = zctx->dof; in VecView_MPI_Draw_DA2d_Zoom()
39 k = zctx->k; in VecView_MPI_Draw_DA2d_Zoom()
40 xy = zctx->xy; in VecView_MPI_Draw_DA2d_Zoom()
41 v = zctx->v; in VecView_MPI_Draw_DA2d_Zoom()
42 min = zctx->min; in VecView_MPI_Draw_DA2d_Zoom()
43 max = zctx->max; in VecView_MPI_Draw_DA2d_Zoom()
71 if (zctx->showgrid) { in VecView_MPI_Draw_DA2d_Zoom()
79 if (zctx->showaxis && !zctx->rank) { in VecView_MPI_Draw_DA2d_Zoom()
80 if (zctx->name0 || zctx->name1) { in VecView_MPI_Draw_DA2d_Zoom()
87 if (zctx->name0) PetscCall(PetscDrawString(draw, x, yl, PETSC_DRAW_BLACK, zctx->name0)); in VecView_MPI_Draw_DA2d_Zoom()
88 … if (zctx->name1) PetscCall(PetscDrawStringVertical(draw, xl, y, PETSC_DRAW_BLACK, zctx->name1)); in VecView_MPI_Draw_DA2d_Zoom()
95 double xmin = (double)zctx->xmin, ymin = (double)zctx->ymin; in VecView_MPI_Draw_DA2d_Zoom()
96 double xmax = (double)zctx->xmax, ymax = (double)zctx->ymax; in VecView_MPI_Draw_DA2d_Zoom()
128 ZoomCtx zctx; in VecView_MPI_Draw_DA2d() local
136 zctx.showgrid = PETSC_FALSE; in VecView_MPI_Draw_DA2d()
137 zctx.showaxis = PETSC_TRUE; in VecView_MPI_Draw_DA2d()
149 PetscCallMPI(MPI_Comm_rank(comm, &zctx.rank)); in VecView_MPI_Draw_DA2d()
151 …PetscCall(DMDAGetInfo(da, NULL, &M, &N, NULL, &zctx.m, &zctx.n, NULL, &w, &s, &bx, &by, NULL, &st)… in VecView_MPI_Draw_DA2d()
166 …e2d(comm, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DMDA_STENCIL_BOX, M, N, zctx.m, zctx.n, w, 1, lx, ly… in VecView_MPI_Draw_DA2d()
199 PetscCall(VecGetArrayRead(xlocal, &zctx.v)); in VecView_MPI_Draw_DA2d()
213 PetscCall(VecStrideMin(xcoor, 0, NULL, &zctx.xmin)); in VecView_MPI_Draw_DA2d()
214 PetscCall(VecStrideMax(xcoor, 0, NULL, &zctx.xmax)); in VecView_MPI_Draw_DA2d()
215 PetscCall(VecStrideMin(xcoor, 1, NULL, &zctx.ymin)); in VecView_MPI_Draw_DA2d()
216 PetscCall(VecStrideMax(xcoor, 1, NULL, &zctx.ymax)); in VecView_MPI_Draw_DA2d()
217 PetscCall(PetscOptionsGetBool(NULL, NULL, "-draw_contour_axis", &zctx.showaxis, NULL)); in VecView_MPI_Draw_DA2d()
218 if (zctx.showaxis) { in VecView_MPI_Draw_DA2d()
219 coors[0] = zctx.xmin - .05 * (zctx.xmax - zctx.xmin); in VecView_MPI_Draw_DA2d()
220 coors[1] = zctx.ymin - .05 * (zctx.ymax - zctx.ymin); in VecView_MPI_Draw_DA2d()
221 coors[2] = zctx.xmax + .05 * (zctx.xmax - zctx.xmin); in VecView_MPI_Draw_DA2d()
222 coors[3] = zctx.ymax + .05 * (zctx.ymax - zctx.ymin); in VecView_MPI_Draw_DA2d()
224 coors[0] = zctx.xmin; in VecView_MPI_Draw_DA2d()
225 coors[1] = zctx.ymin; in VecView_MPI_Draw_DA2d()
226 coors[2] = zctx.xmax; in VecView_MPI_Draw_DA2d()
227 coors[3] = zctx.ymax; in VecView_MPI_Draw_DA2d()
238 …e2d(comm, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DMDA_STENCIL_BOX, M, N, zctx.m, zctx.n, 2, 1, lx, ly… in VecView_MPI_Draw_DA2d()
248 PetscCall(VecGetArrayRead(xcoorl, &zctx.xy)); in VecView_MPI_Draw_DA2d()
249 PetscCall(DMDAGetCoordinateName(da, 0, &zctx.name0)); in VecView_MPI_Draw_DA2d()
250 PetscCall(DMDAGetCoordinateName(da, 1, &zctx.name1)); in VecView_MPI_Draw_DA2d()
255 …PetscCall(DMDAGetInfo(dac, NULL, &M, &N, NULL, NULL, NULL, NULL, &zctx.dof, NULL, &bx, &by, NULL, … in VecView_MPI_Draw_DA2d()
256 PetscCall(DMDAGetGhostCorners(dac, NULL, NULL, NULL, &zctx.m, &zctx.n, NULL)); in VecView_MPI_Draw_DA2d()
257 PetscCall(PetscOptionsGetBool(NULL, NULL, "-draw_contour_grid", &zctx.showgrid, NULL)); in VecView_MPI_Draw_DA2d()
274 zctx.k = displayfields[i]; in VecView_MPI_Draw_DA2d()
277 PetscCall(VecStrideMin(xin, zctx.k, NULL, &zctx.min)); in VecView_MPI_Draw_DA2d()
278 PetscCall(VecStrideMax(xin, zctx.k, NULL, &zctx.max)); in VecView_MPI_Draw_DA2d()
279 if (zctx.k < nbounds) { in VecView_MPI_Draw_DA2d()
280 zctx.min = bounds[2 * zctx.k]; in VecView_MPI_Draw_DA2d()
281 zctx.max = bounds[2 * zctx.k + 1]; in VecView_MPI_Draw_DA2d()
283 if (zctx.min == zctx.max) { in VecView_MPI_Draw_DA2d()
284 zctx.min -= 1.e-12; in VecView_MPI_Draw_DA2d()
285 zctx.max += 1.e-12; in VecView_MPI_Draw_DA2d()
287 …PetscCall(PetscInfo(da, "DMDA 2d contour plot min %g max %g\n", (double)zctx.min, (double)zctx.max… in VecView_MPI_Draw_DA2d()
294 PetscCall(DMDAGetFieldName(da, zctx.k, &title)); in VecView_MPI_Draw_DA2d()
299 PetscCall(PetscDrawScalePopup(popup, zctx.min, zctx.max)); in VecView_MPI_Draw_DA2d()
301 PetscCall(PetscDrawZoom(draw, VecView_MPI_Draw_DA2d_Zoom, &zctx)); in VecView_MPI_Draw_DA2d()
311 PetscCall(VecRestoreArrayRead(xcoorl, &zctx.xy)); in VecView_MPI_Draw_DA2d()
312 PetscCall(VecRestoreArrayRead(xlocal, &zctx.v)); in VecView_MPI_Draw_DA2d()