xref: /petsc/src/snes/interface/snesregi.c (revision fb2e594d8f68f8681074c622797ad38167836a20)
1a5eb4965SSatish Balay #ifdef PETSC_RCS_HEADER
2*fb2e594dSBarry Smith static char vcid[] = "$Id: snesregi.c,v 1.27 1998/04/22 14:13:53 curfman Exp bsmith $";
3eaa2832dSBarry Smith #endif
4eaa2832dSBarry Smith 
570f55243SBarry Smith #include "src/snes/snesimpl.h"     /*I  "snes.h"  I*/
6*fb2e594dSBarry Smith 
7*fb2e594dSBarry 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);
13*fb2e594dSBarry 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 
2982bf6240SBarry Smith .keywords: SNES, register, all
30eaa2832dSBarry Smith 
3182bf6240SBarry Smith .seealso:  SNESRegisterDestroy()
32eaa2832dSBarry Smith @*/
3382bf6240SBarry Smith int SNESRegisterAll(char *path)
34eaa2832dSBarry Smith {
3582bf6240SBarry Smith   int ierr;
3682bf6240SBarry Smith 
373a40ed3dSBarry Smith   PetscFunctionBegin;
3884cb2905SBarry Smith   SNESRegisterAllCalled = 1;
3982bf6240SBarry Smith 
4082bf6240SBarry Smith   ierr = SNESRegister("ls",   path,"SNESCreate_EQ_LS",SNESCreate_EQ_LS);CHKERRQ(ierr);
4182bf6240SBarry Smith   ierr = SNESRegister("tr",   path,"SNESCreate_EQ_TR",SNESCreate_EQ_TR);CHKERRQ(ierr);
4282bf6240SBarry Smith   ierr = SNESRegister("test", path,"SNESCreate_Test", SNESCreate_Test);CHKERRQ(ierr);
4382bf6240SBarry Smith   ierr = SNESRegister("umtr", path,"SNESCreate_UM_TR",SNESCreate_UM_TR);CHKERRQ(ierr);
4482bf6240SBarry Smith   ierr = SNESRegister("umls", path,"SNESCreate_UM_LS",SNESCreate_UM_LS);CHKERRQ(ierr);
4582bf6240SBarry Smith 
463a40ed3dSBarry Smith   PetscFunctionReturn(0);
47eaa2832dSBarry Smith }
4882bf6240SBarry Smith 
49