[petsc-users] Coordinate format internal reordering

Enrico degregori at dkrz.de
Wed Oct 18 04:54:43 CDT 2023


Hello,

I'm trying to use Petsc to solve a linear system in an application. I'm 
using the coordinate format to define the matrix and the vector (it 
should work better on GPU but at the moment every test is on CPU). After 
the call to VecSetValuesCOO, I've noticed that the vector is storing the 
data in a different way from my application. For example with two 
processes in the application

process 0 owns cells 2, 3, 4

process 1 owns cells 0, 1, 5

But in the vector data structure of Petsc

process 0 owns cells 0, 1, 2

process 1 owns cells 3, 4, 5

This is in principle not a big issue, but after solving the linear 
system I get the solution vector x and I want to get the values in the 
correct processes. Is there a way to get vector values from other 
processes or to get a mapping so that I can do it myself?

Cheers,
Enrico Degregori


More information about the petsc-users mailing list