1*63dd3a1aSKris Buschelman #define PETSCSNES_DLL 2eaa2832dSBarry Smith 3e090d566SSatish Balay #include "src/snes/snesimpl.h" /*I "petscsnes.h" I*/ 4fb2e594dSBarry Smith 5fb2e594dSBarry Smith EXTERN_C_BEGIN 6*63dd3a1aSKris Buschelman EXTERN PetscErrorCode PETSCSNES_DLLEXPORT SNESCreate_LS(SNES); 7*63dd3a1aSKris Buschelman EXTERN PetscErrorCode PETSCSNES_DLLEXPORT SNESCreate_TR(SNES); 8*63dd3a1aSKris Buschelman EXTERN PetscErrorCode PETSCSNES_DLLEXPORT SNESCreate_Test(SNES); 9fb2e594dSBarry Smith EXTERN_C_END 10eaa2832dSBarry Smith 1182bf6240SBarry Smith /* 1282bf6240SBarry Smith This is used by SNESSetType() to make sure that at least one 1382bf6240SBarry Smith SNESRegisterAll() is called. In general, if there is more than one 1482bf6240SBarry Smith DLL then SNESRegisterAll() may be called several times. 1582bf6240SBarry Smith */ 164c49b128SBarry Smith extern PetscTruth SNESRegisterAllCalled; 1782bf6240SBarry Smith 184a2ae208SSatish Balay #undef __FUNCT__ 194a2ae208SSatish Balay #define __FUNCT__ "SNESRegisterAll" 2083f0b094SBarry Smith /*@C 2182bf6240SBarry Smith SNESRegisterAll - Registers all of the nonlinear solver methods in the SNES package. 22eaa2832dSBarry Smith 23fee21e36SBarry Smith Not Collective 24fee21e36SBarry Smith 2536851e7fSLois Curfman McInnes Level: advanced 2636851e7fSLois Curfman McInnes 2782bf6240SBarry Smith .keywords: SNES, register, all 28eaa2832dSBarry Smith 2982bf6240SBarry Smith .seealso: SNESRegisterDestroy() 30eaa2832dSBarry Smith @*/ 31*63dd3a1aSKris Buschelman PetscErrorCode PETSCSNES_DLLEXPORT SNESRegisterAll(const char path[]) 32eaa2832dSBarry Smith { 33dfbe8321SBarry Smith PetscErrorCode ierr; 3482bf6240SBarry Smith 353a40ed3dSBarry Smith PetscFunctionBegin; 364c49b128SBarry Smith SNESRegisterAllCalled = PETSC_TRUE; 3782bf6240SBarry Smith 384b27c08aSLois Curfman McInnes ierr = SNESRegisterDynamic("ls", path,"SNESCreate_LS",SNESCreate_LS);CHKERRQ(ierr); 394b27c08aSLois Curfman McInnes ierr = SNESRegisterDynamic("tr", path,"SNESCreate_TR",SNESCreate_TR);CHKERRQ(ierr); 40f1af5d2fSBarry Smith ierr = SNESRegisterDynamic("test", path,"SNESCreate_Test", SNESCreate_Test);CHKERRQ(ierr); 4182bf6240SBarry Smith 423a40ed3dSBarry Smith PetscFunctionReturn(0); 43eaa2832dSBarry Smith } 4482bf6240SBarry Smith 45