On Thu, Feb 28, 2013 at 3:39 PM, Amneet Bhalla <mail2amneet at gmail.com>wrote:
> I am all for doing things the legal way :-) > > Where should this routine be added and how should it look like for shell > vectors? I had assumed that > such changes should be done in user defined MatGetVecs routine. Clearly > this is not happening. > Please explain. > Can you > comment on proper construction of duplicated Vecs which are needed by > Krylov solver of PETSc? The way I am > doing is : > > a) Create a wrapper Vec (x), which holds SAMRAI vector. > b) Define a x->ops->duplicatevector for this wrapper vector. > c) Create a VecNest (X) of these wrapper Vecs. > d) Define MatGetVecs routine, which will duplicate X by the call > VecDuplicate(X,left/right) > This much is fine. > > On Thu, Feb 28, 2013 at 2:27 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote: > >> This is calling VecValidValues() checks for vec->ops->getarray. Since >> VecGetArray_Nest() is implemented, it calls the routine. I'm inclined to >> add a vec->ops->validvalues() and _not_ try to hack it in terms of >> VecGetArray(). > > > > > > -- > Amneet > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130301/af72f4c7/attachment.html>
