#include /*I "petscts.h" I*/ #include #include #include #include /* Logging support */ PetscClassId TS_CLASSID, DMTS_CLASSID; PetscLogEvent TS_Step, TS_PseudoComputeTimeStep, TS_FunctionEval, TS_JacobianEval; const char *const TSExactFinalTimeOptions[] = {"STEPOVER","INTERPOLATE","MATCHSTEP","TSExactFinalTimeOption","TS_EXACTFINALTIME_",0}; struct _n_TSMonitorDrawCtx { PetscViewer viewer; PetscDrawAxis axis; Vec initialsolution; PetscBool showinitial; PetscInt howoften; /* when > 0 uses step % howoften, when negative only final solution plotted */ PetscBool showtimestepandtime; int color; }; #undef __FUNCT__ #define __FUNCT__ "TSSetFromOptions" /*@ TSSetFromOptions - Sets various TS parameters from user options. Collective on TS Input Parameter: . ts - the TS context obtained from TSCreate() Options Database Keys: + -ts_type - TSEULER, TSBEULER, TSSUNDIALS, TSPSEUDO, TSCN, TSRK, TSTHETA, TSGL, TSSSP . -ts_save_trajectory - checkpoint the solution at each time-step . -ts_max_steps - maximum number of time-steps to take . -ts_final_time