Le 20/07/2016 à 04:59, Matthew Knepley a écrit :
On Tue, Jul 19, 2016 at 11:12 PM, gouarin <[email protected]
<mailto:[email protected]>> wrote:
Hi,
I would like to use DMGetLocalVector and DMGetGlobalVector with
petsc4py but I didn't find the appropriate methods. If they are not
implemented, I can do a PR with these functions and their Restore part.
You are right, these are missing.
OK I will add these functions and do a PR.
I have an other problem: I have to optimize a Python function that
take a numpy array given by the function getVecArray of a DMDA and I
would like to use Pythran to do that. The problem is that Pythran
doesn't recognize the array as a numpy array because the flags
C_CONTIGUOUS and F_CONTIGUOUS are both set to False. Is there a
reason that the C_CONTIGUOUS flag is set to False and not to True ?
For this, can't you just use vec.getArray()?
It's ok if I use vec.getArray().
Thanks,
Loic
Thanks,
Matt
Best,
Loic
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener
--
Loic Gouarin
Laboratoire de Mathématiques
Université Paris-Sud
Bâtiment 425
91405 Orsay Cedex
France
Tel: (+33) 1 69 15 60 14
Fax: (+33) 1 69 15 67 18