xref: /petsc/src/snes/interface/snesregi.c (revision 36851e7ff8b7b138dacde63871c4a6f4b13dee77)
1a5eb4965SSatish Balay #ifdef PETSC_RCS_HEADER
2*36851e7fSLois Curfman McInnes static char vcid[] = "$Id: snesregi.c,v 1.28 1998/10/19 22:19:39 bsmith Exp curfman $";
3eaa2832dSBarry Smith #endif
4eaa2832dSBarry Smith 
570f55243SBarry Smith #include "src/snes/snesimpl.h"     /*I  "snes.h"  I*/
6fb2e594dSBarry Smith 
7fb2e594dSBarry Smith EXTERN_C_BEGIN
840191667SLois Curfman McInnes extern int SNESCreate_EQ_LS(SNES);
940191667SLois Curfman McInnes extern int SNESCreate_EQ_TR(SNES);
1040191667SLois Curfman McInnes extern int SNESCreate_UM_TR(SNES);
1140191667SLois Curfman McInnes extern int SNESCreate_UM_LS(SNES);
12c6abb9f5SBarry Smith extern int SNESCreate_Test(SNES);
13fb2e594dSBarry Smith EXTERN_C_END
14eaa2832dSBarry Smith 
1582bf6240SBarry Smith /*
1682bf6240SBarry Smith       This is used by SNESSetType() to make sure that at least one
1782bf6240SBarry Smith     SNESRegisterAll() is called. In general, if there is more than one
1882bf6240SBarry Smith     DLL then SNESRegisterAll() may be called several times.
1982bf6240SBarry Smith */
2082bf6240SBarry Smith extern int SNESRegisterAllCalled;
2182bf6240SBarry Smith 
225615d1e5SSatish Balay #undef __FUNC__
23d4bb536fSBarry Smith #define __FUNC__ "SNESRegisterAll"
2483f0b094SBarry Smith /*@C
2582bf6240SBarry Smith    SNESRegisterAll - Registers all of the nonlinear solver methods in the SNES package.
26eaa2832dSBarry Smith 
27fee21e36SBarry Smith    Not Collective
28fee21e36SBarry Smith 
29*36851e7fSLois Curfman McInnes    Level: advanced
30*36851e7fSLois Curfman McInnes 
3182bf6240SBarry Smith .keywords: SNES, register, all
32eaa2832dSBarry Smith 
3382bf6240SBarry Smith .seealso:  SNESRegisterDestroy()
34eaa2832dSBarry Smith @*/
3582bf6240SBarry Smith int SNESRegisterAll(char *path)
36eaa2832dSBarry Smith {
3782bf6240SBarry Smith   int ierr;
3882bf6240SBarry Smith 
393a40ed3dSBarry Smith   PetscFunctionBegin;
4084cb2905SBarry Smith   SNESRegisterAllCalled = 1;
4182bf6240SBarry Smith 
4282bf6240SBarry Smith   ierr = SNESRegister("ls",   path,"SNESCreate_EQ_LS",SNESCreate_EQ_LS);CHKERRQ(ierr);
4382bf6240SBarry Smith   ierr = SNESRegister("tr",   path,"SNESCreate_EQ_TR",SNESCreate_EQ_TR);CHKERRQ(ierr);
4482bf6240SBarry Smith   ierr = SNESRegister("test", path,"SNESCreate_Test", SNESCreate_Test);CHKERRQ(ierr);
4582bf6240SBarry Smith   ierr = SNESRegister("umtr", path,"SNESCreate_UM_TR",SNESCreate_UM_TR);CHKERRQ(ierr);
4682bf6240SBarry Smith   ierr = SNESRegister("umls", path,"SNESCreate_UM_LS",SNESCreate_UM_LS);CHKERRQ(ierr);
4782bf6240SBarry Smith 
483a40ed3dSBarry Smith   PetscFunctionReturn(0);
49eaa2832dSBarry Smith }
5082bf6240SBarry Smith 
51