Actual source code: tao_reg.c
1: /*$Id$*/
3: #include "src/tao_impl.h" /*I "tao_solver.h" I*/
33: /* #undef USE_DYNAMIC_LIBRARIES */
36: /*
37: This routine is used by TaoSetType() to make sure that
38: TaoRegisterAll() is called at least once. In general, if
39: there is more than one DLL, then TaoRegisterAll() may be
40: called several times.
41: */
42: static int TaoRegisterAllCalled=0;
44: int TaoStandardRegisterAll(){
45: int info;
46: char path[PETSC_MAX_PATH_LEN];
47: info = PetscStrcpy(path,TAO_LIB_DIR); CHKERRQ(info);
48: info = PetscStrcat(path,"/libtao");
49: TaoFunctionBegin;
50: if (TaoRegisterAllCalled){
51: TaoFunctionReturn(0);
52: }
53: #ifdef PETSC_USE_DYNAMIC_LIBRARIES
54: info = PetscDLLibraryAppend(PETSC_COMM_WORLD,&DLLibrariesLoaded,path);CHKERRQ(info);
55: #endif
56: info=TaoRegisterAll(path); CHKERRQ(info);
57: TaoFunctionReturn(0);
58: }
62: /*@C
63: TaoRegisterAll - Registers all of the minimization methods in the TAO_SOLVER package.
65: Not Collective
67: Level: advanced
69: .keywords: TAO_SOLVER, register, all
71: .seealso: TaoRegisterDestroy()
72: @*/
73: int TaoRegisterAll(const char *path)
74: {
75: int info;
76: TaoFunctionBegin;
77: TaoRegisterAllCalled = 1;
79: info = TaoRegisterDynamic("tao_lmvm",path,"TaoCreate_LMVM",TaoCreate_LMVM); CHKERRQ(info);
80: info = TaoRegisterDynamic("tao_nls",path,"TaoCreate_NLS",TaoCreate_NLS); CHKERRQ(info);
81: info = TaoRegisterDynamic("tao_cg",path,"TaoCreate_CG",TaoCreate_CG); CHKERRQ(info);
82: info = TaoRegisterDynamic("tao_bqpip",path,"TaoCreate_BQPIP",TaoCreate_BQPIP); CHKERRQ(info);
83: info = TaoRegisterDynamic("tao_blmvm",path,"TaoCreate_BLMVM",TaoCreate_BLMVM); CHKERRQ(info);
84: info = TaoRegisterDynamic("tao_bnls",path,"TaoCreate_BNLS",TaoCreate_BNLS); CHKERRQ(info);
85: info = TaoRegisterDynamic("tao_tron",path,"TaoCreate_TRON",TaoCreate_TRON); CHKERRQ(info);
86: info = TaoRegisterDynamic("tao_nm",path,"TaoCreate_NelderMead",TaoCreate_NelderMead); CHKERRQ(info);
87: #ifdef TAO_USE_PETSC
88: info = TaoRegisterDynamic("tao_ntr",path,"TaoCreate_NTR",TaoCreate_NTR); CHKERRQ(info);
89: #endif
90: info = TaoRegisterDynamic("tao_gpcg",path,"TaoCreate_GPCG",TaoCreate_GPCG); CHKERRQ(info);
91: info = TaoRegisterDynamic("tao_nm",path,"TaoCreate_NelderMead",TaoCreate_NelderMead); CHKERRQ(info);
93: // info = TaoRegisterDynamic("tao_nlsq",path,"TaoCreate_NLSQ",TaoCreate_NLSQ); CHKERRQ(info);
95: /* Add registration for the semismooth code using a linesearch. */
96: info = TaoRegisterDynamic("tao_ssils",path,"TaoCreate_SSILS",TaoCreate_SSILS); CHKERRQ(info);
97: info = TaoRegisterDynamic("tao_ssfls",path,"TaoCreate_SSFLS",TaoCreate_SSFLS); CHKERRQ(info);
98: info = TaoRegisterDynamic("tao_asils",path,"TaoCreate_ASILS",TaoCreate_ASILS); CHKERRQ(info);
99: info = TaoRegisterDynamic("tao_asfls",path,"TaoCreate_ASFLS",TaoCreate_ASFLS); CHKERRQ(info);
100: info = TaoRegisterDynamic("tao_isils",path,"TaoCreate_ISILS",TaoCreate_ISILS); CHKERRQ(info);
101: info = TaoRegisterDynamic("tao_kt",path,"TaoCreate_KT",TaoCreate_KT); CHKERRQ(info);
102: info = TaoRegisterDynamic("tao_rscs",path,"TaoCreate_RSCS",TaoCreate_RSCS); CHKERRQ(info);
103: info = TaoRegisterDynamic("tao_icp",path,"TaoCreate_ICP",TaoCreate_ICP); CHKERRQ(info);
104: info = TaoRegisterDynamic("tao_fd_test",path,"TaoCreate_FD",TaoCreate_FD); CHKERRQ(info);
105: /*
106: info = TaoRegisterDynamic("tao_bcg",path,"TaoCreate_BCG",TaoCreate_BCG); CHKERRQ(info);
107: info = TaoRegisterDynamic("tao_qpip",path,"TaoCreate_QPIP",TaoCreate_QPIP); CHKERRQ(info);
108: */
109:
110: TaoFunctionReturn(0);
111: }