Re: [petsc-users] Efficient handling of missing diagonal entities

2025-07-01 Thread JAMOND Olivier
Cedex, France Email: olivier.jam...@cea.fr Phone: +336.78.18.18.25 From: petsc-users on behalf of Pierre Jolivet Sent: Friday, June 27, 2025 3:50:29 PM To: Barry Smith Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Efficient handling of missing dia

Re: [petsc-users] Efficient handling of missing diagonal entities

2025-06-27 Thread Barry Smith
Because I completely forgot that this option existed, and the LLM didn't save me from embarrassing myself. I see that this option sets mat->force_diagonals, but this variable is never used in the mat assembly routines, meaning it will not help in this situation. Presumably, MatAssemblyX

Re: [petsc-users] Efficient handling of missing diagonal entities

2025-06-27 Thread Pierre Jolivet
On 27 Jun 2025, at 3:21 PM, Barry Smith wrote:  Because I completely forgot that this option existed, and the LLM didn't save me from embarrassing myself.  I see that this option sets mat->force_diagonals, but this variable is never used in the mat assembly routines, meaning it will not help in t

Re: [petsc-users] Efficient handling of missing diagonal entities

2025-06-27 Thread Pierre Jolivet
On 27 Jun 2025, at 1:33 PM, Barry Smith wrote:   Handling empty diagonal entries on matrices is often problematic, just as you describe.    I suggest placing explicit zeros on the diagonal first before providing the other entries, which might be the cleanest and most efficient approach. So have e

Re: [petsc-users] Efficient handling of missing diagonal entities

2025-06-27 Thread Barry Smith
Handling empty diagonal entries on matrices is often problematic, just as you describe. I suggest placing explicit zeros on the diagonal first before providing the other entries, which might be the cleanest and most efficient approach. So have each MPI rank loop over its local rows and

[petsc-users] Efficient handling of missing diagonal entities

2025-06-27 Thread JAMOND Olivier
Hello, I am working on a PDE solver which uses petsc to solve its sparse distributed linear systems. I am mainly dealing with MPIAIJ matrices. In some situations, it may happen that the matrices considered does not have non-zero term on the diagonal. For instance I work on a case which have a