Matthew Knepley wrote: > There is no way we would be doing conintuations. Why even bring this up? > This just complicates the discussion and distracts from the main issues. > > The answer is incredibly easy and straightforward. Just like MANY > functions in PETSc, you will not get the correct answer until things > have been initialized. This just sounds like arguing for the sake of > argument.
I should of course get an error, not a wrong answer, but that's not the issue here. It is useful to be able to call XGetY() once the X has enough information to provide Y, but before it has enough information for XSetUp() to be called. This is fine with the current model. With your model, it looks like I would always have to wait until *after* SetUp has been called. I believe there are several circumstances where it is not possible to get access to the object after setup and before whatever else happens. This apparent "locking" causes (at least in other codes) the introduction of multiple SetUp-like calls which are more of a pain. If you are confident that you can restructure things so that it is always possible for XSetUp() to called before you need to call XGetY(), then I have no objections. Jed PS: Continuations are a way to make whatever you want happen at the appropriate time with respect to SetUp, but they are obviously insane for this purpose. Request objects are probably worse. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 260 bytes Desc: OpenPGP digital signature URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20090723/89ceaa12/attachment.pgp>