Lines Matching refs:Xdot
13 …Vec X0, X, Xdot; /* Storage for u^n, u^n + dt a_{11} k_1, and time derivative u^{n+1}_t */ member
45 static PetscErrorCode TSThetaGetX0AndXdot(TS ts, DM dm, Vec *X0, Vec *Xdot) in TSThetaGetX0AndXdot() argument
54 if (Xdot) { in TSThetaGetX0AndXdot()
55 if (dm && dm != ts->dm) PetscCall(DMGetNamedGlobalVector(dm, "TSTheta_Xdot", Xdot)); in TSThetaGetX0AndXdot()
56 else *Xdot = th->Xdot; in TSThetaGetX0AndXdot()
61 static PetscErrorCode TSThetaRestoreX0AndXdot(TS ts, DM dm, Vec *X0, Vec *Xdot) in TSThetaRestoreX0AndXdot() argument
67 if (Xdot) { in TSThetaRestoreX0AndXdot()
68 if (dm && dm != ts->dm) PetscCall(DMRestoreNamedGlobalVector(dm, "TSTheta_Xdot", Xdot)); in TSThetaRestoreX0AndXdot()
82 Vec X0, Xdot, X0_c, Xdot_c; in DMRestrictHook_TSTheta() local
85 PetscCall(TSThetaGetX0AndXdot(ts, fine, &X0, &Xdot)); in DMRestrictHook_TSTheta()
88 PetscCall(MatRestrict(restrct, Xdot, Xdot_c)); in DMRestrictHook_TSTheta()
91 PetscCall(TSThetaRestoreX0AndXdot(ts, fine, &X0, &Xdot)); in DMRestrictHook_TSTheta()
105 Vec X0, Xdot, X0_sub, Xdot_sub; in DMSubDomainRestrictHook_TSTheta() local
108 PetscCall(TSThetaGetX0AndXdot(ts, dm, &X0, &Xdot)); in DMSubDomainRestrictHook_TSTheta()
114 PetscCall(VecScatterBegin(gscat, Xdot, Xdot_sub, INSERT_VALUES, SCATTER_FORWARD)); in DMSubDomainRestrictHook_TSTheta()
115 PetscCall(VecScatterEnd(gscat, Xdot, Xdot_sub, INSERT_VALUES, SCATTER_FORWARD)); in DMSubDomainRestrictHook_TSTheta()
117 PetscCall(TSThetaRestoreX0AndXdot(ts, dm, &X0, &Xdot)); in DMSubDomainRestrictHook_TSTheta()
215 if (th->extrapolate && !ts->steprestart) PetscCall(VecAXPY(th->X, 1 / th->shift, th->Xdot)); in TSStep_Theta()
218 PetscCall(VecZeroEntries(th->Xdot)); in TSStep_Theta()
219 PetscCall(TSComputeIFunction(ts, ts->ptime, th->X0, th->Xdot, th->affine, PETSC_FALSE)); in TSStep_Theta()
231 …PetscCall(VecAXPBYPCZ(th->Xdot, -th->shift, th->shift, 0, th->X0, th->X)); /* th->Xdot is needed b… in TSStep_Theta()
234 PetscCall(VecAXPY(ts->vec_sol, ts->time_step, th->Xdot)); in TSStep_Theta()
379 …PetscCall(VecAXPBYPCZ(th->Xdot, -1. / adjoint_time_step, 1.0 / adjoint_time_step, 0, th->X0, ts->v… in TSAdjointStepBEuler_Private()
380 …PetscCall(TSComputeIJacobianP(ts, th->stage_time, ts->vec_sol, th->Xdot, 1. / adjoint_time_step, t… in TSAdjointStepBEuler_Private()
568 PetscCall(VecAXPBYPCZ(th->Xdot, -th->shift, th->shift, 0, th->X0, ts->vec_sol)); in TSAdjointStep_Theta()
569 …PetscCall(TSComputeIJacobianP(ts, th->stage_time, ts->vec_sol, th->Xdot, -1. / (th->Theta * adjoin… in TSAdjointStep_Theta()
603 PetscCall(VecZeroEntries(th->Xdot)); in TSAdjointStep_Theta()
604 …PetscCall(TSComputeIJacobianP(ts, adjoint_ptime, th->X0, th->Xdot, 1. / ((th->Theta - 1.0) * adjoi… in TSAdjointStep_Theta()
654 PetscCall(VecAXPBYPCZ(th->Xdot, -th->shift, th->shift, 0, th->X0, th->X)); in TSAdjointStep_Theta()
655 …PetscCall(TSComputeIJacobianP(ts, th->stage_time, th->X, th->Xdot, th->shift, ts->Jacp, PETSC_FALS… in TSAdjointStep_Theta()
683 PetscCall(VecWAXPY(X, dt, th->Xdot, th->X)); in TSInterpolate_Theta()
765 … PetscCall(TSComputeIJacobian(ts, th->ptime0, th->X0, th->Xdot, th->shift, J, Jpre, PETSC_FALSE)); in TSForwardStep_Theta()
771 PetscCall(VecZeroEntries(th->Xdot)); in TSForwardStep_Theta()
772 …PetscCall(TSComputeIJacobianP(ts, th->ptime0, th->X0, th->Xdot, th->shift, ts->Jacp, PETSC_FALSE)); in TSForwardStep_Theta()
775 PetscCall(VecAXPBYPCZ(th->Xdot, -th->shift, th->shift, 0, th->X0, ts->vec_sol)); in TSForwardStep_Theta()
776 …PetscCall(TSComputeIJacobianP(ts, th->stage_time, ts->vec_sol, th->Xdot, th->shift, ts->Jacp, PETS… in TSForwardStep_Theta()
781 …PetscCall(TSComputeIJacobian(ts, th->stage_time, th->X, th->Xdot, th->shift, J, Jpre, PETSC_FALSE)… in TSForwardStep_Theta()
788 PetscCall(VecAXPBYPCZ(th->Xdot, -th->shift, th->shift, 0, th->X0, th->X)); in TSForwardStep_Theta()
789 …PetscCall(TSComputeIJacobianP(ts, th->stage_time, th->X, th->Xdot, th->shift, ts->Jacp, PETSC_FALS… in TSForwardStep_Theta()
797 …PetscCall(TSComputeIJacobian(ts, th->stage_time, ts->vec_sol, th->Xdot, th->shift, J, Jpre, PETSC_… in TSForwardStep_Theta()
799 …PetscCall(TSComputeIJacobian(ts, th->stage_time, th->X, th->Xdot, th->shift, J, Jpre, PETSC_FALSE)… in TSForwardStep_Theta()
894 PetscCall(VecDestroy(&th->Xdot)); in TSReset_Theta()
946 Vec X0, Xdot; in SNESTSFormFunction_Theta() local
953 PetscCall(TSThetaGetX0AndXdot(ts, dm, &X0, &Xdot)); in SNESTSFormFunction_Theta()
955 PetscCall(VecAXPBYPCZ(Xdot, -shift, shift, 0, X0, x)); in SNESTSFormFunction_Theta()
957 PetscCall(VecZeroEntries(Xdot)); in SNESTSFormFunction_Theta()
962 PetscCall(TSComputeIFunction(ts, th->stage_time, x, Xdot, y, PETSC_FALSE)); in SNESTSFormFunction_Theta()
964 PetscCall(TSThetaRestoreX0AndXdot(ts, dm, &X0, &Xdot)); in SNESTSFormFunction_Theta()
971 Vec Xdot; in SNESTSFormJacobian_Theta() local
978 PetscCall(TSThetaGetX0AndXdot(ts, dm, NULL, &Xdot)); in SNESTSFormJacobian_Theta()
982 PetscCall(TSComputeIJacobian(ts, th->stage_time, x, Xdot, shift, A, B, PETSC_FALSE)); in SNESTSFormJacobian_Theta()
984 PetscCall(TSThetaRestoreX0AndXdot(ts, dm, NULL, &Xdot)); in SNESTSFormJacobian_Theta()
1035 if (!th->Xdot) PetscCall(VecDuplicate(ts->vec_sol, &th->Xdot)); in TSSetUp_Theta()