On Thu, Mar 11, 2021 at 3:27 AM Mathieu Dutour <[email protected]> wrote:
> Dear all, > > I would like to work with a special kind of linear system that ought to be > very common but I am not sure that it is possible in PETSC. > > What we have is an unstructured grid with say 3.10^5 nodes in it. > At each node, we have a number of frequency/direction and together > this makes about 1000 values at the node. So, in total the linear system > has say 3.10^8 values. > > We managed to implement this system with Petsc but the performance > was unsatisfactory. We think that Petsc is not exploiting the special > structure of the matrix and we wonder if this structure can be implemented > in Petsc. > > By special structure we mean the following. An entry in the linear system > is of the form (i, j) with 1<=i<=1000 and 1<=j<=N with N = 3.10^5. > The node (i , j) is adjacent to all the nodes (i' , j) and thus they make > a block > diagonal entry. But the node (i , j) is also adjacent to some nodes (i , > j') > [About 6 such nodes, but it varies]. > I do not understand this explanation "(i, j) with 1<=i<=1000 and 1<=j<=N". Your linear system is rectangular of size (1000, N)? Do you mean instead that each entry in the linear system (i, j) is a 1000x1000 block? We might have something that can help. If the structure of each entry is the same, we have this class https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MATKAIJ.html This would be writing the system as a Kronecker product A \otimes T where T is your 1000x1000 matrix. We have only run this for moderate size T, say 16x16, so further optimizations might be necessary, but it is a place to start. Is it possible to write your system in this way? Thanks, Matt > Would there be a way to exploit this special structure in Petsc? I think > this should be fairly common and significant speedup could be obtained. > > Best, > > Mathieu > -- 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://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
