Actual source code: tao_reg.c
1: /*$Id: tao_reg.c 1.57 04/04/15 18:50:44-05:00 benson@rockies.mcs.anl.gov $*/
3: #include "src/tao_impl.h" /*I "tao_solver.h" I*/
33: /* #undef USE_DYNAMIC_LIBRARIES */
34:
35: /*
36: This routine is used by TaoSetType() to make sure that
37: TaoRegisterAll() is called at least once. In general, if
38: there is more than one DLL, then TaoRegisterAll() may be
39: called several times.
40: */
41: static int TaoRegisterAllCalled=0;
43: int TaoStandardRegisterAll(){
44: int info;
45: char path[PETSC_MAX_PATH_LEN];
46: info = PetscStrcpy(path,TAO_LIB_DIR); CHKERRQ(info);
47: info = PetscStrcat(path,"/libtao.so");
48: TaoFunctionBegin;
49: if (TaoRegisterAllCalled){
50: TaoFunctionReturn(0);
51: }
52: info=TaoRegisterAll(path); CHKERRQ(info);
53: TaoFunctionReturn(0);
54: }
58: /*@C
59: TaoRegisterAll - Registers all of the minimization methods in the TAO_SOLVER package.
61: Not Collective
63: Level: advanced
65: .keywords: TAO_SOLVER, register, all
67: .seealso: TaoRegisterDestroy()
68: @*/
69: int TaoRegisterAll(const char *path)
70: {
71: int info;
72: TaoFunctionBegin;
73: TaoRegisterAllCalled = 1;
75: info = TaoRegisterDynamic("tao_lmvm",path,"TaoCreate_LMVM",TaoCreate_LMVM); CHKERRQ(info);
76: info = TaoRegisterDynamic("tao_nlmvm",path,"TaoCreate_NLMVM",TaoCreate_NLMVM); CHKERRQ(info);
77: info = TaoRegisterDynamic("tao_nls",path,"TaoCreate_NLS",TaoCreate_NLS); CHKERRQ(info);
78: info = TaoRegisterDynamic("tao_cg_fr",path,"TaoCreate_CG_FR",TaoCreate_CG_FR); CHKERRQ(info);
79: info = TaoRegisterDynamic("tao_cg_prp",path,"TaoCreate_CG_PRP",TaoCreate_CG_PRP); CHKERRQ(info);
80: info = TaoRegisterDynamic("tao_cg_pr",path,"TaoCreate_CG_PR",TaoCreate_CG_PR); CHKERRQ(info);
81: info = TaoRegisterDynamic("tao_bqpip",path,"TaoCreate_BQPIP",TaoCreate_BQPIP); CHKERRQ(info);
82: info = TaoRegisterDynamic("tao_blmvm",path,"TaoCreate_BLMVM",TaoCreate_BLMVM); CHKERRQ(info);
83: info = TaoRegisterDynamic("tao_bnls",path,"TaoCreate_BNLS",TaoCreate_BNLS); CHKERRQ(info);
84: info = TaoRegisterDynamic("tao_tron",path,"TaoCreate_TRON",TaoCreate_TRON); CHKERRQ(info);
85: #ifdef TAO_USE_PETSC
86: info = TaoRegisterDynamic("tao_ntr",path,"TaoCreate_NTR",TaoCreate_NTR); CHKERRQ(info);
87: #endif
88: info = TaoRegisterDynamic("tao_gpcg",path,"TaoCreate_GPCG",TaoCreate_GPCG); CHKERRQ(info);
90: // info = TaoRegisterDynamic("tao_nlsq",path,"TaoCreate_NLSQ",TaoCreate_NLSQ); CHKERRQ(info);
92: /* Add registration for the semismooth code using a linesearch. */
93: info = TaoRegisterDynamic("tao_ssils",path,"TaoCreate_SSILS",TaoCreate_SSILS); CHKERRQ(info);
94: info = TaoRegisterDynamic("tao_ssfls",path,"TaoCreate_SSFLS",TaoCreate_SSFLS); CHKERRQ(info);
95: info = TaoRegisterDynamic("tao_asils",path,"TaoCreate_ASILS",TaoCreate_ASILS); CHKERRQ(info);
96: info = TaoRegisterDynamic("tao_asfls",path,"TaoCreate_ASFLS",TaoCreate_ASFLS); CHKERRQ(info);
97: info = TaoRegisterDynamic("tao_isils",path,"TaoCreate_ISILS",TaoCreate_ISILS); CHKERRQ(info);
98: info = TaoRegisterDynamic("tao_kt",path,"TaoCreate_KT",TaoCreate_KT); CHKERRQ(info);
99: info = TaoRegisterDynamic("tao_rscs",path,"TaoCreate_RSCS",TaoCreate_RSCS); CHKERRQ(info);
100: info = TaoRegisterDynamic("tao_icp",path,"TaoCreate_ICP",TaoCreate_ICP); CHKERRQ(info);
101: /*
102: info = TaoRegisterDynamic("tao_bcg",path,"TaoCreate_BCG",TaoCreate_BCG); CHKERRQ(info);
103: info = TaoRegisterDynamic("tao_qpip",path,"TaoCreate_QPIP",TaoCreate_QPIP); CHKERRQ(info);
104: */
106: TaoFunctionReturn(0);
107: }