1*353a3ba4SBarry Smith /* $Id: snes.h,v 1.2 1995/03/20 00:23:58 bsmith Exp bsmith $ */ 2b1f5cb9dSBarry Smith 3f03417d3SBarry Smith #if !defined(__SNES_PACKAGE) 4f03417d3SBarry Smith #define __SNES_PACKAGE 5b1f5cb9dSBarry Smith 6*353a3ba4SBarry Smith typedef struct _SNES* SNES; 7b1f5cb9dSBarry Smith 8*353a3ba4SBarry Smith typedef enum { SNES_NLS1, 9*353a3ba4SBarry Smith SNES_NTR1, 10*353a3ba4SBarry Smith SNES_NTR2_DOG, 11*353a3ba4SBarry Smith SNES_NTR2_LIN, 12*353a3ba4SBarry Smith SNES_NBASIC, 13*353a3ba4SBarry Smith SUMS_NLS1, 14*353a3ba4SBarry Smith SUMS_NTR1 } 15*353a3ba4SBarry Smith SNESMETHOD; 16b1f5cb9dSBarry Smith 17*353a3ba4SBarry Smith typedef enum { SNESINITIAL_GUESS, 18*353a3ba4SBarry Smith SNESRESIDUAL, 19*353a3ba4SBarry Smith SNESFUNCTION, 20*353a3ba4SBarry Smith SNESGRADIENT, 21*353a3ba4SBarry Smith SNESMATRIX, 22*353a3ba4SBarry Smith SNESCORE, 23*353a3ba4SBarry Smith SNESSTEP_SETUP, 24*353a3ba4SBarry Smith SNESSTEP_COMPUTE, 25*353a3ba4SBarry Smith SNESSTEP_DESTROY, 26*353a3ba4SBarry Smith SNESTOTAL } 27*353a3ba4SBarry Smith SNESPHASE; 28f03417d3SBarry Smith 29*353a3ba4SBarry Smith typedef enum { SNES, SUMS } SNESTYPE; 30f03417d3SBarry Smith 31*353a3ba4SBarry Smith extern int SNESSetResidual(SNES,Vec); 32*353a3ba4SBarry Smith extern int SNESGetResidual(SNES,Vec*); 33*353a3ba4SBarry Smith extern int SNESSetResidualRoutine(SNES,int (*)(void*,Vec,Vec),int,void*); 34*353a3ba4SBarry Smith extern int SNESSetMaxResidualEvaluations(SNES,int); 35*353a3ba4SBarry Smith 36*353a3ba4SBarry Smith extern int SNESDefaultMonitor ANSI_ARGS((NLCtx*, void*, void*, 37f03417d3SBarry Smith double *)); 38*353a3ba4SBarry Smith extern int SNESDefaultConverged ANSI_ARGS((NLCtx*, double*, double*, 39f03417d3SBarry Smith double *)); 40f03417d3SBarry Smith extern int SNESGetSLES(SNES,SLES*); 41f03417d3SBarry Smith 42*353a3ba4SBarry Smith extern int SNESSetDampingFlag ANSI_ARGS((NLCtx*, int)); 43b1f5cb9dSBarry Smith extern int NLSlesGetDampingFlag ANSI_ARGS((NLCtx *)); 44*353a3ba4SBarry Smith 45b1f5cb9dSBarry Smith 46b1f5cb9dSBarry Smith /* --- Miscellaneous routines --- */ 47*353a3ba4SBarry Smith extern int SNESSetUp(SNES); 48*353a3ba4SBarry Smith extern int NLSlesSetGeneralStep ANSI_ARGS((NLCtx*, 49b1f5cb9dSBarry Smith void (*)(NLCtx *, void *) )); 50*353a3ba4SBarry Smith extern int NLSlesSetRoutines ANSI_ARGS((NLCtx*, 51*353a3ba4SBarry Smith void (*)(NLCtx *, int *) )); 52*353a3ba4SBarry Smith extern int NLSlesApplyForwardSolve ANSI_ARGS((NLCtx*, void*, void *)); 53*353a3ba4SBarry Smith extern int NLSlesApplyBackwardSolve ANSI_ARGS((NLCtx*, void*, void *)); 54*353a3ba4SBarry Smith int NLSlesCheck ANSI_ARGS((NLCtx*, char*)); 55b1f5cb9dSBarry Smith extern int NLSlesSolveScale ANSI_ARGS((NLCtx*, void*, void*, 56b1f5cb9dSBarry Smith void*, double*, double*, double*, 57b1f5cb9dSBarry Smith double*, double*, void *)); 58b1f5cb9dSBarry Smith 59