1*4b33d51aSBarry Smith #ifndef lint 2*4b33d51aSBarry Smith static char vcid[] = "$Id: exnonlin.c,v 1.1 1996/01/05 23:27:00 bsmith Exp bsmith $"; 3*4b33d51aSBarry Smith #endif 4*4b33d51aSBarry Smith /* 5*4b33d51aSBarry Smith Code for Time Stepping for explict non-linear problems. 6*4b33d51aSBarry Smith */ 7*4b33d51aSBarry Smith #include <math.h> 8*4b33d51aSBarry Smith #include "tsimpl.h" /*I "ts.h" I*/ 9*4b33d51aSBarry Smith #include "pinclude/pviewer.h" 10*4b33d51aSBarry Smith 11*4b33d51aSBarry Smith 12*4b33d51aSBarry Smith static int TSSetUp_ExNonLin(TS ts) 13*4b33d51aSBarry Smith { 14*4b33d51aSBarry Smith Vec sol = ts->vec_sol; 15*4b33d51aSBarry Smith int ierr; 16*4b33d51aSBarry Smith 17*4b33d51aSBarry Smith /* form initial functions */ 18*4b33d51aSBarry Smith ierr = (*ts->computeinitial)(ts,sol,ts->gusP); CHKERRQ(ierr); 19*4b33d51aSBarry Smith 20*4b33d51aSBarry Smith 21*4b33d51aSBarry Smith 22*4b33d51aSBarry Smith 23*4b33d51aSBarry Smith return 0; 24*4b33d51aSBarry Smith } 25*4b33d51aSBarry Smith 26*4b33d51aSBarry Smith static int TSStep_ExNonLin(TS ts,int *steps) 27*4b33d51aSBarry Smith { 28*4b33d51aSBarry Smith Vec sol = ts->vec_sol; 29*4b33d51aSBarry Smith int ierr; 30*4b33d51aSBarry Smith 31*4b33d51aSBarry Smith 32*4b33d51aSBarry Smith 33*4b33d51aSBarry Smith 34*4b33d51aSBarry Smith return 0; 35*4b33d51aSBarry Smith } 36*4b33d51aSBarry Smith /*------------------------------------------------------------*/ 37*4b33d51aSBarry Smith static int TSDestroy_ExNonLin(PetscObject obj ) 38*4b33d51aSBarry Smith { 39*4b33d51aSBarry Smith TS ts = (TS) ts; 40*4b33d51aSBarry Smith 41*4b33d51aSBarry Smith return 0; 42*4b33d51aSBarry Smith } 43*4b33d51aSBarry Smith /*------------------------------------------------------------*/ 44*4b33d51aSBarry Smith 45*4b33d51aSBarry Smith static int TSSetFromOptions_ExNonLin(TS ts) 46*4b33d51aSBarry Smith { 47*4b33d51aSBarry Smith 48*4b33d51aSBarry Smith return 0; 49*4b33d51aSBarry Smith } 50*4b33d51aSBarry Smith 51*4b33d51aSBarry Smith static int TSPrintHelp_ExNonLin(TS ts) 52*4b33d51aSBarry Smith { 53*4b33d51aSBarry Smith 54*4b33d51aSBarry Smith return 0; 55*4b33d51aSBarry Smith } 56*4b33d51aSBarry Smith 57*4b33d51aSBarry Smith static int TSView_ExNonLin(PetscObject obj,Viewer viewer) 58*4b33d51aSBarry Smith { 59*4b33d51aSBarry Smith TS ts = (TS)obj; 60*4b33d51aSBarry Smith 61*4b33d51aSBarry Smith return 0; 62*4b33d51aSBarry Smith } 63*4b33d51aSBarry Smith 64*4b33d51aSBarry Smith /* ------------------------------------------------------------ */ 65*4b33d51aSBarry Smith int TSCreate_ExNonLin(TS ts ) 66*4b33d51aSBarry Smith { 67*4b33d51aSBarry Smith ts->type = 0; 68*4b33d51aSBarry Smith ts->setup = TSSetUp_ExNonLin; 69*4b33d51aSBarry Smith ts->step = TSStep_ExNonLin; 70*4b33d51aSBarry Smith ts->destroy = TSDestroy_ExNonLin; 71*4b33d51aSBarry Smith ts->printhelp = TSPrintHelp_ExNonLin; 72*4b33d51aSBarry Smith ts->setfromoptions = TSSetFromOptions_ExNonLin; 73*4b33d51aSBarry Smith ts->view = TSView_ExNonLin; 74*4b33d51aSBarry Smith 75*4b33d51aSBarry Smith return 0; 76*4b33d51aSBarry Smith } 77