| /petsc/src/ts/impls/eimex/ |
| H A D | eimex.c | 17 Vec Ydot; /* f(x)+g(x) Work vector */ member 153 Vec Y0 = ext->VecSolPrev, Y1 = ext->Y, Ydot = ext->Ydot, YdotI = ext->YdotI; in TSInterpolate_EIMEX() local 160 PetscCall(VecZeroEntries(Ydot)); in TSInterpolate_EIMEX() 161 PetscCall(TSComputeIFunction(ts, ts->ptime - h, Y0, Ydot, YdotI, PETSC_FALSE)); in TSInterpolate_EIMEX() 167 PetscCall(TSComputeIFunction(ts, ts->ptime, Y1, Ydot, YdotI, PETSC_FALSE)); in TSInterpolate_EIMEX() 186 PetscCall(VecDestroy(&ext->Ydot)); in TSReset_EIMEX() 203 static PetscErrorCode TSEIMEXGetVecs(TS ts, DM dm, Vec *Z, Vec *Ydot, Vec *YdotI, Vec *YdotRHS) in TSEIMEXGetVecs() argument 212 if (Ydot) { in TSEIMEXGetVecs() 213 if (dm && dm != ts->dm) PetscCall(DMGetNamedGlobalVector(dm, "TSEIMEX_Ydot", Ydot)); in TSEIMEXGetVecs() 214 else *Ydot = ext->Ydot; in TSEIMEXGetVecs() [all …]
|
| /petsc/src/ts/tutorials/ |
| H A D | ex36.c | 47 static PetscErrorCode IFunctionImplicit(TS ts, PetscReal t, Vec Y, Vec Ydot, Vec F, PetscCtx ctx) in IFunctionImplicit() argument 55 PetscCall(VecGetArrayRead(Ydot, &ydot)); in IFunctionImplicit() 65 PetscCall(VecRestoreArrayRead(Ydot, &ydot)); in IFunctionImplicit() 73 static PetscErrorCode IJacobianImplicit(TS ts, PetscReal t, Vec Y, Vec Ydot, PetscReal a, Mat A, Ma… in IJacobianImplicit() argument 81 PetscCall(VecGetArrayRead(Ydot, &ydot)); in IJacobianImplicit() 102 PetscCall(VecRestoreArrayRead(Ydot, &ydot)); in IJacobianImplicit()
|
| H A D | ex31.c | 100 PetscErrorCode IFunction_Hull1972A1(TS ts, PetscReal t, Vec Y, Vec Ydot, Vec F, void *s) in IFunction_Hull1972A1() argument 112 PetscCall(VecAYPX(F, -1.0, Ydot)); in IFunction_Hull1972A1() 116 PetscErrorCode IJacobian_Hull1972A1(TS ts, PetscReal t, Vec Y, Vec Ydot, PetscReal a, Mat A, Mat B,… in IJacobian_Hull1972A1() argument 163 PetscErrorCode IFunction_Hull1972A2(TS ts, PetscReal t, Vec Y, Vec Ydot, Vec F, void *s) in IFunction_Hull1972A2() argument 175 PetscCall(VecAYPX(F, -1.0, Ydot)); in IFunction_Hull1972A2() 179 PetscErrorCode IJacobian_Hull1972A2(TS ts, PetscReal t, Vec Y, Vec Ydot, PetscReal a, Mat A, Mat B,… in IJacobian_Hull1972A2() argument 226 PetscErrorCode IFunction_Hull1972A3(TS ts, PetscReal t, Vec Y, Vec Ydot, Vec F, void *s) in IFunction_Hull1972A3() argument 238 PetscCall(VecAYPX(F, -1.0, Ydot)); in IFunction_Hull1972A3() 242 PetscErrorCode IJacobian_Hull1972A3(TS ts, PetscReal t, Vec Y, Vec Ydot, PetscReal a, Mat A, Mat B,… in IJacobian_Hull1972A3() argument 289 PetscErrorCode IFunction_Hull1972A4(TS ts, PetscReal t, Vec Y, Vec Ydot, Vec F, void *s) in IFunction_Hull1972A4() argument [all …]
|
| /petsc/src/ts/impls/rosw/ |
| H A D | rosw.c | 53 Vec Ydot; /* Work vector holding Ydot during residual evaluation */ member 1134 Vec *Y = ros->Y, Ydot = ros->Ydot, Zdot = ros->Zdot, Zstage = ros->Zstage; in TSStep_RosW() local 1187 PetscCall(VecZeroEntries(Ydot)); /* Evaluate Y[i]=G(t,Ydot=0,Zstage) */ in TSStep_RosW() 1188 PetscCall(TSComputeIFunction(ts, ros->stage_time, Zstage, Ydot, Y[i], PETSC_FALSE)); in TSStep_RosW() 1198 … PetscCall(TSComputeIJacobian(ts, ros->stage_time, ts->vec_sol, Ydot, 0, J, Jp, PETSC_FALSE)); in TSStep_RosW() 1308 PetscCall(VecDestroy(&ros->Ydot)); in TSReset_RosW() 1316 static PetscErrorCode TSRosWGetVecs(TS ts, DM dm, Vec *Ydot, Vec *Zdot, Vec *Ystage, Vec *Zstage) in TSRosWGetVecs() argument 1321 if (Ydot) { in TSRosWGetVecs() 1322 if (dm && dm != ts->dm) PetscCall(DMGetNamedGlobalVector(dm, "TSRosW_Ydot", Ydot)); in TSRosWGetVecs() 1323 else *Ydot = rw->Ydot; in TSRosWGetVecs() [all …]
|
| /petsc/src/ts/impls/implicit/glle/ |
| H A D | glle.c | 43 else *Ydotstage = gl->Ydot[gl->stage]; in TSGLLEGetVecs() 69 Vec Ydot, Ydot_c; in DMRestrictHook_TSGLLE() local 72 PetscCall(TSGLLEGetVecs(ts, fine, NULL, &Ydot)); in DMRestrictHook_TSGLLE() 74 PetscCall(MatRestrict(restrct, Ydot, Ydot_c)); in DMRestrictHook_TSGLLE() 76 PetscCall(TSGLLERestoreVecs(ts, fine, NULL, &Ydot)); in DMRestrictHook_TSGLLE() 90 Vec Ydot, Ydot_s; in DMSubDomainRestrictHook_TSGLLE() local 93 PetscCall(TSGLLEGetVecs(ts, dm, NULL, &Ydot)); in DMSubDomainRestrictHook_TSGLLE() 96 PetscCall(VecScatterBegin(gscat, Ydot, Ydot_s, INSERT_VALUES, SCATTER_FORWARD)); in DMSubDomainRestrictHook_TSGLLE() 97 PetscCall(VecScatterEnd(gscat, Ydot, Ydot_s, INSERT_VALUES, SCATTER_FORWARD)); in DMSubDomainRestrictHook_TSGLLE() 99 PetscCall(TSGLLERestoreVecs(ts, dm, NULL, &Ydot)); in DMSubDomainRestrictHook_TSGLLE() [all …]
|
| H A D | glle.h | 61 Vec *Ydot; /* Derivatives of stage vectors, must be stored */ member
|
| /petsc/src/ts/impls/glee/ |
| H A D | glee.c | 55 Vec Ydot; /* Work vector holding Ydot during residual evaluation */ member 637 PetscCall(VecDestroy(&glee->Ydot)); in TSReset_GLEE() 644 static PetscErrorCode TSGLEEGetVecs(TS ts, DM dm, Vec *Ydot) in TSGLEEGetVecs() argument 649 if (Ydot) { in TSGLEEGetVecs() 650 if (dm && dm != ts->dm) PetscCall(DMGetNamedGlobalVector(dm, "TSGLEE_Ydot", Ydot)); in TSGLEEGetVecs() 651 else *Ydot = glee->Ydot; in TSGLEEGetVecs() 656 static PetscErrorCode TSGLEERestoreVecs(TS ts, DM dm, Vec *Ydot) in TSGLEERestoreVecs() argument 659 if (Ydot) { in TSGLEERestoreVecs() 660 if (dm && dm != ts->dm) PetscCall(DMRestoreNamedGlobalVector(dm, "TSGLEE_Ydot", Ydot)); in TSGLEERestoreVecs() 672 Vec Ydot; in SNESTSFormFunction_GLEE() local [all …]
|
| /petsc/src/ts/impls/bdf/ |
| H A D | bdf.c | 55 static PetscErrorCode TSBDF_GetVecs(TS ts, DM dm, Vec *Xdot, Vec *Ydot) in TSBDF_GetVecs() argument 62 PetscCall(DMGetNamedGlobalVector(dm, "TSBDF_Vec_Ydot", Ydot)); in TSBDF_GetVecs() 65 *Ydot = bdf->vec_wrk; in TSBDF_GetVecs() 70 static PetscErrorCode TSBDF_RestoreVecs(TS ts, DM dm, Vec *Xdot, Vec *Ydot) in TSBDF_RestoreVecs() argument 77 PetscCall(DMRestoreNamedGlobalVector(dm, "TSBDF_Vec_Ydot", Ydot)); in TSBDF_RestoreVecs() 80 …PetscCheck(*Ydot == bdf->vec_wrk, PetscObjectComm((PetscObject)ts), PETSC_ERR_ARG_INCOMP, "Vec doe… in TSBDF_RestoreVecs() 82 *Ydot = NULL; in TSBDF_RestoreVecs() 96 Vec Ydot, Ydot_c; in DMRestrictHook_TSBDF() local 100 PetscCall(TSBDF_GetVecs(ts, fine, &Xdot, &Ydot)); in DMRestrictHook_TSBDF() 103 PetscCall(MatRestrict(restrct, Ydot, Ydot_c)); in DMRestrictHook_TSBDF() [all …]
|
| /petsc/src/ts/impls/implicit/irk/ |
| H A D | irk.c | 37 Vec Ydot; /* Work vector holding time derivatives during residual evaluation */ member 421 PetscCall(VecDestroy(&irk->Ydot)); in TSReset_IRK() 464 Vec U, *YdotI = irk->YdotI, Ydot = irk->Ydot, *Y = irk->Y; in SNESTSFormFunction_IRK() local 475 PetscCall(VecZeroEntries(Ydot)); in SNESTSFormFunction_IRK() 476 for (j = 0; j < nstages; j++) PetscCall(VecAXPY(Ydot, A_inv[j * nstages + i] / h, Y[j])); in SNESTSFormFunction_IRK() 477 …PetscCall(VecAXPY(Ydot, -A_inv_rowsum[i] / h, U)); /* Ydot = (S \otimes In)*Z - (Se \otimes In) U … in SNESTSFormFunction_IRK() 478 …PetscCall(TSComputeIFunction(ts, ts->ptime + ts->time_step * c[i], Y[i], Ydot, YdotI[i], PETSC_FAL… in SNESTSFormFunction_IRK() 499 Vec *Y = irk->Y, Ydot = irk->Ydot; in SNESTSFormJacobian_IRK() local 514 …PetscCall(TSComputeIJacobian(ts, ts->ptime + ts->time_step * c[nstages - 1], Y[nstages - 1], Ydot,… in SNESTSFormJacobian_IRK() 581 if (!irk->Ydot) PetscCall(VecDuplicate(ts->vec_sol, &irk->Ydot)); in TSSetUp_IRK()
|
| /petsc/src/ts/impls/arkimex/ |
| H A D | fsarkimex.c | 37 Vec Z = ark->Z, Ydot = ark->Ydot, Y = ark->Y_snes; in SNESTSFormFunction_ARKIMEX_FastSlowSplit() local 45 PetscCall(VecAXPBYPCZ(Ydot, -shift, shift, 0, Z, X)); /* Ydot = shift*(X-Z) */ in SNESTSFormFunction_ARKIMEX_FastSlowSplit() 48 PetscCall(TSComputeIFunction(ark->subts_fast, ark->stage_time, Y, Ydot, F, ark->imex)); in SNESTSFormFunction_ARKIMEX_FastSlowSplit() 58 Vec Z = ark->Z, Ydot = ark->Ydot, Y = ark->Y_snes; in SNESTSFormJacobian_ARKIMEX_FastSlowSplit() local 69 PetscCall(TSComputeIJacobian(ark->subts_fast, ark->stage_time, Y, Ydot, shift, A, B, ark->imex)); in SNESTSFormJacobian_ARKIMEX_FastSlowSplit() 221 …Vec *Y = ark->Y, Ydot_fast = ark->Ydot, Ydot0_fast = ark->Ydot0, Z = ark->Z, *YdotRHS_… in TSStep_ARKIMEX_FastSlowSplit() 420 PetscCall(VecDestroy(&ark->Ydot)); in TSSetUp_ARKIMEX_FastSlowSplit() 435 PetscCall(VecDuplicate(Xfast, &ark->Ydot)); in TSSetUp_ARKIMEX_FastSlowSplit() 480 PetscCall(VecDestroy(&ark->Ydot)); in TSReset_ARKIMEX_FastSlowSplit()
|
| H A D | arkimex.c | 1337 …Vec *Y = ark->Y, *YdotI = ark->YdotI, *YdotRHS = ark->YdotRHS, Ydot = ark->Ydot, Ydot0… in TSStep_ARKIMEX() local 1492 PetscCall(VecZeroEntries(Ydot)); in TSStep_ARKIMEX() 1493 …PetscCall(TSComputeIFunction(ts, t + h * ct[i], Y[i], Ydot, YdotI[i], ark->imex)); /* YdotI = -G(t… in TSStep_ARKIMEX() 1567 …Vec *Y = ark->Y, Ydot = ark->Ydot, *VecsDeltaLam = ark->VecsDeltaLam, *VecsSensiTemp =… in TSAdjointStep_ARKIMEX() local 1591 …PetscCall(TSComputeIJacobianP(ts, ark->stage_time, Y[i], Ydot, ark->scoeff / adjoint_time_step, ts… in TSAdjointStep_ARKIMEX() 1769 PetscCall(VecDestroy(&ark->Ydot)); in TSReset_ARKIMEX() 1789 static PetscErrorCode TSARKIMEXGetVecs(TS ts, DM dm, Vec *Z, Vec *Ydot) in TSARKIMEXGetVecs() argument 1798 if (Ydot) { in TSARKIMEXGetVecs() 1799 if (dm && dm != ts->dm) PetscCall(DMGetNamedGlobalVector(dm, "TSARKIMEX_Ydot", Ydot)); in TSARKIMEXGetVecs() 1800 else *Ydot = ax->Ydot; in TSARKIMEXGetVecs() [all …]
|
| H A D | arkimex.h | 32 Vec Ydot; /* Work vector holding Ydot during residual evaluation */ member
|