Home
last modified time | relevance | path

Searched refs:time_step (Results 1 – 25 of 35) sorted by relevance

12

/petsc/src/ts/impls/explicit/euler/
H A Deuler.c15 PetscReal next_time_step = ts->time_step; in TSStep_Euler()
20 PetscCall(VecAYPX(update, ts->time_step, solution)); in TSStep_Euler()
27 PetscCall(TSFunctionDomainError(ts, ts->ptime + ts->time_step, update, &stageok)); in TSStep_Euler()
33 PetscCall(TSAdaptChoose(ts->adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_Euler()
40 ts->ptime += ts->time_step; in TSStep_Euler()
41 ts->time_step = next_time_step; in TSStep_Euler()
90 PetscReal alpha = (ts->ptime - t) / ts->time_step; in TSInterpolate_Euler()
93 PetscCall(VecWAXPY(X, -ts->time_step, update, ts->vec_sol)); in TSInterpolate_Euler()
/petsc/src/ts/impls/implicit/alpha/
H A Dalpha1.c58 PetscReal dt = ts->time_step; in TSAlpha_StageTime()
76 PetscReal dt = ts->time_step; in TSAlpha_StageVecs()
116 PetscReal time_step; in TSAlpha_Restart() local
127 PetscCall(TSGetTimeStep(ts, &time_step)); in TSAlpha_Restart()
128 ts->time_step = time_step / 2; in TSAlpha_Restart()
134 th->stage_time += ts->time_step; in TSAlpha_Restart()
144 th->stage_time += ts->time_step; in TSAlpha_Restart()
155 PetscCall(VecAXPY(th->V0, -3 / time_step, X0)); in TSAlpha_Restart()
156 PetscCall(VecAXPY(th->V0, +4 / time_step, X1)); in TSAlpha_Restart()
157 PetscCall(VecAXPY(th->V0, -1 / time_step, X2)); in TSAlpha_Restart()
[all …]
H A Dalpha2.c90 PetscReal dt = ts->time_step; in TSAlpha_StageTime()
110 PetscReal dt = ts->time_step; in TSAlpha_StageVecs()
158 PetscReal time_step; in TSAlpha_Restart() local
171 PetscCall(TSGetTimeStep(ts, &time_step)); in TSAlpha_Restart()
172 ts->time_step = time_step / 2; in TSAlpha_Restart()
178 th->stage_time += ts->time_step; in TSAlpha_Restart()
190 th->stage_time += ts->time_step; in TSAlpha_Restart()
203 PetscCall(VecAXPY(th->A0, -3 / time_step, V0)); in TSAlpha_Restart()
204 PetscCall(VecAXPY(th->A0, +4 / time_step, V1)); in TSAlpha_Restart()
205 PetscCall(VecAXPY(th->A0, -1 / time_step, V2)); in TSAlpha_Restart()
[all …]
/petsc/src/ts/impls/pseudo/
H A Dposindep.c87 PetscReal next_time_step = ts->time_step, fnorm; in TSStep_Pseudo()
91 if (ts->steps == 0) pseudo->dt_initial = ts->time_step; in TSStep_Pseudo()
95 PetscCall(TSPreStage(ts, ts->ptime + ts->time_step)); in TSStep_Pseudo()
102 PetscCall(TSPostStage(ts, ts->ptime + ts->time_step, 0, &ts->vec_sol)); in TSStep_Pseudo()
104 PetscCall(TSAdaptCheckStage(adapt, ts, ts->ptime + ts->time_step, ts->vec_sol, &accept)); in TSStep_Pseudo()
108 PetscCall(TSAdaptChoose(adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_Pseudo()
111 ts->time_step = next_time_step; in TSStep_Pseudo()
114 ts->ptime += ts->time_step; in TSStep_Pseudo()
115 ts->time_step = next_time_step; in TSStep_Pseudo()
205 const PetscScalar mdt = 1.0 / ts->time_step; in SNESTSFormFunction_Pseudo()
[all …]
/petsc/src/ts/impls/explicit/rk/
H A Dmrk.c34 PetscReal h = ts->time_step; in TSInterpolate_RK_MultirateNonsplit()
64 PetscReal t = ts->ptime, h = ts->time_step; in TSStepRefine_RK_MultirateNonsplit()
97 ts->time_step = h / rk->dtratio; in TSStepRefine_RK_MultirateNonsplit()
108 ts->time_step = h; in TSStepRefine_RK_MultirateNonsplit()
130 PetscReal next_time_step = ts->time_step, t = ts->ptime, h = ts->time_step; in TSStep_RK_MultirateNonsplit()
160 rk->time_step = h; in TSStep_RK_MultirateNonsplit()
163 ts->ptime = t + ts->time_step; in TSStep_RK_MultirateNonsplit()
164 ts->time_step = next_time_step; in TSStep_RK_MultirateNonsplit()
248 h = ts->time_step; in TSInterpolate_RK_MultirateSplit()
286 PetscReal h = ts->time_step; in TSEvaluateStep_RK_MultirateSplit()
[all …]
H A Drk.c560 h = ts->time_step; in TSEvaluateStep_RK()
610 …PetscCall(TSComputeRHSFunction(quadts, rk->ptime + rk->time_step * c[i], Y[i], ts->vec_costintegra… in TSForwardCostIntegral_RK()
611 PetscCall(VecAXPY(quadts->vec_sol, rk->time_step * b[i], ts->vec_costintegrand)); in TSForwardCostIntegral_RK()
629 …PetscCall(TSComputeRHSFunction(quadts, ts->ptime + ts->time_step * (1.0 - c[i]), Y[i], ts->vec_cos… in TSAdjointCostIntegral_RK()
630 PetscCall(VecAXPY(quadts->vec_sol, -ts->time_step * b[i], ts->vec_costintegrand)); in TSAdjointCostIntegral_RK()
651 h = ts->time_step; in TSRollBack_RK()
680 PetscReal stage_time, h = ts->time_step; in TSForwardStep_RK()
788 PetscReal next_time_step = ts->time_step; in TSStep_RK()
798 PetscReal h = ts->time_step; in TSStep_RK()
819 PetscCall(TSAdaptChoose(adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_RK()
[all …]
H A Drk.h39 PetscReal time_step; member
/petsc/src/ts/interface/
H A Dtscreate.c44 t->time_step = 0.1; in TSCreate()
45 t->initial_time_step = t->time_step; in TSCreate()
H A Dtseig.c115 time_step_save = ts->time_step; in TSMonitorSPEig()
116 ts->time_step = PETSC_MAX_REAL; in TSMonitorSPEig()
120 ts->time_step = time_step_save; in TSMonitorSPEig()
H A Dts.c93 PetscReal time_step, eval_times[100] = {0}; in TSSetFromOptions() local
127 …tionsReal("-ts_time_step", "Initial time step", "TSSetTimeStep", ts->time_step, &time_step, &flg)); in TSSetFromOptions()
128 if (flg) PetscCall(TSSetTimeStep(ts, time_step)); in TSSetFromOptions()
2157 PetscErrorCode TSSetTimeStep(TS ts, PetscReal time_step) in TSSetTimeStep() argument
2161 PetscValidLogicalCollectiveReal(ts, time_step, 2); in TSSetTimeStep()
2162 ts->time_step = time_step; in TSSetTimeStep()
2163 if (ts->setupcalled == PETSC_FALSE) ts->initial_time_step = time_step; in TSSetTimeStep()
2248 *dt = ts->time_step; in TSGetTimeStep()
2994 PetscErrorCode TSSetInitialTimeStep(TS ts, PetscReal initial_time, PetscReal time_step) in TSSetInitialTimeStep() argument
2999 PetscCall(TSSetTimeStep(ts, time_step)); in TSSetInitialTimeStep()
[all …]
/petsc/src/ts/impls/mimex/
H A Dmimex.c66 PetscReal shift = 1. / ts->time_step; in SNESTSFormFunction_Mimex()
127 PetscReal shift = 1. / ts->time_step; in SNESTSFormJacobian_Mimex()
151 PetscScalar *asol, dt = ts->time_step; in TSStep_Mimex_Split()
162 mimex->stage_time = ts->ptime + ts->time_step; in TSStep_Mimex_Split()
208 ts->ptime += ts->time_step; in TSStep_Mimex_Split()
222 mimex->stage_time = ts->ptime + ts->time_step; in TSStep_Mimex_Implicit()
223 ts->ptime += ts->time_step; in TSStep_Mimex_Implicit()
303 PetscReal alpha = (ts->ptime - t) / ts->time_step; in TSInterpolate_Mimex()
/petsc/src/ts/impls/arkimex/
H A Dfsarkimex.c44 PetscReal shift = ark->scoeff / ts->time_step; in SNESTSFormFunction_ARKIMEX_FastSlowSplit()
66 shift = ark->scoeff / ts->time_step; in SNESTSFormJacobian_ARKIMEX_FastSlowSplit()
87 h = ts->time_step; in TSExtrapolate_ARKIMEX_FastSlowSplit()
134 h = ts->time_step; in TSEvaluateStep_ARKIMEX_FastSlowSplit()
228 PetscReal next_time_step = ts->time_step; in TSStep_ARKIMEX_FastSlowSplit()
262 PetscCall(TSSetMaxTime(ts_start, ts->ptime + ts->time_step)); in TSStep_ARKIMEX_FastSlowSplit()
264 PetscCall(TSSetTimeStep(ts_start, ts->time_step)); in TSStep_ARKIMEX_FastSlowSplit()
272 PetscCall(TSGetTimeStep(ts_start, &ts->time_step)); in TSStep_ARKIMEX_FastSlowSplit()
291 PetscReal h = ts->time_step; in TSStep_ARKIMEX_FastSlowSplit()
384 PetscCall(TSAdaptChoose(adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_ARKIMEX_FastSlowSplit()
[all …]
H A Darkimex.c1238 h = ts->time_step; in TSEvaluateStep_ARKIMEX()
1344 PetscReal next_time_step = ts->time_step; in TSStep_ARKIMEX()
1405 PetscCall(TSSetMaxTime(ts_start, ts->ptime + ts->time_step)); in TSStep_ARKIMEX()
1407 PetscCall(TSSetTimeStep(ts_start, ts->time_step)); in TSStep_ARKIMEX()
1415 PetscCall(TSGetTimeStep(ts_start, &ts->time_step)); in TSStep_ARKIMEX()
1435 PetscReal h = ts->time_step; in TSStep_ARKIMEX()
1515 PetscCall(TSAdaptChoose(adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_ARKIMEX()
1519 ts->time_step = next_time_step; in TSStep_ARKIMEX()
1523 ts->ptime += ts->time_step; in TSStep_ARKIMEX()
1524 ts->time_step = next_time_step; in TSStep_ARKIMEX()
[all …]
/petsc/src/ts/impls/symplectic/basicsymplectic/
H A Dbasicsymplectic.c211 PetscReal ptime, next_time_step = ts->time_step; in TSStep_BasicSymplectic()
230 PetscCall(VecAXPY(q, scheme->c[iter] * ts->time_step, q_update)); in TSStep_BasicSymplectic()
234 ptime = ptime + scheme->d[iter] * ts->time_step; in TSStep_BasicSymplectic()
236 PetscCall(VecAXPY(p, scheme->d[iter] * ts->time_step, p_update)); in TSStep_BasicSymplectic()
350 PetscReal alpha = (ts->ptime - t) / ts->time_step; in TSInterpolate_BasicSymplectic()
353 PetscCall(VecWAXPY(X, -ts->time_step, update, ts->vec_sol)); in TSInterpolate_BasicSymplectic()
/petsc/src/ts/impls/implicit/irk/
H A Dirk.c282 h = ts->time_step; in TSEvaluateStep_IRK()
317 PetscReal next_time_step = ts->time_step; in TSStep_IRK()
336 …nstages; j++) PetscCall(VecAXPY(irk->YdotI[i], A_inv[i + j * nstages] / ts->time_step, irk->Y[j])); in TSStep_IRK()
337 PetscCall(VecAXPY(irk->YdotI[i], -A_inv_rowsum[i] / ts->time_step, irk->U)); in TSStep_IRK()
343 PetscCall(TSAdaptChoose(adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_IRK()
347 ts->time_step = next_time_step; in TSStep_IRK()
351 ts->ptime += ts->time_step; in TSStep_IRK()
352 ts->time_step = next_time_step; in TSStep_IRK()
379 h = ts->time_step; in TSInterpolate_IRK()
465 PetscReal h = ts->time_step; in SNESTSFormFunction_IRK()
[all …]
/petsc/src/ts/impls/implicit/discgrad/
H A Dtsdiscgrad.c226 PetscReal next_time_step = ts->time_step; in TSStep_DiscGrad()
233 PetscReal shift = 1 / (0.5 * ts->time_step); in TSStep_DiscGrad()
235 dg->stage_time = ts->ptime + 0.5 * ts->time_step; in TSStep_DiscGrad()
246 PetscCall(VecAXPY(ts->vec_sol, ts->time_step, dg->Xdot)); in TSStep_DiscGrad()
247 PetscCall(TSAdaptChoose(adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_DiscGrad()
251 ts->time_step = next_time_step; in TSStep_DiscGrad()
254 ts->ptime += ts->time_step; in TSStep_DiscGrad()
255 ts->time_step = next_time_step; in TSStep_DiscGrad()
289 PetscReal norm, shift = 1 / (0.5 * ts->time_step); in SNESTSFormFunction_DiscGrad()
406 PetscReal shift = 1 / (0.5 * ts->time_step); in SNESTSFormJacobian_DiscGrad()
/petsc/src/ts/impls/explicit/ssp/
H A Dssp.c192 PetscReal next_time_step = ts->time_step; in TSStep_SSP()
195 PetscCall((*ssp->onestep)(ts, ts->ptime, ts->time_step, sol)); in TSStep_SSP()
197 PetscCall(TSAdaptCheckStage(ts->adapt, ts, ts->ptime + ts->time_step, sol, &stageok)); in TSStep_SSP()
203 PetscCall(TSAdaptChoose(ts->adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_SSP()
209 ts->ptime += ts->time_step; in TSStep_SSP()
210 ts->time_step = next_time_step; in TSStep_SSP()
/petsc/src/ts/impls/implicit/theta/
H A Dtheta.c161 th->ptime0 = ts->ptime + ts->time_step; in TSAdjointCostIntegral_Theta()
162 th->time_step0 = -ts->time_step; in TSAdjointCostIntegral_Theta()
202 PetscReal next_time_step = ts->time_step; in TSStep_Theta()
212 th->shift = 1 / (th->Theta * ts->time_step); in TSStep_Theta()
213 th->stage_time = ts->ptime + (th->endpoint ? (PetscReal)1 : th->Theta) * ts->time_step; in TSStep_Theta()
234 PetscCall(VecAXPY(ts->vec_sol, ts->time_step, th->Xdot)); in TSStep_Theta()
235 … PetscCall(TSAdaptCheckStage(ts->adapt, ts, ts->ptime + ts->time_step, ts->vec_sol, &stageok)); in TSStep_Theta()
244 PetscCall(TSAdaptChoose(ts->adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_Theta()
248 ts->time_step = next_time_step; in TSStep_Theta()
254 th->time_step0 = ts->time_step; in TSStep_Theta()
[all …]
/petsc/src/ts/impls/bdf/
H A Dbdf.c230 bdf->time[0] = ts->ptime + ts->time_step / 2; in TSBDF_Restart()
253 PetscReal next_time_step = ts->time_step; in TSStep_BDF()
270 bdf->time[0] = ts->ptime + ts->time_step; in TSStep_BDF()
282 PetscCall(TSAdaptChoose(ts->adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_BDF()
285 ts->time_step = next_time_step; in TSStep_BDF()
290 ts->ptime += ts->time_step; in TSStep_BDF()
291 ts->time_step = next_time_step; in TSStep_BDF()
/petsc/src/ts/impls/glee/
H A Dglee.c446 h = ts->time_step; in TSEvaluateStep_GLEE()
516 next_time_step = ts->time_step; in TSStep_GLEE()
522 PetscReal h = ts->time_step; in TSStep_GLEE()
566 PetscCall(TSAdaptChoose(adapt, ts, ts->time_step, &next_scheme, &next_time_step, &accept)); in TSStep_GLEE()
569 ts->ptime += ts->time_step; in TSStep_GLEE()
570 ts->time_step = next_time_step; in TSStep_GLEE()
580 ts->time_step = next_time_step; in TSStep_GLEE()
603 h = ts->time_step; in TSInterpolate_GLEE()
673 PetscReal shift = glee->scoeff / ts->time_step; in SNESTSFormFunction_GLEE()
696 PetscReal shift = glee->scoeff / ts->time_step; in SNESTSFormJacobian_GLEE()
/petsc/src/ts/impls/implicit/radau5/
H A Dradau5.c68 ts->time_step = *X - *XOLD; in SOLOUT()
112 H = ts->time_step; in TSSolve_Radau5()
/petsc/src/ts/impls/multirate/
H A Dmprk.c64 PetscReal time_step; member
631 PetscReal h = ts->time_step; in TSEvaluateStep_MPRK()
651 PetscReal next_time_step = ts->time_step, t = ts->ptime, h = ts->time_step; in TSStep_MPRK()
708 ts->ptime += ts->time_step; in TSStep_MPRK()
709 ts->time_step = next_time_step; in TSStep_MPRK()
724 PetscReal h = ts->time_step; in TSEvaluateStep_MPRKSPLIT()
796 PetscReal next_time_step = ts->time_step, t = ts->ptime, h = ts->time_step; in TSStep_MPRKSPLIT()
895 ts->ptime += ts->time_step; in TSStep_MPRKSPLIT()
896 ts->time_step = next_time_step; in TSStep_MPRKSPLIT()
/petsc/src/ts/impls/rosw/
H A Drosw.c1140 PetscReal next_time_step = ts->time_step; in TSStep_RosW()
1148 const PetscReal h = ts->time_step; in TSStep_RosW()
1217 PetscCall(TSAdaptChoose(adapt, ts, ts->time_step, NULL, &next_time_step, &accept)); in TSStep_RosW()
1221 ts->time_step = next_time_step; in TSStep_RosW()
1225 ts->ptime += ts->time_step; in TSStep_RosW()
1226 ts->time_step = next_time_step; in TSStep_RosW()
1258 h = ts->time_step; in TSInterpolate_RosW()
1423 PetscReal shift = ros->scoeff / ts->time_step; in SNESTSFormFunction_RosW()
1443 PetscReal shift = ros->scoeff / ts->time_step; in SNESTSFormJacobian_RosW()
/petsc/src/ts/impls/implicit/glle/
H A Dglle.c799 tleft = ts->max_time - (ts->ptime + ts->time_step); in TSGLLEChooseNextScheme()
848 gl->stage_time = ts->ptime + ts->time_step; in TSSolve_GLLE()
883 h = ts->time_step; in TSSolve_GLLE()
901 shift = gl->scoeff / ts->time_step; in TSSolve_GLLE()
943 gl->stage_time = ts->ptime + ts->time_step; in TSSolve_GLLE()
1001 ts->time_step = next_h; in TSSolve_GLLE()
1058 PetscCall(VecWAXPY(Ydot, gl->scoeff / ts->time_step, x, Z)); in SNESTSFormFunction_GLLE()
1079 …eIJacobian(ts, gl->stage_time, x, gl->Ydot[gl->stage], gl->scoeff / ts->time_step, A, B, PETSC_FAL… in SNESTSFormJacobian_GLLE()
/petsc/src/ts/tutorials/
H A Dex20td.c73 PetscReal time_step; /* ts integration time step */ member
269 user.time_step = user.final_time / user.max_steps; in main()

12