Ah, I see. Thank you all for the fast replies. I went with PETSc's
VecReciprocal().
Roman
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is
If you are only using PETSc, the efficient way to do this is to get
the raw petsc vector via the wrapper (wrappervec.vec()) and then use
that with VecReciprocal function. If you are using Trilinos, I believe
there is also a reciprocal function that takes an EPetraVector to do
the same.
If need be,
On Thu, Jan 26, 2012 at 13:06, Vetter Roman wrote:
> how would I compute the element-wise reciprocal of a ghosted NumericVector
> in parallel? While I can just iterate through all entries i and do v.set(i,
> 1/v(i)) in serial mode, the solution in parallel with ghosts is not at all
> obvious to m
On Thu, 26 Jan 2012, Vetter Roman wrote:
> how would I compute the element-wise reciprocal of a ghosted
> NumericVector in parallel? While I can just iterate through all
> entries i and do v.set(i, 1/v(i)) in serial mode, the solution in
> parallel with ghosts is not at all obvious to me.
If you
Hi folks
how would I compute the element-wise reciprocal of a ghosted NumericVector in
parallel? While I can just iterate through all entries i and do v.set(i,
1/v(i)) in serial mode, the solution in parallel with ghosts is not at all
obvious to me.
In case you're wondering: I can't fill v wit