Dear PETSc developers and users, I am considering using TAO’s Primal-Dual Interior-Point Method (PDIPM) for a constrained optimization problem in solid mechanics. The objective involves solving a nonlinear PDE (hyperelasticity) for each parameter vector, and for some parameter combinations the PDE solver may fail to converge or produce non-physical states.
With MATLAB’s fmincon, it is possible to signal such failures by returning NaN/Inf for the objective, and the solver will then backtrack or try a different step without crashing. My questions are: 1. How does TAO’s PDIPM handle cases where the user objective or gradient callback returns NaN/Inf (e.g., due to PDE solver failure)? 2. Is there a recommended way in TAO/PETSc to gracefully signal an evaluation failure (like “bad point in parameter space”) so that the algorithm can back off and try a smaller step, instead of aborting? 3. If the recommended pattern is *not* to return NaNs, what is the best practice in TAO for such PDE-constrained problems? Any guidance on how TAO/PDIPM is intended to behave in the presence of evaluation failures would be greatly appreciated. Best regards, Simon
