[petsc-users] Matrix assembly takes too long

Alex Sp alex.sp2408 at gmail.com
Sun Jul 14 17:04:14 CDT 2024


Hello,

I am trying to solve the problem of the 3D fluid flow around a cylinder
using an in-house finite element Fortran code. I want to apply periodic
boundary conditions in the neutral direction (the z direction which
coincides with the axis of the cylinder). The method works fine and it
gives correct results. However the assembly of the matrix for the Newton
Raphson method takes too long. The whole process takes about 10 minutes for
a single Newton iteration. For the same system size it takes only 10
seconds if instead of periodic conditions I set wall boundaries (no slip,
no penetration). What is also strange is that the very first matrix
assembly is quite normal (takes about 30 seconds).
What could be the reason for this? It seems like some matrix entries are
allocated anew every time. However this happens only when I apply
periodicity. I do not do any matrix preallocation.

Thanks in advance,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240715/580faa02/attachment.html>


More information about the petsc-users mailing list