Jed Brown wrote: > On Thu, Apr 7, 2011 at 09:42, Thomas Witkowski > <thomas.witkowski at tu-dresden.de > <mailto:thomas.witkowski at tu-dresden.de>> wrote: > > The problem is that the data field (vec->data) of the nested > vectors is empty. I created the nested vectors exactly in the same > way as in /src/ksp/ksp/examples/tests/ex22.c. When I would make a > VecGetArray(myvec, &vecptr) on a nested vector myvec, than vecptr > is not a vailde pointer. > > > Indeed, this is why this test uses no preconditioner. I do not > recommend VecNest for general use, there are many places where it will > be problematic. So go ahead and use the MatNest, but just create a > normal Vec. Great, now it works fine!
Thomas > > Eventually, I want to remove the explicit scatters in the PCFieldSplit > implementation in favor of VecGetSubVector(). When that is done, > VecNest will provide a way to eliminate some copies (at the expense of > memory layout so it will still not always be faster), but its use > should still remain hidden from user code. Don't bother with it now.