[petsc-users] inserting vector into row of dense matrix

2014-04-23 Thread Randall Mackie
I have a 3D rectangular grid over which I am doing some computations. I have created a 3D DA for that grid, and I can put the results of the computations into a global vector obtained via DMGetGlobalVector. Now, I need to do these computations for several realizations, and I want to keep all

Re: [petsc-users] inserting vector into row of dense matrix

2014-04-23 Thread Barry Smith
Randy, The problem is that MatMPIDense stores each row on a single process; while the solution in DMGetGlobalVector() will be spread over all processes. Thus you could use MatSetValues() as you have done to put the values in but it will be terribly inefficient. What I suggest is to