Actual source code: taosolverregi.c

petsc-3.13.3 2020-07-01
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_BRGN(Tao);
 28: PETSC_EXTERN PetscErrorCode TaoCreate_LCL(Tao);
 29: PETSC_EXTERN PetscErrorCode TaoCreate_SSILS(Tao);
 30: PETSC_EXTERN PetscErrorCode TaoCreate_SSFLS(Tao);
 31: PETSC_EXTERN PetscErrorCode TaoCreate_ASILS(Tao);
 32: PETSC_EXTERN PetscErrorCode TaoCreate_ASFLS(Tao);
 33: PETSC_EXTERN PetscErrorCode TaoCreate_IPM(Tao);
 34: PETSC_EXTERN PetscErrorCode TaoCreate_PDIPM(Tao);
 35: PETSC_EXTERN PetscErrorCode TaoCreate_ADMM(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)
 78: #endif

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