On Tue, Jul 19, 2016 at 11:12 PM, gouarin <[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.
> 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()?
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