Date: 2022-03-31T04:48:57+00:00

Actual source code: taosolverregi.c

      1: #define TAO_DLL

      3: #include <petsc/private/taoimpl.h>

      5: PETSC_EXTERN PetscErrorCode TaoCreate_LMVM(Tao);
      6: PETSC_EXTERN PetscErrorCode TaoCreate_NLS(Tao);
      7: PETSC_EXTERN PetscErrorCode TaoCreate_NTR(Tao);
      8: PETSC_EXTERN PetscErrorCode TaoCreate_NTL(Tao);
      9: PETSC_EXTERN PetscErrorCode TaoCreate_NM(Tao);
     10: PETSC_EXTERN PetscErrorCode TaoCreate_CG(Tao);
     11: PETSC_EXTERN PetscErrorCode TaoCreate_TRON(Tao);
     12: PETSC_EXTERN PetscErrorCode TaoCreate_OWLQN(Tao);
     13: PETSC_EXTERN PetscErrorCode TaoCreate_BMRM(Tao);
     14: PETSC_EXTERN PetscErrorCode TaoCreate_BLMVM(Tao);
     15: PETSC_EXTERN PetscErrorCode TaoCreate_BQNLS(Tao);
     16: PETSC_EXTERN PetscErrorCode TaoCreate_BNCG(Tao);
     17: PETSC_EXTERN PetscErrorCode TaoCreate_BNLS(Tao);
     18: PETSC_EXTERN PetscErrorCode TaoCreate_BNTR(Tao);
     19: PETSC_EXTERN PetscErrorCode TaoCreate_BNTL(Tao);
     20: PETSC_EXTERN PetscErrorCode TaoCreate_BQNKLS(Tao);
     21: PETSC_EXTERN PetscErrorCode TaoCreate_BQNKTR(Tao);
     22: PETSC_EXTERN PetscErrorCode TaoCreate_BQNKTL(Tao);
     23: PETSC_EXTERN PetscErrorCode TaoCreate_GPCG(Tao);
     24: PETSC_EXTERN PetscErrorCode TaoCreate_BQPIP(Tao);
     25: PETSC_EXTERN PetscErrorCode TaoCreate_POUNDERS(Tao);
     26: PETSC_EXTERN PetscErrorCode TaoCreate_BRGN(Tao);
     27: PETSC_EXTERN PetscErrorCode TaoCreate_LCL(Tao);
     28: PETSC_EXTERN PetscErrorCode TaoCreate_SSILS(Tao);
     29: PETSC_EXTERN PetscErrorCode TaoCreate_SSFLS(Tao);
     30: PETSC_EXTERN PetscErrorCode TaoCreate_ASILS(Tao);
     31: PETSC_EXTERN PetscErrorCode TaoCreate_ASFLS(Tao);
     32: PETSC_EXTERN PetscErrorCode TaoCreate_IPM(Tao);
     33: PETSC_EXTERN PetscErrorCode TaoCreate_PDIPM(Tao);
     34: PETSC_EXTERN PetscErrorCode TaoCreate_ADMM(Tao);
     35: PETSC_EXTERN PetscErrorCode TaoCreate_ALMM(Tao);
     36: PETSC_EXTERN PetscErrorCode TaoCreate_Shell(Tao);

     38: /*
     39:    Offset the convergence reasons so negative number represent diverged and
     40:    positive represent converged.
     41: */
     42: const char *TaoConvergedReasons_Shifted[] = {
     43:     "DIVERGED_USER",
     44:     "DIVERGED_TR_REDUCTION",
     45:     "DIVERGED_LS_FAILURE",
     46:     "DIVERGED_MAXFCN",
     47:     "DIVERGED_NAN",
     48:     "",
     49:     "DIVERGED_MAXITS",
     50:     "DIVERGED_FUNCTION_DOMAIN",

     52:     "CONTINUE_ITERATING",

     54:     "",
     55:     "",
     56:     "CONVERGED_GATOL",
     57:     "CONVERGED_GRTOL",
     58:     "CONVERGED_GTTOL",
     59:     "CONVERGED_STEPTOL",
     60:     "CONVERGED_MINF",
     61:     "CONVERGED_USER" };
     62: const char **TaoConvergedReasons = TaoConvergedReasons_Shifted - TAO_DIVERGED_USER;

     64: /*@C
     65:   TaoRegisterAll - Registers all of the minimization methods in the TAO
     66:   package.

     68:   Not Collective

     70:   Level: developer

     72: .seealso TaoRegister(), TaoRegisterDestroy()
     73: @*/
     74: PetscErrorCode TaoRegisterAll(void)
     75: {
     76: #if !defined(PETSC_USE_COMPLEX)
     77: #endif

     79:   if (TaoRegisterAllCalled) return 0;
     80:   TaoRegisterAllCalled = PETSC_TRUE;
     81: #if !defined(PETSC_USE_COMPLEX)
     82:   TaoRegister(TAOLMVM,TaoCreate_LMVM);
     83:   TaoRegister(TAONLS,TaoCreate_NLS);
     84:   TaoRegister(TAONTR,TaoCreate_NTR);
     85:   TaoRegister(TAONTL,TaoCreate_NTL);
     86:   TaoRegister(TAOCG,TaoCreate_CG);
     87:   TaoRegister(TAOTRON,TaoCreate_TRON);
     88:   TaoRegister(TAOOWLQN,TaoCreate_OWLQN);
     89:   TaoRegister(TAOBMRM,TaoCreate_BMRM);
     90:   TaoRegister(TAOBLMVM,TaoCreate_BLMVM);
     91:   TaoRegister(TAOBQNLS,TaoCreate_BQNLS);
     92:   TaoRegister(TAOBNCG,TaoCreate_BNCG);
     93:   TaoRegister(TAOBNLS,TaoCreate_BNLS);
     94:   TaoRegister(TAOBNTR,TaoCreate_BNTR);
     95:   TaoRegister(TAOBNTL,TaoCreate_BNTL);
     96:   TaoRegister(TAOBQNKLS,TaoCreate_BQNKLS);
     97:   TaoRegister(TAOBQNKTR,TaoCreate_BQNKTR);
     98:   TaoRegister(TAOBQNKTL,TaoCreate_BQNKTL);
     99:   TaoRegister(TAOBQPIP,TaoCreate_BQPIP);
    100:   TaoRegister(TAOGPCG,TaoCreate_GPCG);
    101:   TaoRegister(TAONM,TaoCreate_NM);
    102:   TaoRegister(TAOPOUNDERS,TaoCreate_POUNDERS);
    103:   TaoRegister(TAOBRGN,TaoCreate_BRGN);
    104:   TaoRegister(TAOLCL,TaoCreate_LCL);
    105:   TaoRegister(TAOSSILS,TaoCreate_SSILS);
    106:   TaoRegister(TAOSSFLS,TaoCreate_SSFLS);
    107:   TaoRegister(TAOASILS,TaoCreate_ASILS);
    108:   TaoRegister(TAOASFLS,TaoCreate_ASFLS);
    109:   TaoRegister(TAOIPM,TaoCreate_IPM);
    110:   TaoRegister(TAOPDIPM,TaoCreate_PDIPM);
    111:   TaoRegister(TAOSHELL,TaoCreate_Shell);
    112:   TaoRegister(TAOADMM,TaoCreate_ADMM);
    113:   TaoRegister(TAOALMM,TaoCreate_ALMM);
    114: #endif
    115:   return 0;
    116: }