Actual source code: taosolverregi.c
petsc-3.10.5 2019-03-28
Report Typos and Errors

      1: #define TAO_DLL

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

      6: PETSC_EXTERN PetscErrorCode TaoCreate_LMVM(Tao);
      7: PETSC_EXTERN PetscErrorCode TaoCreate_NLS(Tao);
      8: PETSC_EXTERN PetscErrorCode TaoCreate_NTR(Tao);
      9: PETSC_EXTERN PetscErrorCode TaoCreate_NTL(Tao);
     10: PETSC_EXTERN PetscErrorCode TaoCreate_NM(Tao);
     11: PETSC_EXTERN PetscErrorCode TaoCreate_CG(Tao);
     12: PETSC_EXTERN PetscErrorCode TaoCreate_TRON(Tao);
     13: PETSC_EXTERN PetscErrorCode TaoCreate_OWLQN(Tao);
     14: PETSC_EXTERN PetscErrorCode TaoCreate_BMRM(Tao);
     15: PETSC_EXTERN PetscErrorCode TaoCreate_BLMVM(Tao);
     16: PETSC_EXTERN PetscErrorCode TaoCreate_BQNLS(Tao);
     17: PETSC_EXTERN PetscErrorCode TaoCreate_BNCG(Tao);
     18: PETSC_EXTERN PetscErrorCode TaoCreate_BNLS(Tao);
     19: PETSC_EXTERN PetscErrorCode TaoCreate_BNTR(Tao);
     20: PETSC_EXTERN PetscErrorCode TaoCreate_BNTL(Tao);
     21: PETSC_EXTERN PetscErrorCode TaoCreate_BQNKLS(Tao);
     22: PETSC_EXTERN PetscErrorCode TaoCreate_BQNKTR(Tao);
     23: PETSC_EXTERN PetscErrorCode TaoCreate_BQNKTL(Tao);
     24: PETSC_EXTERN PetscErrorCode TaoCreate_GPCG(Tao);
     25: PETSC_EXTERN PetscErrorCode TaoCreate_BQPIP(Tao);
     26: PETSC_EXTERN PetscErrorCode TaoCreate_POUNDERS(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);

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

     47:     "CONTINUE_ITERATING",

     49:     "",
     50:     "",
     51:     "CONVERGED_GATOL",
     52:     "CONVERGED_GRTOL",
     53:     "CONVERGED_GTTOL",
     54:     "CONVERGED_STEPTOL",
     55:     "CONVERGED_MINF",
     56:     "CONVERGED_USER" };
     57: const char **TaoConvergedReasons = TaoConvergedReasons_Shifted + 7;

     59: /*@C
     60:   TaoRegisterAll - Registers all of the minimization methods in the TAO
     61:   package.

     63:   Not Collective

     65:   Level: developer

     67: .seealso TaoRegister(), TaoRegisterDestroy()
     68: @*/
     69: PetscErrorCode TaoRegisterAll(void)
     70: {
     71: #if !defined(PETSC_USE_COMPLEX)
     73: #endif

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