Lines Matching refs:ts

19   TS              ts;  in main()  local
31 PetscCall(TSCreate(PETSC_COMM_WORLD, &ts)); in main()
37 PetscCall(TSSetRHSFunction(ts, f, RHSFunction, NULL)); in main()
49 PetscCall(TSSetRHSJacobian(ts, A, A, RHSJacobian, NULL)); in main()
56 PetscCall(TSSetSolution(ts, x)); in main()
59 PetscCall(TSMonitorSet(ts, Monitor, NULL, NULL)); in main()
60 PetscCall(TSSetPreStep(ts, PreStep)); in main()
61 PetscCall(TSSetPostStep(ts, PostStep)); in main()
65 PetscCall(TSGetAdapt(ts, &adapt)); in main()
77 PetscCall(TSSetTimeStep(ts, 1)); in main()
78 PetscCall(TSSetEventHandler(ts, 3, direction, terminate, Event, PostEvent, NULL)); in main()
80 PetscCall(TSSetExactFinalTime(ts, TS_EXACTFINALTIME_STEPOVER)); in main()
81 PetscCall(TSSetResize(ts, PETSC_TRUE, TransferSetUp, Transfer, ntransfer)); in main()
82 PetscCall(TSSetFromOptions(ts)); in main()
86 PetscCall(TSSetStepNumber(ts, 0)); in main()
87 PetscCall(TSSetTimeStep(ts, 1)); in main()
88 PetscCall(TSSetTime(ts, 0)); in main()
89 PetscCall(TSSetMaxTime(ts, PETSC_MAX_REAL)); in main()
90 PetscCall(TSSetMaxSteps(ts, 3)); in main()
92 PetscCall(TSGetTime(ts, &t)); in main()
93 PetscCall(TSGetSolution(ts, &x)); in main()
96 PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "TSSolve: Begin\n")); in main()
97 PetscCall(TSSolve(ts, NULL)); in main()
98 PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "TSSolve: End\n\n")); in main()
99 PetscCall(TSGetTime(ts, &t)); in main()
100 PetscCall(TSGetStepNumber(ts, &n)); in main()
101 PetscCall(TSSetMaxSteps(ts, PetscMin(n + 3, n_end))); in main()
103 PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "TSSolve: Begin\n")); in main()
104 PetscCall(TSSolve(ts, NULL)); in main()
105 PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "TSSolve: End\n\n")); in main()
109 PetscCall(TSSetStepNumber(ts, 0)); in main()
110 PetscCall(TSSetTimeStep(ts, 1)); in main()
111 PetscCall(TSSetTime(ts, 0)); in main()
112 PetscCall(TSSetMaxTime(ts, 3)); in main()
113 PetscCall(TSSetMaxSteps(ts, PETSC_INT_MAX)); in main()
115 PetscCall(TSGetTime(ts, &t)); in main()
116 PetscCall(TSGetSolution(ts, &x)); in main()
119 PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "TSSolve: Begin\n")); in main()
120 PetscCall(TSSolve(ts, NULL)); in main()
121 PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "TSSolve: End\n\n")); in main()
122 PetscCall(TSGetTime(ts, &t)); in main()
123 PetscCall(TSSetMaxTime(ts, PetscMin(t + 3, t_end))); in main()
125 PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "TSSolve: Begin\n")); in main()
126 PetscCall(TSSolve(ts, NULL)); in main()
127 PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "TSSolve: End\n\n")); in main()
131 PetscCall(TSDestroy(&ts)); in main()
139 PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec x, Vec f, PetscCtx ctx) in RHSFunction() argument
146 PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec x, Mat A, Mat B, PetscCtx ctx) in RHSJacobian() argument
154 PetscErrorCode PreStep(TS ts) in PreStep() argument
163 PetscCall(TSGetStepNumber(ts, &n)); in PreStep()
164 PetscCall(TSGetTime(ts, &t)); in PreStep()
165 PetscCall(TSGetSolution(ts, &x)); in PreStep()
167 PetscCall(TSGetStepResize(ts, &flg)); in PreStep()
168 …PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "%-10s-> step %" PetscInt_FMT " time %g va… in PreStep()
173 PetscErrorCode PostStep(TS ts) in PostStep() argument
181 PetscCall(TSGetStepNumber(ts, &n)); in PostStep()
182 PetscCall(TSGetTime(ts, &t)); in PostStep()
183 PetscCall(TSGetSolution(ts, &x)); in PostStep()
185 …PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "%-10s-> step %" PetscInt_FMT " time %g va… in PostStep()
190 PetscErrorCode Monitor(TS ts, PetscInt n, PetscReal t, Vec x, PetscCtx ctx) in Monitor() argument
196 …PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "%-10s-> step %" PetscInt_FMT " time %g va… in Monitor()
201 PetscErrorCode Event(TS ts, PetscReal t, Vec x, PetscReal *fvalue, PetscCtx ctx) in Event() argument
210 PetscErrorCode PostEvent(TS ts, PetscInt nevents, PetscInt event_list[], PetscReal t, Vec x, PetscB… in PostEvent() argument
216 PetscCall(TSGetStepNumber(ts, &i)); in PostEvent()
218 …PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "%-10s-> step %" PetscInt_FMT " time %g va… in PostEvent()
223 PetscErrorCode TransferSetUp(TS ts, PetscInt n, PetscReal t, Vec x, PetscBool *flg, PetscCtx ctx) in TransferSetUp() argument
237 PetscErrorCode Transfer(TS ts, PetscInt nv, Vec vin[], Vec vout[], PetscCtx ctx) in Transfer() argument
242 PetscCall(TSGetStepNumber(ts, &i)); in Transfer()
243 …PetscCall(PetscPrintf(PetscObjectComm((PetscObject)ts), "%-10s-> step %" PetscInt_FMT " nv %" Pets… in Transfer()