Lines Matching refs:stepnum

53   PetscInt       stepnum;  member
198 static PetscErrorCode ElementSet(TS ts, Stack *stack, StackElement *e, PetscInt stepnum, PetscReal … in ElementSet() argument
210 (*e)->stepnum = stepnum; in ElementSet()
213 if (stepnum == 0) { in ElementSet()
303 static PetscErrorCode WriteToDisk(PetscBool stifflyaccurate, PetscInt stepnum, PetscReal time, Pets… in WriteToDisk() argument
306 PetscCall(PetscViewerBinaryWrite(viewer, &stepnum, 1, PETSC_INT)); in WriteToDisk()
320 static PetscErrorCode ReadFromDisk(PetscBool stifflyaccurate, PetscInt *stepnum, PetscReal *time, P… in ReadFromDisk() argument
323 PetscCall(PetscViewerBinaryRead(viewer, stepnum, 1, NULL, PETSC_INT)); in ReadFromDisk()
363 …PetscCall(WriteToDisk(ts->stifflyaccurate, e->stepnum, e->time, e->timeprev, e->X, e->Y, stack->nu… in StackDumpAll()
401 …PetscCall(ReadFromDisk(ts->stifflyaccurate, &e->stepnum, &e->time, &e->timeprev, e->X, e->Y, stack… in StackLoadAll()
470 PetscInt stepnum; in DumpSingle() local
482 PetscCall(TSGetStepNumber(ts, &stepnum)); in DumpSingle()
489 …PetscCall(WriteToDisk(ts->stifflyaccurate, stepnum, ts->ptime, ts->ptime_prev, ts->vec_sol, Y, sta… in DumpSingle()
520 static PetscErrorCode UpdateTS(TS ts, Stack *stack, StackElement e, PetscInt stepnum, PetscBool adj… in UpdateTS() argument
527 …if (!adjoint_mode || (HaveSolution(e->cptype) && e->stepnum != stepnum)) PetscCall(VecCopy(e->X, t… in UpdateTS()
530 if (e->stepnum && e->stepnum == stepnum) { in UpdateTS()
576 static PetscErrorCode TopLevelStore(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum, P… in TopLevelStore() argument
584 stridenum = stepnum / tjsch->stride; in TopLevelStore()
590 …if (localstepnum == tjsch->stride - 1 && stepnum < tjsch->total_steps - laststridesize) { /* curre… in TopLevelStore()
596 if (localstepnum == 0 && stepnum < tjsch->total_steps - laststridesize) { in TopLevelStore()
604 …if (localstepnum == 0 && stepnum < tjsch->total_steps && stepnum != 0) { /* skip the first stride … in TopLevelStore()
610 if (localstepnum == 1 && stepnum < tjsch->total_steps - laststridesize) { in TopLevelStore()
620 static PetscErrorCode TSTrajectoryMemorySet_N(TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscRea… in TSTrajectoryMemorySet_N() argument
630 if (stepnum != tjsch->total_steps) tjsch->total_steps = stepnum; in TSTrajectoryMemorySet_N()
640 if (!stack->solution_only && stepnum == 0) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_N()
649 …PetscCheck(stepnum >= stack->top, PetscObjectComm((PetscObject)ts), PETSC_ERR_MEMC, "Illegal modif… in TSTrajectoryMemorySet_N()
652 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_N()
657 static PetscErrorCode TSTrajectoryMemorySet_N_2(TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscR… in TSTrajectoryMemorySet_N_2() argument
670 …PetscCheck(stepnum >= stack->top, PetscObjectComm((PetscObject)ts), PETSC_ERR_MEMC, "Illegal modif… in TSTrajectoryMemorySet_N_2()
673 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_N_2()
678 static PetscErrorCode TSTrajectoryMemoryGet_N(TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_N() argument
687 if (stepnum == tjsch->total_steps) { in TSTrajectoryMemoryGet_N()
693 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_N()
697 PetscCall(ReCompute(ts, tjsch, e->stepnum, stepnum)); in TSTrajectoryMemoryGet_N()
703 static PetscErrorCode TSTrajectoryMemoryGet_N_2(TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_N_2() argument
709 PetscCall(StackFind(stack, &e, stepnum)); in TSTrajectoryMemoryGet_N_2()
710 …(stepnum == e->stepnum, PetscObjectComm((PetscObject)ts), PETSC_ERR_PLIB, "Inconsistent steps! %" … in TSTrajectoryMemoryGet_N_2()
711 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_FALSE)); in TSTrajectoryMemoryGet_N_2()
715 …ctoryMemorySet_TLNR(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscReal time, … in TSTrajectoryMemorySet_TLNR() argument
724 if (!stack->solution_only && stepnum == 0) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_TLNR()
725 if (stack->solution_only && stepnum == tjsch->total_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_TLNR()
728 localstepnum = stepnum % tjsch->stride; in TSTrajectoryMemorySet_TLNR()
734 PetscCall(TopLevelStore(tj, ts, tjsch, stepnum, localstepnum, laststridesize, &done)); in TSTrajectoryMemorySet_TLNR()
735 …if (!tjsch->save_stack && stepnum < tjsch->total_steps - laststridesize) PetscFunctionReturn(PETSC… in TSTrajectoryMemorySet_TLNR()
742 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_TLNR()
747 …cErrorCode TSTrajectoryMemoryGet_TLNR(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_TLNR() argument
754 if (stepnum == tjsch->total_steps) { in TSTrajectoryMemoryGet_TLNR()
759 localstepnum = stepnum % tjsch->stride; in TSTrajectoryMemoryGet_TLNR()
764 if (localstepnum == 0 && tjsch->total_steps - stepnum >= laststridesize) { in TSTrajectoryMemoryGet_TLNR()
765 id = stepnum / tjsch->stride; in TSTrajectoryMemoryGet_TLNR()
781 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_TLNR()
784 PetscCall(ReCompute(ts, tjsch, e->stepnum, stepnum)); in TSTrajectoryMemoryGet_TLNR()
789 if (localstepnum == 0 && tjsch->total_steps - stepnum >= laststridesize) { in TSTrajectoryMemoryGet_TLNR()
790 id = stepnum / tjsch->stride; in TSTrajectoryMemoryGet_TLNR()
799 PetscCall(ReCompute(ts, tjsch, e->stepnum, id * tjsch->stride)); in TSTrajectoryMemoryGet_TLNR()
805 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_TLNR()
909 …pe stype, RevolveCTX *rctx, PetscRevolveInt total_steps, PetscRevolveInt stepnum, PetscRevolveInt … in ApplyRevolve() argument
920 shift = stepnum - localstepnum; in ApplyRevolve()
974 …ectoryMemorySet_ROF(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscReal time, … in TSTrajectoryMemorySet_ROF() argument
983 if (!stack->solution_only && stepnum == 0) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_ROF()
984 if (stack->solution_only && stepnum == tjsch->total_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_ROF()
986 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemorySet_ROF()
989 …PetscCheck(stepnum >= stack->top, PetscObjectComm((PetscObject)ts), PETSC_ERR_MEMC, "Illegal modif… in TSTrajectoryMemorySet_ROF()
992 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_ROF()
998 …scErrorCode TSTrajectoryMemoryGet_ROF(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_ROF() argument
1006 if (stepnum == 0 || stepnum == tjsch->total_steps) { in TSTrajectoryMemoryGet_ROF()
1013 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_ROF()
1015 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemoryGet_ROF()
1031 if (stack->solution_only || (!stack->solution_only && e->stepnum < stepnum)) { in TSTrajectoryMemoryGet_ROF()
1033 PetscCall(ReCompute(ts, tjsch, e->stepnum, stepnum)); in TSTrajectoryMemoryGet_ROF()
1035 …if ((stack->solution_only && e->stepnum + 1 == stepnum) || (!stack->solution_only && e->stepnum ==… in TSTrajectoryMemoryGet_ROF()
1040 …ectoryMemorySet_RON(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscReal time, … in TSTrajectoryMemorySet_RON() argument
1052 if (!stack->solution_only && stepnum == 0) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_RON()
1053 if (stack->solution_only && stepnum == tjsch->total_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_RON()
1055 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemorySet_RON()
1065 e->stepnum = stepnum; in TSTrajectoryMemorySet_RON()
1070 …PetscCheck(stepnum >= stack->top, PetscObjectComm((PetscObject)ts), PETSC_ERR_MEMC, "Illegal modif… in TSTrajectoryMemorySet_RON()
1073 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_RON()
1080 …scErrorCode TSTrajectoryMemoryGet_RON(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_RON() argument
1087 if (stepnum == 0 || stepnum == tjsch->total_steps) { in TSTrajectoryMemoryGet_RON()
1092 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemoryGet_RON()
1101 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_RON()
1116 if (stack->solution_only || (!stack->solution_only && e->stepnum < stepnum)) { in TSTrajectoryMemoryGet_RON()
1118 PetscCall(ReCompute(ts, tjsch, e->stepnum, stepnum)); in TSTrajectoryMemoryGet_RON()
1124 …ectoryMemorySet_TLR(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscReal time, … in TSTrajectoryMemorySet_TLR() argument
1134 if (!stack->solution_only && stepnum == 0) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_TLR()
1135 if (stack->solution_only && stepnum == tjsch->total_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_TLR()
1137 localstepnum = stepnum % tjsch->stride; in TSTrajectoryMemorySet_TLR()
1142 PetscCall(TopLevelStore(tj, ts, tjsch, stepnum, localstepnum, laststridesize, &done)); in TSTrajectoryMemorySet_TLR()
1144 …if (!stack->solution_only && !tjsch->save_stack && stepnum <= tjsch->total_steps - laststridesize)… in TSTrajectoryMemorySet_TLR()
1145 …if (stack->solution_only && !tjsch->save_stack && stepnum < tjsch->total_steps - laststridesize) P… in TSTrajectoryMemorySet_TLR()
1152 …if (stack->solution_only && stepnum == tjsch->total_steps - laststridesize && !tjsch->recompute) {… in TSTrajectoryMemorySet_TLR()
1155 …if (!stack->solution_only && stepnum == tjsch->total_steps - laststridesize + 1 && !tjsch->recompu… in TSTrajectoryMemorySet_TLR()
1160 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemorySet_TLR()
1167 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_TLR()
1173 …scErrorCode TSTrajectoryMemoryGet_TLR(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_TLR() argument
1182 localstepnum = stepnum % tjsch->stride; in TSTrajectoryMemoryGet_TLR()
1183 stridenum = stepnum / tjsch->stride; in TSTrajectoryMemoryGet_TLR()
1184 if (stepnum == tjsch->total_steps) { in TSTrajectoryMemoryGet_TLR()
1192 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemoryGet_TLR()
1196 if (localstepnum == 0 && stepnum <= tjsch->total_steps - laststridesize) { in TSTrajectoryMemoryGet_TLR()
1215 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_TLR()
1223 PetscCall(ReCompute(ts, tjsch, e->stepnum, stepnum)); in TSTrajectoryMemoryGet_TLR()
1224 if (e->stepnum + 1 == stepnum) PetscCall(StackPop(stack, &e)); in TSTrajectoryMemoryGet_TLR()
1227 if (localstepnum == 0 && tjsch->total_steps - stepnum >= laststridesize) { in TSTrajectoryMemoryGet_TLR()
1249 PetscCall(ReCompute(ts, tjsch, e->stepnum, stridenum * tjsch->stride)); in TSTrajectoryMemoryGet_TLR()
1255 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_TLR()
1260 …nt_FMT " (stage values already checkpointed)\n", stepnum - localstepnum + tjsch->rctx->oldcapo, st… in TSTrajectoryMemoryGet_TLR()
1264 if (e->stepnum < stepnum) { in TSTrajectoryMemoryGet_TLR()
1266 PetscCall(ReCompute(ts, tjsch, e->stepnum, stepnum)); in TSTrajectoryMemoryGet_TLR()
1268 if (e->stepnum == stepnum) PetscCall(StackPop(stack, &e)); in TSTrajectoryMemoryGet_TLR()
1274 …ctoryMemorySet_TLTR(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscReal time, … in TSTrajectoryMemorySet_TLTR() argument
1283 if (!stack->solution_only && stepnum == 0) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_TLTR()
1284 if (stack->solution_only && stepnum == tjsch->total_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_TLTR()
1286 localstepnum = stepnum % tjsch->stride; /* index at the bottom level (inside a stride) */ in TSTrajectoryMemorySet_TLTR()
1287 stridenum = stepnum / tjsch->stride; /* index at the top level */ in TSTrajectoryMemorySet_TLTR()
1294 …if (laststridesize < tjsch->stride && stepnum == tjsch->total_steps - laststridesize) PetscCall(In… in TSTrajectoryMemorySet_TLTR()
1300 …if (laststridesize < tjsch->stride && stepnum == tjsch->total_steps - laststridesize + 1) PetscCal… in TSTrajectoryMemorySet_TLTR()
1303 PetscCall(TopLevelStore(tj, ts, tjsch, stepnum, localstepnum, laststridesize, &done)); in TSTrajectoryMemorySet_TLTR()
1309 if (stepnum < tjsch->total_steps - laststridesize) { in TSTrajectoryMemorySet_TLTR()
1314 …if (!stack->solution_only && localstepnum == 0 && stepnum != tjsch->total_steps && !tjsch->recompu… in TSTrajectoryMemorySet_TLTR()
1316 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemorySet_TLTR()
1324 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_TLTR()
1330 …cErrorCode TSTrajectoryMemoryGet_TLTR(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_TLTR() argument
1340 localstepnum = stepnum % tjsch->stride; in TSTrajectoryMemoryGet_TLTR()
1341 stridenum = stepnum / tjsch->stride; in TSTrajectoryMemoryGet_TLTR()
1342 if (stepnum == tjsch->total_steps) { in TSTrajectoryMemoryGet_TLTR()
1356 if (localstepnum == 0 && stepnum <= tjsch->total_steps - laststridesize) { in TSTrajectoryMemoryGet_TLTR()
1395 PetscCall(ReCompute(ts, tjsch, restoredstridenum * tjsch->stride, stepnum)); in TSTrajectoryMemoryGet_TLTR()
1404 PetscCall(ReCompute(ts, tjsch, (restoredstridenum - 1) * tjsch->stride, stepnum)); in TSTrajectoryMemoryGet_TLTR()
1413 PetscCall(ReCompute(ts, tjsch, restoredstridenum * tjsch->stride, stepnum)); in TSTrajectoryMemoryGet_TLTR()
1439 PetscCall(ReCompute(ts, tjsch, (restoredstridenum - 1) * tjsch->stride + 1, stepnum)); in TSTrajectoryMemoryGet_TLTR()
1450 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_TLTR()
1452 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemoryGet_TLTR()
1460 PetscCall(ReCompute(ts, tjsch, e->stepnum, stepnum)); in TSTrajectoryMemoryGet_TLTR()
1461 if (e->stepnum + 1 == stepnum) PetscCall(StackPop(stack, &e)); in TSTrajectoryMemoryGet_TLTR()
1466 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_TLTR()
1474 …nt_FMT " (stage values already checkpointed)\n", stepnum - localstepnum + tjsch->rctx->oldcapo, st… in TSTrajectoryMemoryGet_TLTR()
1478 if (e->stepnum < stepnum) { in TSTrajectoryMemoryGet_TLTR()
1480 PetscCall(ReCompute(ts, tjsch, e->stepnum, stepnum)); in TSTrajectoryMemoryGet_TLTR()
1482 if (e->stepnum == stepnum) PetscCall(StackPop(stack, &e)); in TSTrajectoryMemoryGet_TLTR()
1488 …ectoryMemorySet_RMS(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscReal time, … in TSTrajectoryMemorySet_RMS() argument
1496 if (!stack->solution_only && stepnum == 0) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_RMS()
1497 if (stack->solution_only && stepnum == tjsch->total_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_RMS()
1499 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemorySet_RMS()
1503 …PetscCheck(stepnum >= stack->top, PetscObjectComm((PetscObject)ts), PETSC_ERR_MEMC, "Illegal modif… in TSTrajectoryMemorySet_RMS()
1506 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_RMS()
1514 …scErrorCode TSTrajectoryMemoryGet_RMS(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_RMS() argument
1523 if (stepnum == 0 || stepnum == tjsch->total_steps) { in TSTrajectoryMemoryGet_RMS()
1528 PetscCall(PetscRevolveIntCast(stepnum, &rstepnum)); in TSTrajectoryMemoryGet_RMS()
1543 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_RMS()
1560 if (stack->solution_only || (!stack->solution_only && restart < stepnum)) { in TSTrajectoryMemoryGet_RMS()
1562 PetscCall(ReCompute(ts, tjsch, restart, stepnum)); in TSTrajectoryMemoryGet_RMS()
1564 …ondisk && ((stack->solution_only && e->stepnum + 1 == stepnum) || (!stack->solution_only && e->ste… in TSTrajectoryMemoryGet_RMS()
1572 …ectoryMemorySet_AOF(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum, PetscReal time, … in TSTrajectoryMemorySet_AOF() argument
1580 if (stepnum == 0) { /* When placing the first checkpoint, no need to change the units available */ in TSTrajectoryMemorySet_AOF()
1589 if (stack->solution_only && stepnum == tjsch->total_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSTrajectoryMemorySet_AOF()
1591 if (tjsch->actx->nextcheckpointstep == stepnum) { in TSTrajectoryMemorySet_AOF()
1592 …PetscCheck(stepnum >= stack->top, PetscObjectComm((PetscObject)ts), PETSC_ERR_MEMC, "Illegal modif… in TSTrajectoryMemorySet_AOF()
1595 … checkpoint number %" PetscInt_FMT " with stage values and solution (located in RAM)\n", stepnum)); in TSTrajectoryMemorySet_AOF()
1597 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_AOF()
1600 …or, "Store in checkpoint number %" PetscInt_FMT " with stage values (located in RAM)\n", stepnum)); in TSTrajectoryMemorySet_AOF()
1602 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_AOF()
1605 …IIPrintf(tj->monitor, "Store in checkpoint number %" PetscInt_FMT " (located in RAM)\n", stepnum)); in TSTrajectoryMemorySet_AOF()
1607 PetscCall(ElementSet(ts, stack, &e, stepnum, time, X)); in TSTrajectoryMemorySet_AOF()
1611 tjsch->actx->lastcheckpointstep = stepnum; in TSTrajectoryMemorySet_AOF()
1626 …scErrorCode TSTrajectoryMemoryGet_AOF(TSTrajectory tj, TS ts, TJScheduler *tjsch, PetscInt stepnum) in TSTrajectoryMemoryGet_AOF() argument
1633 if (stepnum == 0 || stepnum == tjsch->total_steps) { in TSTrajectoryMemoryGet_AOF()
1639 estepnum = e->stepnum; in TSTrajectoryMemoryGet_AOF()
1640 …if (estepnum == stepnum && e->cptype == SOLUTIONONLY) { /* discard the checkpoint if not useful (c… in TSTrajectoryMemoryGet_AOF()
1644 estepnum = e->stepnum; in TSTrajectoryMemoryGet_AOF()
1648 …Restore in checkpoint number %" PetscInt_FMT " with stage values (located in RAM)\n", e->stepnum)); in TSTrajectoryMemoryGet_AOF()
1652 …ntf(tj->monitor, "Restore in checkpoint number %" PetscInt_FMT " (located in RAM)\n", e->stepnum)); in TSTrajectoryMemoryGet_AOF()
1655 PetscCall(UpdateTS(ts, stack, e, stepnum, PETSC_TRUE)); in TSTrajectoryMemoryGet_AOF()
1658 tjsch->actx->endstep = stepnum; in TSTrajectoryMemoryGet_AOF()
1667 if (estepnum == stepnum) { in TSTrajectoryMemoryGet_AOF()
1674 if (estepnum + 1 == stepnum) { in TSTrajectoryMemoryGet_AOF()
1681 if (stack->solution_only || (!stack->solution_only && estepnum < stepnum)) { in TSTrajectoryMemoryGet_AOF()
1683 PetscCall(ReCompute(ts, tjsch, estepnum, stepnum)); in TSTrajectoryMemoryGet_AOF()
1689 static PetscErrorCode TSTrajectorySet_Memory(TSTrajectory tj, TS ts, PetscInt stepnum, PetscReal ti… in TSTrajectorySet_Memory() argument
1695 PetscCall(TSGetStepNumber(ts, &stepnum)); in TSTrajectorySet_Memory()
1698 if (!tjsch->recompute && stepnum == 0) ts->ptime_prev = ts->ptime - ts->time_step; in TSTrajectorySet_Memory()
1702 PetscCall(TSTrajectoryMemorySet_N(ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1704 PetscCall(TSTrajectoryMemorySet_N_2(ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1709 PetscCall(TSTrajectoryMemorySet_TLNR(tj, ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1714 PetscCall(TSTrajectoryMemorySet_TLR(tj, ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1718 PetscCall(TSTrajectoryMemorySet_TLTR(tj, ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1722 PetscCall(TSTrajectoryMemorySet_ROF(tj, ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1726 PetscCall(TSTrajectoryMemorySet_RON(tj, ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1730 PetscCall(TSTrajectoryMemorySet_RMS(tj, ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1736 PetscCall(TSTrajectoryMemorySet_AOF(tj, ts, tjsch, stepnum, time, X)); in TSTrajectorySet_Memory()
1745 static PetscErrorCode TSTrajectoryGet_Memory(TSTrajectory tj, TS ts, PetscInt stepnum, PetscReal *t) in TSTrajectoryGet_Memory() argument
1750 if (tj->adjoint_solve_mode && stepnum == 0) { in TSTrajectoryGet_Memory()
1757 PetscCall(TSTrajectoryMemoryGet_N(ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()
1759 PetscCall(TSTrajectoryMemoryGet_N_2(ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()
1764 PetscCall(TSTrajectoryMemoryGet_TLNR(tj, ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()
1769 PetscCall(TSTrajectoryMemoryGet_TLR(tj, ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()
1773 PetscCall(TSTrajectoryMemoryGet_TLTR(tj, ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()
1777 PetscCall(TSTrajectoryMemoryGet_ROF(tj, ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()
1781 PetscCall(TSTrajectoryMemoryGet_RON(tj, ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()
1785 PetscCall(TSTrajectoryMemoryGet_RMS(tj, ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()
1791 PetscCall(TSTrajectoryMemoryGet_AOF(tj, ts, tjsch, stepnum)); in TSTrajectoryGet_Memory()