> > On Feb 1, 2012, at 5:02 AM, Hui Zhang wrote: > >> >> On Jan 31, 2012, at 1:23 PM, Jed Brown wrote: >> >>> On Tue, Jan 31, 2012 at 04:11, Hui Zhang <mike.hui.zhang at hotmail.com> >>> wrote: >>> Suppose using MatCreate() and MatSetSizes() we obtain a Mat A, and then >>> tion and then using local indices (e.g. MatSetValuesLocal()) during >>> assembly. You might use AO for that setup step, but it usually doesn't make >>> sense to use _during_ assembly. >> >> thanks, do you mean that it is faster to use LocaltoGlobalMapping & >> SetValuesLocal >> than to use AO & SetValues globally? Is there a big difference in >> performance? > > Yes, using the SetValuesLocal approach will be much faster for large > problems than using the AO to map to global indices and calling SetValues. > > Barry
Thank you! Can I use SetValuesLocal to set values beyond LocalOwnershipRange? > >> >> >>> >>> with >>> P_1 the permutation corresponding to ao_1. In a similar way, we have that b >>> becomes P_2 b under the petsc ordering. I want to make sure P_1 and P_2 are >>> the same so arises my question. >>> >>> Thanks a lot! >>> Hui >>> >>> >>> >> >
