Setting options on matrices obtained from a DM
Jed Brown
jed at 59A2.org
Thu Jul 23 09:45:11 CDT 2009
Matthew Knepley wrote:
>> MatExecute()? What about MatGetXXX() before MatExecute()?
>
> It will reregister that function, so you would need another SetUp()
> call, exactly the same interface we have now.
But the user wants to call MatGetXXX() and use the result right away
(instead of getting a request object or passing a continuation to be
executed when the result is available). The whole point of the
continuation is to perform a side-effect which is going to cause
confusing behavior.
Currently they get an error if the result isn't available. With the
"register attributes, then execute" model, the result will almost never
be available so everything they might do would go into a continuation.
We could probably make this work (even with reasonable syntax) in a
language like Haskell, but in an impure strict language I think it will
snowball into a mess of side-effecting continuations being called at
peculiar times.
Jed
-------------- 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/7c7ba99f/attachment.sig>
More information about the petsc-dev
mailing list