Hello,
I have some questions regarding TAO and the use the gradient norm. First, I want to use a custom inner product for the optimization in TAO (for computing the gradient norm and, e.g., in the double loop of a quasi-Newton method). I have seen that there is the method TAOSetGradientNorm https://petsc.org/release/manualpages/Tao/TaoSetGradientNorm/ which seems to do this. According to the petsc4py docs https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.TAO.html#petsc4p y.PETSc.TAO.setGradientNorm, this should do what I want. However, the method does not always seem to perform correctly: When I use it with -tao_type lmvm, it really seems to work and gives the correct scaling of the residual in the default TAO monitor. However, when I use, e.g., -tao_type bqnls, -tao_type cg, or -tao_type bncg, the (initial) residual is the same as it is when I do not use the TAOSetGradientNorm. However, there seem to be some slight internal changes (at least for the bqnls), as the number of iterations to reach the tolerance changes from 15 without TAOSetGradientNorm to 17 with TAOSetGradientNorm. For the context: Here, I am trying to solve a PDE constrained optimal control problem, which I tackle in a reduced fashion (using a reduced cost functional which results in an unconstrained optimization using the adjoint approach). For this, I would like to use the L2 inner product induced by the FEM discretization, so the L2 mass matrix. Moreover, I noticed that the performance of -tao_type lmvm and -tao_type bqnls as well as -tao_type cg and -tao_type bncg are drastically different for the same unconstrained problem. I would have expected that the algorithms are (more or less) identical for that case. Is this to be expected? Finally, I would like to use TAO for solving PDE constrained shape optimization problems. To do so, I would need to be able to specify the inner product used in the solver (see the above part) and this inner product would need to change in each iteration. Is it possible to do this with TAO? And could anyone give me some hints how to do so in python with petsc4py? Thanks a lot in advance, Sebastian -- Dr. Sebastian Blauth Fraunhofer-Institut für Techno- und Wirtschaftsmathematik ITWM Abteilung Transportvorgänge Fraunhofer-Platz 1, 67663 Kaiserslautern Telefon: +49 631 31600-4968 <mailto:sebastian.bla...@itwm.fraunhofer.de> sebastian.bla...@itwm.fraunhofer.de <https://www.itwm.fraunhofer.de> https://www.itwm.fraunhofer.de
smime.p7s
Description: S/MIME cryptographic signature