Handling inactive (zero-occupancy) equations in large SNES systems
Dear all, I am working with a large nonlinear system solved with SNES, where a significant fraction of the unknowns are temporarily inactive due to a physical parameter being zero (e.g. zero occupancy / zero weight). For those DOF the corresponding equilibrium equation is physically inactive, but the unknown still appears in the global vector and in couplings of neighboring particles (Im using dmswarm). At the moment, these inactive equations contribute with a zero residual (F_i=0), which (I think) leads to poor conditioning and convergence issues for large problems. My question is about best numerical practice in this situation. For the position field, should I do something like F_i = q_i - q_(i,n)? Where q_(i,n) is the position of the particle at the previous configuration. Best regards, Miguel
On Tue, Dec 16, 2025 at 12:39 PM MIGUEL MOLINOS PEREZ <[email protected]> wrote:
Dear all,
I am working with a large nonlinear system solved with SNES, where a significant fraction of the unknowns are temporarily inactive due to a physical parameter being zero (e.g. zero occupancy / zero weight).
For those DOF the corresponding equilibrium equation is physically inactive, but the unknown still appears in the global vector and in couplings of neighboring particles (Im using dmswarm).
At the moment, these inactive equations contribute with a zero residual (F_i=0), which (I think) leads to poor conditioning and convergence issues for large problems.
My question is about best numerical practice in this situation. For the position field, should I do something like F_i = q_i - q_(i,n)? Where q_(i,n) is the position of the particle at the previous configuration.
This puts a 1 on the diagonal, which is usually what you want (esp for particle problems). However, there could be convergence problems with Newton, with these directions swamping other descent directions. That is the argument for eliminating these unknowns. It sounds like it would be worth trying to see if this is the case. Thanks, Matt
Best regards,
Miguel
-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >
I’ll give it a try to F_i = q_i - q_(i,n). The problem with the dof elimination is that it messes up with local-to-global numbering and ghost particles creation too. Miguel On 16 Dec 2025, at 19:24, Matthew Knepley <[email protected]> wrote: On Tue, Dec 16, 2025 at 12:39 PM MIGUEL MOLINOS PEREZ <[email protected]<mailto:[email protected]>> wrote: Dear all, I am working with a large nonlinear system solved with SNES, where a significant fraction of the unknowns are temporarily inactive due to a physical parameter being zero (e.g. zero occupancy / zero weight). For those DOF the corresponding equilibrium equation is physically inactive, but the unknown still appears in the global vector and in couplings of neighboring particles (Im using dmswarm). At the moment, these inactive equations contribute with a zero residual (F_i=0), which (I think) leads to poor conditioning and convergence issues for large problems. My question is about best numerical practice in this situation. For the position field, should I do something like F_i = q_i - q_(i,n)? Where q_(i,n) is the position of the particle at the previous configuration. This puts a 1 on the diagonal, which is usually what you want (esp for particle problems). However, there could be convergence problems with Newton, with these directions swamping other descent directions. That is the argument for eliminating these unknowns. It sounds like it would be worth trying to see if this is the case. Thanks, Matt Best regards, Miguel -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >
On Dec 16, 2025, at 1:23 PM, Matthew Knepley <[email protected]> wrote:
On Tue, Dec 16, 2025 at 12:39 PM MIGUEL MOLINOS PEREZ <[email protected] <mailto:[email protected]>> wrote:
Dear all,
I am working with a large nonlinear system solved with SNES, where a significant fraction of the unknowns are temporarily inactive due to a physical parameter being zero (e.g. zero occupancy / zero weight).
For those DOF the corresponding equilibrium equation is physically inactive, but the unknown still appears in the global vector and in couplings of neighboring particles (Im using dmswarm).
At the moment, these inactive equations contribute with a zero residual (F_i=0), which (I think) leads to poor conditioning and convergence issues for large problems.
My question is about best numerical practice in this situation. For the position field, should I do something like F_i = q_i - q_(i,n)? Where q_(i,n) is the position of the particle at the previous configuration.
This puts a 1 on the diagonal, which is usually what you want (esp for particle problems).
However, there could be convergence problems with Newton, with these directions swamping other descent directions. That is the argument for eliminating these unknowns. It sounds like it would be worth trying to see if this is the case.
Instead of putting 1 on the diagonal you can put a value on the diagonal that is "near" the other diagonal values of the matrix. This is usally (always?) better than using 1
Thanks,
Matt
Best regards,
Miguel
-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!a9ge_7Blw6FP4XR8osFatvOvy7Q2pdIyLX8lVZs3eFcKKQhLJ0TRkrPMAXOBllnlR6EP1Oa_qkH_pf-AU3HW$>
participants (3)
-
Barry Smith -
Matthew Knepley -
MIGUEL MOLINOS PEREZ