Lines Matching refs:dg

31   TS_DiscGrad *dg = (TS_DiscGrad *)ts->data;  in TSDiscGradGetX0AndXdot()  local
40 else *Xdot = dg->Xdot; in TSDiscGradGetX0AndXdot()
108 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSSetUp_DiscGrad() local
112 if (!dg->X) PetscCall(VecDuplicate(ts->vec_sol, &dg->X)); in TSSetUp_DiscGrad()
113 if (!dg->X0) PetscCall(VecDuplicate(ts->vec_sol, &dg->X0)); in TSSetUp_DiscGrad()
114 if (!dg->Xdot) PetscCall(VecDuplicate(ts->vec_sol, &dg->Xdot)); in TSSetUp_DiscGrad()
124 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSSetFromOptions_DiscGrad() local
129 …gradient solver", "TSDiscGradSetDGType", DGTypes, (PetscEnum)dg->discgrad, (PetscEnum *)&dg->discg… in TSSetFromOptions_DiscGrad()
147 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSDiscGradGetType_DiscGrad() local
150 *dgtype = dg->discgrad; in TSDiscGradGetType_DiscGrad()
156 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSDiscGradSetType_DiscGrad() local
159 dg->discgrad = dgtype; in TSDiscGradSetType_DiscGrad()
165 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSReset_DiscGrad() local
168 PetscCall(VecDestroy(&dg->X)); in TSReset_DiscGrad()
169 PetscCall(VecDestroy(&dg->X0)); in TSReset_DiscGrad()
170 PetscCall(VecDestroy(&dg->Xdot)); in TSReset_DiscGrad()
195 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSInterpolate_DiscGrad() local
199 PetscCall(VecCopy(ts->vec_sol, dg->X)); in TSInterpolate_DiscGrad()
200 PetscCall(VecWAXPY(X, dt, dg->Xdot, dg->X)); in TSInterpolate_DiscGrad()
221 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSStep_DiscGrad() local
230 if (!ts->steprollback) PetscCall(VecCopy(ts->vec_sol, dg->X0)); in TSStep_DiscGrad()
235 dg->stage_time = ts->ptime + 0.5 * ts->time_step; in TSStep_DiscGrad()
237 PetscCall(VecCopy(dg->X0, dg->X)); in TSStep_DiscGrad()
238 PetscCall(TSPreStage(ts, dg->stage_time)); in TSStep_DiscGrad()
239 PetscCall(TSDiscGrad_SNESSolve(ts, NULL, dg->X)); in TSStep_DiscGrad()
240 PetscCall(TSPostStage(ts, dg->stage_time, 0, &dg->X)); in TSStep_DiscGrad()
241 PetscCall(TSAdaptCheckStage(adapt, ts, dg->stage_time, dg->X, &stageok)); in TSStep_DiscGrad()
245 PetscCall(VecAXPBYPCZ(dg->Xdot, -shift, shift, 0, dg->X0, dg->X)); in TSStep_DiscGrad()
246 PetscCall(VecAXPY(ts->vec_sol, ts->time_step, dg->Xdot)); in TSStep_DiscGrad()
250 PetscCall(VecCopy(dg->X0, ts->vec_sol)); in TSStep_DiscGrad()
271 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSGetStages_DiscGrad() local
275 if (Y) *Y = &dg->X; in TSGetStages_DiscGrad()
288 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in SNESTSFormFunction_DiscGrad() local
318 PetscCall((*dg->Sfunc)(ts, dg->stage_time, x, S, dg->funcCtx)); in SNESTSFormFunction_DiscGrad()
333 if (dg->discgrad == TS_DG_AVERAGE) { in SNESTSFormFunction_DiscGrad()
353 PetscCall((*dg->Gfunc)(ts, dg->stage_time, Xquad, den, dg->funcCtx)); in SNESTSFormFunction_DiscGrad()
361 } else if (dg->discgrad == TS_DG_GONZALEZ) { in SNESTSFormFunction_DiscGrad()
362 PetscCall((*dg->Ffunc)(ts, dg->stage_time, Xp, &F, dg->funcCtx)); in SNESTSFormFunction_DiscGrad()
363 PetscCall((*dg->Ffunc)(ts, dg->stage_time, X0, &F0, dg->funcCtx)); in SNESTSFormFunction_DiscGrad()
364 PetscCall((*dg->Gfunc)(ts, dg->stage_time, x, G, dg->funcCtx)); in SNESTSFormFunction_DiscGrad()
376 } else if (dg->discgrad == TS_DG_NONE) { in SNESTSFormFunction_DiscGrad()
377 PetscCall((*dg->Gfunc)(ts, dg->stage_time, x, G, dg->funcCtx)); in SNESTSFormFunction_DiscGrad()
405 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in SNESTSFormJacobian_DiscGrad() local
417 PetscCall(TSComputeIJacobian(ts, dg->stage_time, x, Xdot, shift, A, B, PETSC_FALSE)); in SNESTSFormJacobian_DiscGrad()
425 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSDiscGradGetFormulation_DiscGrad() local
428 *Sfunc = dg->Sfunc; in TSDiscGradGetFormulation_DiscGrad()
429 *Ffunc = dg->Ffunc; in TSDiscGradGetFormulation_DiscGrad()
430 *Gfunc = dg->Gfunc; in TSDiscGradGetFormulation_DiscGrad()
436 TS_DiscGrad *dg = (TS_DiscGrad *)ts->data; in TSDiscGradSetFormulation_DiscGrad() local
439 dg->Sfunc = Sfunc; in TSDiscGradSetFormulation_DiscGrad()
440 dg->Ffunc = Ffunc; in TSDiscGradSetFormulation_DiscGrad()
441 dg->Gfunc = Gfunc; in TSDiscGradSetFormulation_DiscGrad()
442 dg->funcCtx = ctx; in TSDiscGradSetFormulation_DiscGrad()