On Wed, Jul 19, 2023 at 7:59 AM Karsten Bolding <
[email protected]> wrote:
> Hello
>
> I'm re-implementing a model from mixed C/Fortran to Python where Petsc is
> used for matrix/vector operations.
>
> In the C-code I have:
> ierr = VecDuplicateVecs(templateVec,numTracers,&uef);
> to create uef with numTracers vectors.
>
> Later in the code looping is done of the individual vectors and a sequence
> of operations are performed.
>
> I would like to follow the same idea in Python - but do not find any
> example.
>
> An alternative would be to make a list of Vecs?
>
There is no optimization here, so I would just make a list of duplicates.
Thanks,
Matt
> Best Regards,
> Karsten
>
> --
> Karsten Bolding
> [email protected]
> +4564422058
>
--
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
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>