-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 18/02/15 13:29, Eike Mueller wrote:
Hi Lawrence,
ok, I'm having a go at it now. I set up the IS's in the constructor of the MixedArray class, and I need the v.owner_range of a PETSc Vec to calculate global_min_idx. At this point I don't have a Vec yet (this only gets passed in in the split() and combine() methods). To get out owner_range, can I just create one with v = PETSc.Vec() in the constructor or do I need to do more to it to have enough information? Otherwise I have to build the IS's in the split subroutine, which does not seem to be a good idea.
Yes, you could just make one: v = PETSc.Vec().create() v.setSizes((self._ndof_total, None)) v.setUp() v.owner_range No need to keep it around, I think. Lawrence -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU5JcuAAoJECOc1kQ8PEYvuOAH/2NjlKU/qsotq/FaO9I6Xvka xKSF4BLdb2YCWJVJu8K1aW5uQgkeglnHVMXHXso5eHc7dzHpPA8U4QSpTu2Y7Y7y /8c3KGQ66Xz/Sv4ZLH6Wf119RM9uNQ/yf5+KHWMvtDCv59bIG1DkUD+4SvHMT4kt 3a8g6wBW8rXV7CIMZpBMgSBJ7cB/F5NxqWtmReu4dVJ9pnwHnLsE0kv/HLRfTs7a 6OhQVLiwGHwCPfmHbMGJG/lhZEoyco5JFG7VHHghwUvjyNJqSxaAxMfDnCuOrOwe GlyUEk/2s/XlO3tLfngF1KCMs/xYBuO0FWOMfCWd/zIxwHYHa4BFGAarXwCH3Cc= =UCpF -----END PGP SIGNATURE-----