[petsc-users] return -1 instead of raising an error in ao.app2petsc

Xin Zhao sean.null at gmail.com
Wed Aug 8 15:10:32 CDT 2012


Dear all,

Assume that I want to convert an indices in application order into petsc
order.
But I don't know the indices in application is in range.

Say
I call
ao = PETSc.AO().createMapping([4,2,3])

then
ao.app2petsc([2,5,3])
will raise an error.

is there any way to make return value to [1,-1,2] instead of raising an
error?


Or there is any way I can handle this error to make it work?

Best,
Xin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120808/d48485d9/attachment.html>


More information about the petsc-users mailing list