Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 652) sorted by relevance

12345678910>>...27

/petsc/src/ts/tutorials/power_grid/
H A Dex3opt.c24 PetscErrorCode monitor(Tao tao, AppCtx *ctx) in monitor() argument
45 AppCtx ctx; in main() local
69 ctx.beta = 2; in main()
70 ctx.c = 10000.0; in main()
71 ctx.u_s = 1.0; in main()
72 ctx.omega_s = 1.0; in main()
73 ctx.omega_b = 120.0 * PETSC_PI; in main()
74 ctx.H = 5.0; in main()
75 PetscCall(PetscOptionsScalar("-Inertia", "", "", ctx.H, &ctx.H, NULL)); in main()
76 ctx.D = 5.0; in main()
[all …]
H A Dex3sa.c30 AppCtx ctx; in main() local
55 PetscCall(MatCreate(PETSC_COMM_WORLD, &ctx.Jac)); in main()
56 PetscCall(MatSetSizes(ctx.Jac, n, n, PETSC_DETERMINE, PETSC_DETERMINE)); in main()
57 PetscCall(MatSetType(ctx.Jac, MATDENSE)); in main()
58 PetscCall(MatSetFromOptions(ctx.Jac)); in main()
59 PetscCall(MatSetUp(ctx.Jac)); in main()
60 PetscCall(MatCreateVecs(ctx.Jac, &U, NULL)); in main()
61 PetscCall(MatCreate(PETSC_COMM_WORLD, &ctx.Jacp)); in main()
62 PetscCall(MatSetSizes(ctx.Jacp, PETSC_DECIDE, PETSC_DECIDE, 2, 1)); in main()
63 PetscCall(MatSetFromOptions(ctx.Jacp)); in main()
[all …]
H A Dex9.c41 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunction() argument
50 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSFunction()
51 else Pmax = ctx->Pmax; in RHSFunction()
53 f[0] = ctx->omega_b * (u[1] - ctx->omega_s); in RHSFunction()
54 …f[1] = (-Pmax * PetscSinScalar(u[0]) - ctx->D * (u[1] - ctx->omega_s) + ctx->Pm) * ctx->omega_s / … in RHSFunction()
64 static PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec U, Mat A, Mat B, AppCtx *ctx) in RHSJacobian() argument
72 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSJacobian()
73 else Pmax = ctx->Pmax; in RHSJacobian()
76 J[0][1] = ctx->omega_b; in RHSJacobian()
77 J[1][1] = -ctx->D * ctx->omega_s / (2.0 * ctx->H); in RHSJacobian()
[all …]
H A Dex3.c41 AppCtx ctx; in main() local
72 ctx.omega_b = 1.0; in main()
73 ctx.omega_s = 2.0 * PETSC_PI * 60.0; in main()
74 ctx.H = 5.0; in main()
75 PetscCall(PetscOptionsScalar("-Inertia", "", "", ctx.H, &ctx.H, NULL)); in main()
76 ctx.D = 5.0; in main()
77 PetscCall(PetscOptionsScalar("-D", "", "", ctx.D, &ctx.D, NULL)); in main()
78 ctx.E = 1.1378; in main()
79 ctx.V = 1.0; in main()
80 ctx.X = 0.545; in main()
[all …]
H A Dex9opt.c47 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunction() argument
56 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSFunction()
57 else Pmax = ctx->Pmax; in RHSFunction()
59 f[0] = ctx->omega_b * (u[1] - ctx->omega_s); in RHSFunction()
60 …f[1] = (-Pmax * PetscSinScalar(u[0]) - ctx->D * (u[1] - ctx->omega_s) + ctx->Pm) * ctx->omega_s / … in RHSFunction()
70 static PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec U, Mat A, Mat B, AppCtx *ctx) in RHSJacobian() argument
78 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSJacobian()
79 else Pmax = ctx->Pmax; in RHSJacobian()
82 J[0][1] = ctx->omega_b; in RHSJacobian()
83 J[1][1] = -ctx->D * ctx->omega_s / (2.0 * ctx->H); in RHSJacobian()
[all …]
H A Dex2.c41 static PetscErrorCode IFunction(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunction() argument
51 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in IFunction()
52 else if (t >= ctx->tcl) Pmax = ctx->E / 0.745; in IFunction()
53 else Pmax = ctx->Pmax; in IFunction()
54 f[0] = udot[0] - ctx->omega_s * (u[1] - 1.0); in IFunction()
55 f[1] = 2.0 * ctx->H * udot[1] + Pmax * PetscSinScalar(u[0]) + ctx->D * (u[1] - 1.0) - ctx->Pm; in IFunction()
66 …tscErrorCode IJacobian(TS ts, PetscReal t, Vec U, Vec Udot, PetscReal a, Mat A, Mat B, AppCtx *ctx) in IJacobian() argument
75 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in IJacobian()
76 else if (t >= ctx->tcl) Pmax = ctx->E / 0.745; in IJacobian()
77 else Pmax = ctx->Pmax; in IJacobian()
[all …]
H A Dex9adj.c57 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunction() argument
66 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSFunction()
67 else Pmax = ctx->Pmax; in RHSFunction()
69 f[0] = ctx->omega_b * (u[1] - ctx->omega_s); in RHSFunction()
70 …f[1] = (-Pmax * PetscSinScalar(u[0]) - ctx->D * (u[1] - ctx->omega_s) + ctx->Pm) * ctx->omega_s / … in RHSFunction()
80 static PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec U, Mat A, Mat B, AppCtx *ctx) in RHSJacobian() argument
88 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSJacobian()
89 else Pmax = ctx->Pmax; in RHSJacobian()
92 J[0][1] = ctx->omega_b; in RHSJacobian()
93 J[1][1] = -ctx->D * ctx->omega_s / (2.0 * ctx->H); in RHSJacobian()
[all …]
/petsc/src/tao/tutorials/
H A Dex4.c38 static PetscErrorCode CreateRHS(UserCtx ctx) in CreateRHS() argument
42 PetscCall(VecCreate(PETSC_COMM_WORLD, &ctx->d)); in CreateRHS()
43 PetscCall(VecSetSizes(ctx->d, PETSC_DECIDE, ctx->m)); in CreateRHS()
44 PetscCall(VecSetFromOptions(ctx->d)); in CreateRHS()
45 PetscCall(VecSetRandom(ctx->d, ctx->rctx)); in CreateRHS()
49 static PetscErrorCode CreateMatrix(UserCtx ctx) in CreateMatrix() argument
56 PetscCall(MatCreate(PETSC_COMM_WORLD, &ctx->F)); in CreateMatrix()
57 PetscCall(MatSetSizes(ctx->F, PETSC_DECIDE, PETSC_DECIDE, ctx->m, ctx->n)); in CreateMatrix()
58 …PetscCall(MatSetType(ctx->F, MATAIJ)); /* TODO: Decide specific SetType o… in CreateMatrix()
59 …PetscCall(MatMPIAIJSetPreallocation(ctx->F, 5, NULL, 5, NULL)); /*TODO: some number other than 5?*/ in CreateMatrix()
[all …]
/petsc/src/snes/tutorials/
H A Dex5f90t.F9069 subroutine FormFunction(snesIn, X, F, ctx, ierr) argument
74 type(AppCtx) ctx
84 PetscCall(DMGetLocalVector(ctx%da, localX, ierr))
85 PetscCall(DMGlobalToLocalBegin(ctx%da, X, INSERT_VALUES, localX, ierr))
86 PetscCall(DMGlobalToLocalEnd(ctx%da, X, INSERT_VALUES, localX, ierr))
97 PetscCall(FormFunctionLocal(lx_v, lf_v, ctx, ierr))
105 PetscCall(DMRestoreLocalVector(ctx%da, localX, ierr))
106 PetscCall(PetscLogFlops(11.0d0*ctx%ym*ctx%xm, ierr))
174 subroutine InitialGuessLocal(ctx, x, ierr) argument
176 type(AppCtx) ctx local
[all …]
H A Dex5f90.F9069 subroutine FormFunction(snes, X, F, ctx, ierr) argument
76 type(AppCtx) ctx
103 PetscCall(FormFunctionLocal(lx_v, lf_v, ctx, ierr))
112 PetscCall(PetscLogFlops(11.0d0*ctx%ym*ctx%xm, ierr))
139 type(AppCtx), pointer:: ctx
149 PetscCallA(SNESGetApplicationContext(snes, ctx, ierr))
160 PetscCallA(InitialGuessLocal(ctx, lx_v, ierr))
184 subroutine InitialGuessLocal(ctx, x, ierr) argument
186 type(AppCtx) ctx local
187 PetscScalar x(ctx%xs:ctx%xe, ctx%ys:ctx%ye)
[all …]
/petsc/src/ts/event/tests/
H A Dex4.c41 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx);
42 …nt(TS ts, PetscInt nev_zero, PetscInt evs_zero[], PetscReal t, Vec U, PetscBool fwd, PetscCtx ctx);
54 AppCtx ctx; in main() local
59 PetscCallMPI(MPI_Comm_rank(PETSC_COMM_WORLD, &ctx.rank)); in main()
60 PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &ctx.size)); in main()
61 ctx.pi = PetscAcosReal(-1.0); in main()
62 ctx.cnt = 0; in main()
63 ctx.cntref = 0; in main()
64 ctx.flg = PETSC_FALSE; in main()
65 ctx.errtol = 1e-5; in main()
[all …]
/petsc/src/ml/regressor/tests/
H A Dex3.c17 static PetscErrorCode DestroyCtx(AppCtx *ctx) in DestroyCtx() argument
20 PetscCall(MatDestroy(&(*ctx)->X)); in DestroyCtx()
21 PetscCall(VecDestroy(&(*ctx)->y)); in DestroyCtx()
22 PetscCall(VecDestroy(&(*ctx)->y_predicted)); in DestroyCtx()
23 PetscCall(PetscFree(*ctx)); in DestroyCtx()
27 static PetscErrorCode TestRegressorViews(PetscRegressor regressor, AppCtx ctx) in TestRegressorViews() argument
33 if (ctx->flg_view_sol) { in TestRegressorViews()
35 PetscCall(VecView(ctx->y, PETSC_VIEWER_STDOUT_WORLD)); in TestRegressorViews()
37 PetscCall(VecView(ctx->y_predicted, PETSC_VIEWER_STDOUT_WORLD)); in TestRegressorViews()
39 PetscCall(VecView(ctx->coefficients, PETSC_VIEWER_STDOUT_WORLD)); in TestRegressorViews()
[all …]
/petsc/src/ts/tutorials/multirate/
H A Dex8.c33 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsRiemann_Advect() local
37 speed = ctx->a; in PhysicsRiemann_Advect()
45 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsCharacteristic_Advect() local
50 speeds[0] = ctx->a; in PhysicsCharacteristic_Advect()
56 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsSample_Advect() local
57 PetscReal a = ctx->a, x0; in PhysicsSample_Advect()
101 static PetscErrorCode PhysicsCreate_Advect(FVCtx *ctx) in PhysicsCreate_Advect() argument
107 ctx->physics2.sample2 = PhysicsSample_Advect; in PhysicsCreate_Advect()
108 ctx->physics2.riemann2 = PhysicsRiemann_Advect; in PhysicsCreate_Advect()
109 ctx->physics2.characteristic2 = PhysicsCharacteristic_Advect; in PhysicsCreate_Advect()
[all …]
H A Dex6.c40 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsRiemann_Advect() local
44 speed = ctx->a; in PhysicsRiemann_Advect()
52 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsCharacteristic_Advect() local
57 speeds[0] = ctx->a; in PhysicsCharacteristic_Advect()
63 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsSample_Advect() local
64 PetscReal a = ctx->a, x0; in PhysicsSample_Advect()
108 static PetscErrorCode PhysicsCreate_Advect(FVCtx *ctx) in PhysicsCreate_Advect() argument
114 ctx->physics2.sample2 = PhysicsSample_Advect; in PhysicsCreate_Advect()
115 ctx->physics2.riemann2 = PhysicsRiemann_Advect; in PhysicsCreate_Advect()
116 ctx->physics2.characteristic2 = PhysicsCharacteristic_Advect; in PhysicsCreate_Advect()
[all …]
H A Dex5.c48 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsRiemann_Advect() local
52 speed = ctx->a; in PhysicsRiemann_Advect()
63 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsCharacteristic_Advect() local
68 if (x < 0) speeds[0] = ctx->a[0]; /* x is discontinuous point of a */ in PhysicsCharacteristic_Advect()
69 else speeds[0] = ctx->a[1]; in PhysicsCharacteristic_Advect()
75 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsSample_Advect() local
76 PetscReal *a = ctx->a, x0; in PhysicsSample_Advect()
161 static PetscErrorCode PhysicsCreate_Advect(FVCtx *ctx) in PhysicsCreate_Advect() argument
167 ctx->physics.sample = PhysicsSample_Advect; in PhysicsCreate_Advect()
168 ctx->physics.riemann = PhysicsRiemann_Advect; in PhysicsCreate_Advect()
[all …]
H A Dex4.c59 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsRiemann_Advect() local
63 speed = ctx->a; in PhysicsRiemann_Advect()
71 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsCharacteristic_Advect() local
76 speeds[0] = ctx->a; in PhysicsCharacteristic_Advect()
82 AdvectCtx *ctx = (AdvectCtx *)vctx; in PhysicsSample_Advect() local
83 PetscReal a = ctx->a, x0; in PhysicsSample_Advect()
127 static PetscErrorCode PhysicsCreate_Advect(FVCtx *ctx) in PhysicsCreate_Advect() argument
133 ctx->physics2.sample2 = PhysicsSample_Advect; in PhysicsCreate_Advect()
134 ctx->physics2.riemann2 = PhysicsRiemann_Advect; in PhysicsCreate_Advect()
135 ctx->physics2.characteristic2 = PhysicsCharacteristic_Advect; in PhysicsCreate_Advect()
[all …]
/petsc/src/ts/utils/dmplexlandau/
H A Dplexland.c88 LandauCtx *ctx = (LandauCtx *)a_ctx; in LandauFormJacobian_Internal() local
102 PetscAssertPointer(ctx, 5); in LandauFormJacobian_Internal()
104 PetscCheck(ctx->plex[0] != NULL, ctx->comm, PETSC_ERR_ARG_WRONG, "Plex not created"); in LandauFormJacobian_Internal()
105 PetscCall(PetscLogEventBegin(ctx->events[10], 0, 0, 0, 0)); in LandauFormJacobian_Internal()
106 PetscCall(DMGetDS(ctx->plex[0], &prob)); // same DS for all grids in LandauFormJacobian_Internal()
109 PetscCheck(ctx->gpu_assembly, ctx->comm, PETSC_ERR_ARG_WRONG, "maps but no GPU assembly"); in LandauFormJacobian_Internal()
111 PetscCheck(maps, ctx->comm, PETSC_ERR_ARG_WRONG, "empty GPU matrix container"); in LandauFormJacobian_Internal()
112 for (PetscInt i = 0; i < ctx->num_grids * ctx->batch_sz; i++) subJ[i] = NULL; in LandauFormJacobian_Internal()
114 PetscCheck(!ctx->gpu_assembly, ctx->comm, PETSC_ERR_ARG_WRONG, "No maps but GPU assembly"); in LandauFormJacobian_Internal()
115 for (PetscInt tid = 0; tid < ctx->batch_sz; tid++) { in LandauFormJacobian_Internal()
[all …]
/petsc/src/dm/impls/stag/tutorials/
H A Dex6.c61 Ctx ctx; in main() local
70 ctx.dim = 2; in main()
71 ctx.rho = 1.0; in main()
72 ctx.lambda = 1.0; in main()
73 ctx.mu = 1.0; in main()
74 ctx.xmin = 0.0; in main()
75 ctx.xmax = 1.0; in main()
76 ctx.ymin = 0.0; in main()
77 ctx.ymax = 1.0; in main()
78 ctx.zmin = 0.0; in main()
[all …]
/petsc/src/dm/impls/swarm/
H A Dswarmpic_sort.c19 static PetscErrorCode DMSwarmSortApplyCellIndexSort(DMSwarmSort ctx) in DMSwarmSortApplyCellIndexSort() argument
22 if (ctx->list) qsort(ctx->list, ctx->npoints, sizeof(SwarmPoint), sort_CompareSwarmPoint); in DMSwarmSortApplyCellIndexSort()
28 DMSwarmSort ctx; in DMSwarmSortCreate() local
31 PetscCall(PetscNew(&ctx)); in DMSwarmSortCreate()
32 ctx->isvalid = PETSC_FALSE; in DMSwarmSortCreate()
33 ctx->ncells = 0; in DMSwarmSortCreate()
34 ctx->npoints = 0; in DMSwarmSortCreate()
35 PetscCall(PetscMalloc1(1, &ctx->pcell_offsets)); in DMSwarmSortCreate()
36 PetscCall(PetscMalloc1(1, &ctx->list)); in DMSwarmSortCreate()
37 *_ctx = ctx; in DMSwarmSortCreate()
[all …]
/petsc/src/ts/tests/
H A Dex9.c47 AppCtx ctx; in main() local
63 PetscCall(TSSetRHSFunction(ts, tsrhs, TSFunctionRHS, &ctx)); in main()
64 PetscCall(TSSetIFunction(ts, NULL, TSFunctionI, &ctx)); in main()
65 ctx.f = f; in main()
66 ctx.F = F; in main()
68 PetscCall(VecCreateMPI(PETSC_COMM_WORLD, 1, PETSC_DETERMINE, &ctx.U)); in main()
69 PetscCall(VecCreateMPI(PETSC_COMM_WORLD, 1, PETSC_DETERMINE, &ctx.V)); in main()
70 PetscCall(VecCreateMPI(PETSC_COMM_WORLD, 1, PETSC_DETERMINE, &ctx.UF)); in main()
71 PetscCall(VecCreateMPI(PETSC_COMM_WORLD, 1, PETSC_DETERMINE, &ctx.VF)); in main()
74 PetscCall(VecScatterCreate(ctx.U, NULL, UV, is, &ctx.scatterU)); in main()
[all …]
H A Dex7.c69 AppCtx ctx; in main() local
85 PetscCall(TSSetRHSFunction(ts, tsrhs, TSFunction, &ctx)); in main()
87 ctx.f = f; in main()
89 PetscCall(SNESCreate(PETSC_COMM_WORLD, &ctx.snes)); in main()
90 PetscCall(SNESSetFromOptions(ctx.snes)); in main()
91 PetscCall(SNESSetFunction(ctx.snes, NULL, SNESFunction, &ctx)); in main()
92 PetscCall(SNESSetJacobian(ctx.snes, NULL, NULL, SNESComputeJacobianDefault, &ctx)); in main()
93 ctx.F = F; in main()
94 PetscCall(VecCreateMPI(PETSC_COMM_WORLD, 1, PETSC_DETERMINE, &ctx.V)); in main()
97 PetscCall(VecCreateMPI(PETSC_COMM_WORLD, 2, PETSC_DETERMINE, &ctx.UV)); in main()
[all …]
/petsc/src/vec/is/sf/tests/
H A Dex18.c16 static PetscErrorCode GetOptions(MPI_Comm comm, AppCtx *ctx) in GetOptions() argument
21 ctx->comm = comm; in GetOptions()
22 ctx->nsfs = 3; in GetOptions()
23 ctx->n = 1; in GetOptions()
24 ctx->leaveStep = 1; in GetOptions()
25 ctx->sparseLeaves = PETSC_FALSE; in GetOptions()
26 ctx->compare = PETSC_FALSE; in GetOptions()
27 ctx->irregular = PETSC_FALSE; in GetOptions()
28 ctx->rootMode = PETSCSF_CONCATENATE_ROOTMODE_LOCAL; in GetOptions()
29 ctx->viewer = NULL; in GetOptions()
[all …]
/petsc/src/ksp/pc/impls/lmvm/
H A Dlmvmpc.c36 PC_LMVM *ctx; in PCLMVMSetUpdateVec() local
44 ctx = (PC_LMVM *)pc->data; in PCLMVMSetUpdateVec()
46 PetscCall(VecDestroy(&ctx->X)); in PCLMVMSetUpdateVec()
47 ctx->X = X; in PCLMVMSetUpdateVec()
48 ctx->Xstate = -1; in PCLMVMSetUpdateVec()
65 PC_LMVM *ctx; in PCLMVMSetMatLMVM() local
75 ctx = (PC_LMVM *)pc->data; in PCLMVMSetMatLMVM()
77 PetscCall(MatDestroy(&ctx->B)); in PCLMVMSetMatLMVM()
78 ctx->B = B; in PCLMVMSetMatLMVM()
97 PC_LMVM *ctx; in PCLMVMGetMatLMVM() local
[all …]
/petsc/src/tao/matrix/
H A Dsubmatfree.c31 MatSubMatFreeCtx ctx; in MatCreateSubMatrixFree() local
35 PetscCall(PetscNew(&ctx)); in MatCreateSubMatrixFree()
36 ctx->A = mat; in MatCreateSubMatrixFree()
39 PetscCall(MatCreateVecs(mat, NULL, &ctx->VC)); in MatCreateSubMatrixFree()
40 ctx->VR = ctx->VC; in MatCreateSubMatrixFree()
43 ctx->Rows = Rows; in MatCreateSubMatrixFree()
44 ctx->Cols = Cols; in MatCreateSubMatrixFree()
47 PetscCall(MatCreateShell(comm, mloc, nloc, m, n, ctx, J)); in MatCreateSubMatrixFree()
69 MatSubMatFreeCtx ctx; in MatSMFResetRowColumn() local
72 PetscCall(MatShellGetContext(mat, &ctx)); in MatSMFResetRowColumn()
[all …]
/petsc/src/sys/classes/draw/interface/
H A Ddtri.c98 ZoomCtx *ctx = (ZoomCtx *)dctx; in PetscDrawTensorContour_Zoom() local
101 …PetscCall(PetscDrawTensorContourPatch(win, ctx->m, ctx->n, ctx->x, ctx->y, ctx->min, ctx->max, ctx in PetscDrawTensorContour_Zoom()
102 if (ctx->showgrid) { in PetscDrawTensorContour_Zoom()
103 …for (i = 0; i < ctx->m; i++) PetscCall(PetscDrawLine(win, ctx->x[i], ctx->y[0], ctx->x[i], ctx->y[ in PetscDrawTensorContour_Zoom()
104 …for (i = 0; i < ctx->n; i++) PetscCall(PetscDrawLine(win, ctx->x[0], ctx->y[i], ctx->x[ctx->m - 1]… in PetscDrawTensorContour_Zoom()
138 ZoomCtx ctx; in PetscDrawTensorContour() local
148 ctx.v = v; in PetscDrawTensorContour()
149 ctx.m = m; in PetscDrawTensorContour()
150 ctx.n = n; in PetscDrawTensorContour()
151 ctx.max = ctx.min = v[0]; in PetscDrawTensorContour()
[all …]

12345678910>>...27