On Thu, Apr 7, 2011 at 09:42, Thomas Witkowski < 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. 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110407/44dfd7df/attachment.html>