#include /*I "petscts.h" I*/ #include #include #include // For TSSetFromOptions() #include // For TSSetFromOptions() #include #include #include /* Logging support */ PetscClassId TS_CLASSID, DMTS_CLASSID; PetscLogEvent TS_Step, TS_PseudoComputeTimeStep, TS_FunctionEval, TS_JacobianEval; const char *const TSExactFinalTimeOptions[] = {"UNSPECIFIED", "STEPOVER", "INTERPOLATE", "MATCHSTEP", "TSExactFinalTimeOption", "TS_EXACTFINALTIME_", NULL}; static PetscErrorCode TSAdaptSetDefaultType(TSAdapt adapt, TSAdaptType default_type) { PetscFunctionBegin; PetscValidHeaderSpecific(adapt, TSADAPT_CLASSID, 1); PetscAssertPointer(default_type, 2); if (!((PetscObject)adapt)->type_name) PetscCall(TSAdaptSetType(adapt, default_type)); PetscFunctionReturn(PETSC_SUCCESS); } /*@ TSSetFromOptions - Sets various `TS` parameters from the options database Collective Input Parameter: . ts - the `TS` context obtained from `TSCreate()` Options Database Keys: + -ts_type - EULER, BEULER, SUNDIALS, PSEUDO, CN, RK, THETA, ALPHA, GLLE, SSP, GLEE, BSYMP, IRK, see `TSType` . -ts_save_trajectory - checkpoint the solution at each time-step . -ts_max_time