Re: [Libmesh-users] Reciprocal of ghosted NumericVector

2012-01-26 Thread Vetter Roman
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

Re: [Libmesh-users] Reciprocal of ghosted NumericVector

2012-01-26 Thread Vijay S. Mahadevan
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,

Re: [Libmesh-users] Reciprocal of ghosted NumericVector

2012-01-26 Thread Jed Brown
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

Re: [Libmesh-users] Reciprocal of ghosted NumericVector

2012-01-26 Thread Roy Stogner
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

[Libmesh-users] Reciprocal of ghosted NumericVector

2012-01-26 Thread Vetter Roman
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