<div dir="ltr"><div>Dear PETSc --</div><div><br></div><div>I have a short C ode code that uses TS to solve y' = g(t,y) where y(t) is a 2-dim'l vector. My code defaults to -ts_type rk so it does adaptive time-stepping; thus using -ts_monitor shows times at stdout:</div><div><br></div><div><div>$ ./ode -ts_monitor</div><div>solving from t0 = 0.000 with initial time step dt = 0.10000 ...</div><div>0 TS dt 0.1 time 0.</div><div>1 TS dt 0.170141 time 0.1</div><div>2 TS dt 0.169917 time 0.270141</div><div>3 TS dt 0.171145 time 0.440058</div><div>4 TS dt 0.173931 time 0.611203</div><div>5 TS dt 0.178719 time 0.785134</div><div>6 TS dt 0.0361473 time 0.963853</div><div>7 TS dt 0.188252 time 1.</div><div>error at tf = 1.000 : |y-y_exact|_inf = 0.000144484</div></div><div><br></div><div>I want to output the trajectory in PETSc binary and plot it in python using bin/PetscBinaryIO.py. Clearly I need the times shown above to do that.</div><div><br></div><div>Note "-ts_monitor_solution binary:XX" gives me a binary file with only y values in it, but not the corresponding times.</div><div><br></div><div>My question is, how to get those times in either the same binary file (preferred) or separate binary files? I have tried</div><div><br></div><div>$ ./ode -ts_monitor binary:foo.dat # invalid</div><div>$ ./ode -ts_monitor_solution binary:bar.dat # no t in file<br></div>$ ./ode -ts_monitor_solution binary:baz.dat -ts_save_trajectory # no t in file<br clear="all"><div><br></div><div>without success. (I am not sure what the boolean option -ts_save_trajectory does, by the way.)</div><div><br></div><div>Thanks!</div><div><br></div><div>Ed</div><div><br></div><div>PS Sorry if this is a "RTFM" question, but so far I can't find the documentation.</div><div><br></div><div><br></div>-- <br><div class="gmail_signature">Ed Bueler<br>Dept of Math and Stat and Geophysical Institute<br>University of Alaska Fairbanks<br>Fairbanks, AK 99775-6660<br>301C Chapman and 410D Elvey<br>907 474-7693 and 907 474-7199 (fax 907 474-5394)</div>
</div>