<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>Dear all,</div><div><p>I am solving a nonlinear system with SNES that comes from the stationary conditions of a scalar functional (L):</p><p>\frac{\partial L}{\partial F} = 0, <br>\frac{\partial L}{\partial \sigma_q} = 0<br></p><p>where (F) has size 3 and (\sigma_q) contains (N) particle variables, so the global unknown vector has size (3*N_rank + N). And, locally, each rank has a local vector (3+N_local). I am currently using SNES with GMRES to solve the problem since I can not compute the Jacobian analytically.</p><p>I have a couple of questions:</p><ol><li><p>I originally constructed the solution vector as a single contiguous vector (effectively <code inline="">[F | sigma]</code>) with<font color="#ffffff"> </font><span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; background-color: rgb(255, 255, 255);">VecConcatenate</span>, but I recently switched to <code inline="">VecCreateNest</code> to represent the block structure. However, the solver seems to perform better with <span style="font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; background-color: rgb(255, 255, 255);">VecConcatenate</span>. Is this expected when using GMRES, if no block preconditioner is used?</p></li><li><p>The system has a known null space associated with the (sigma) variables. Since I am not assembling the Jacobian explicitly, what is the recommended way to provide this null space to the solver? Should it still be attached to the operator with <code inline="">MatSetNullSpace</code> when using <code inline="">-snes_mf</code>?</p></li></ol><p>Any advice or best practices would be very helpful.</p><p>Best regards,<br>Miguel</p></div><br>
<br><div>
<span><img alt="upm.png" src="cid:9F06B6D7-14EF-47F6-9A9D-AAD1DDE734BA"></span><meta charset="UTF-8"><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-line: none; text-decoration-thickness: auto; text-decoration-style: solid;"><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-line: none; text-decoration-thickness: auto; text-decoration-style: solid;"><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-line: none; text-decoration-thickness: auto; text-decoration-style: solid;"><b>Miguel Molinos</b><br><font color="#4483be">Escuela de Ingenieros de Caminos, Canales y Puertos</font><br>Dep. Mecánica Medios Continuos y Teoría de Estructuras</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-line: none; text-decoration-thickness: auto; text-decoration-style: solid;"><br>Prof. Aranguren, 3 - Ciudad Universitaria.<br>Planta 9. 28040, Madrid</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-line: none; text-decoration-thickness: auto; text-decoration-style: solid;"><br>✉ <a href="mailto:m.molinos@upm.es">m.molinos@upm.es</a><br>✆  +34 910 67 44 28</div>
</div>
<br></body></html>