[petsc-dev] Runge-Kutta example in TS

Sean Farley sean at mcs.anl.gov
Wed Jan 16 13:06:20 CST 2013


On Wed, Jan 16, 2013 at 12:04 PM, Gautam Bisht <gbisht at lbl.gov> wrote:
> Hi Jed,
>
> Is there an example of RK in petsc-dev? I found no result by running the following command from petsc-dev/src/ts/examples/
>
> grep -Ri 'TSRK' ./

This won't work because the solver types are dynamically loaded
(nothing fancy, it's just that the code doesn't set TSRK, etc.). To
see which time-steppers you can try, run your favorite example (mine
is ex6.c),

$ ./ex6 -h | grep ts_
  -ts_type <euler>: TS method (one of) euler beuler cn pseudo gl ssp theta alpha
  -ts_max_steps <100>: Maximum number of time steps (TSSetDuration)
  -ts_final_time <100>: Time to run to (TSSetDuration)
  -ts_init_time <0>: Initial time (TSSetTime)
  -ts_dt <0.000143637>: Initial time step (TSSetTimeStep)

… and many more options. But, as Matt points out, RK methods are now
under SSP (Jed, why aren't the ARKIMEX methods shown in help?), so,
run it again but this time pass -ts_type ssp

$ ./ex6 -ts_type ssp -h | grep _ssp
  -ts_ssp_type <rks2>: Type of SSP method (one of) rks2 rks3 rk104
(TSSSPSetType)
  -ts_ssp_nstages <5>: Number of stages (TSSSPSetNumStages)



More information about the petsc-dev mailing list