Date: 2026-03-31T05:46:03+00:00

Actual source code: petsctao_deprecations.h

      1: #pragma once

      3: /* MANSEC = Tao */

      5: PETSC_DEPRECATED_FUNCTION(3, 17, 0, "TaoSetSolution()", ) static inline PetscErrorCode TaoSetInitialVector(Tao t, Vec v)
      6: {
      7:   return TaoSetSolution(t, v);
      8: }
      9: PETSC_DEPRECATED_FUNCTION(3, 17, 0, "TaoGetSolution()", ) static inline PetscErrorCode TaoGetInitialVector(Tao t, Vec *v)
     10: {
     11:   return TaoGetSolution(t, v);
     12: }
     13: PETSC_DEPRECATED_FUNCTION(3, 17, 0, "TaoSetObjective()", ) static inline PetscErrorCode TaoSetObjectiveRoutine(Tao t, PetscErrorCode (*f)(Tao, Vec, PetscReal *, void *), void *c)
     14: {
     15:   return TaoSetObjective(t, f, c);
     16: }
     17: PETSC_DEPRECATED_FUNCTION(3, 17, 0, "TaoGetGradient()", ) static inline PetscErrorCode TaoGetGradientVector(Tao t, Vec *v)
     18: {
     19:   return TaoGetGradient(t, v, PETSC_NULLPTR, PETSC_NULLPTR);
     20: }
     21: PETSC_DEPRECATED_FUNCTION(3, 17, 0, "TaoSetGradient()", ) static inline PetscErrorCode TaoSetGradientRoutine(Tao t, PetscErrorCode (*f)(Tao, Vec, Vec, void *), void *c)
     22: {
     23:   return TaoSetGradient(t, PETSC_NULLPTR, f, c);
     24: }
     25: PETSC_DEPRECATED_FUNCTION(3, 17, 0, "TaoSetObjectiveAndGradient()", ) static inline PetscErrorCode TaoSetObjectiveAndGradientRoutine(Tao t, PetscErrorCode (*f)(Tao, Vec, PetscReal *, Vec, void *), void *c)
     26: {
     27:   return TaoSetObjectiveAndGradient(t, PETSC_NULLPTR, f, c);
     28: }
     29: PETSC_DEPRECATED_FUNCTION(3, 17, 0, "TaoSetHessian()", ) static inline PetscErrorCode TaoSetHessianRoutine(Tao t, Mat H, Mat P, PetscErrorCode (*f)(Tao, Vec, Mat, Mat, void *), void *c)
     30: {
     31:   return TaoSetHessian(t, H, P, f, c);
     32: }
     33: PETSC_DEPRECATED_FUNCTION(3, 11, 0, "TaoSetResidualRoutine()", ) static inline PetscErrorCode TaoSetSeparableObjectiveRoutine(Tao tao, Vec res, PetscErrorCode (*func)(Tao, Vec, Vec, void *), PetscCtx ctx)
     34: {
     35:   return TaoSetResidualRoutine(tao, res, func, ctx);
     36: }
     37: PETSC_DEPRECATED_FUNCTION(3, 11, 0, "TaoSetResidualWeights()", ) static inline PetscErrorCode TaoSetSeparableObjectiveWeights(Tao tao, Vec sigma_v, PetscInt n, PetscInt *rows, PetscInt *cols, PetscReal *vals)
     38: {
     39:   return TaoSetResidualWeights(tao, sigma_v, n, rows, cols, vals);
     40: }
     41: PETSC_DEPRECATED_FUNCTION(3, 11, 0, "TaoComputeResidual()", ) static inline PetscErrorCode TaoComputeSeparableObjective(Tao tao, Vec X, Vec F)
     42: {
     43:   return TaoComputeResidual(tao, X, F);
     44: }
     45: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorSet()", ) static inline PetscErrorCode TaoSetMonitor(Tao tao, PetscErrorCode (*monitor)(Tao, void *), PetscCtx ctx, PetscCtxDestroyFn *destroy)
     46: {
     47:   return TaoMonitorSet(tao, monitor, ctx, destroy);
     48: }
     49: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorCancel()", ) static inline PetscErrorCode TaoCancelMonitors(Tao tao)
     50: {
     51:   return TaoMonitorCancel(tao);
     52: }
     53: PETSC_DEPRECATED_FUNCTION(3, 9, 0, "TaoMonitorDefault()", ) static inline PetscErrorCode TaoDefaultMonitor(Tao tao, PetscCtx ctx)
     54: {
     55:   return TaoMonitorDefault(tao, (PetscViewerAndFormat *)ctx);
     56: }
     57: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorGlobalization()", ) static inline PetscErrorCode TaoGMonitor(Tao tao, PetscCtx ctx)
     58: {
     59:   return TaoMonitorGlobalization(tao, (PetscViewerAndFormat *)ctx);
     60: }
     61: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorDefaultShort()", ) static inline PetscErrorCode TaoSMonitor(Tao tao, PetscCtx ctx)
     62: {
     63:   return TaoMonitorDefaultShort(tao, (PetscViewerAndFormat *)ctx);
     64: }
     65: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorConstraintNorm()", ) static inline PetscErrorCode TaoCMonitor(Tao tao, PetscCtx ctx)
     66: {
     67:   return TaoMonitorConstraintNorm(tao, (PetscViewerAndFormat *)ctx);
     68: }
     69: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorSolution()", ) static inline PetscErrorCode TaoSolutionMonitor(Tao tao, PetscCtx ctx)
     70: {
     71:   return TaoMonitorSolution(tao, (PetscViewerAndFormat *)ctx);
     72: }
     73: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorGradient()", ) static inline PetscErrorCode TaoGradientMonitor(Tao tao, PetscCtx ctx)
     74: {
     75:   return TaoMonitorGradient(tao, (PetscViewerAndFormat *)ctx);
     76: }
     77: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorResidual()", ) static inline PetscErrorCode TaoResidualMonitor(Tao tao, PetscCtx ctx)
     78: {
     79:   return TaoMonitorResidual(tao, (PetscViewerAndFormat *)ctx);
     80: }
     81: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorStep()", ) static inline PetscErrorCode TaoStepDirectionMonitor(Tao tao, PetscCtx ctx)
     82: {
     83:   return TaoMonitorStep(tao, (PetscViewerAndFormat *)ctx);
     84: }
     85: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorSolutionDraw()", ) static inline PetscErrorCode TaoDrawSolutionMonitor(Tao tao, PetscCtx ctx)
     86: {
     87:   return TaoMonitorSolutionDraw(tao, ctx);
     88: }
     89: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorGradientDraw()", ) static inline PetscErrorCode TaoDrawGradientMonitor(Tao tao, PetscCtx ctx)
     90: {
     91:   return TaoMonitorGradientDraw(tao, ctx);
     92: }
     93: PETSC_DEPRECATED_FUNCTION(3, 21, 0, "TaoMonitorStepDraw()", ) static inline PetscErrorCode TaoDrawStepDirectionMonitor(Tao tao, PetscCtx ctx)
     94: {
     95:   return TaoMonitorStepDraw(tao, ctx);
     96: }