[petsc-users] ghost size of a ghosted vector

2013-09-20 Thread Mohammad Mirzadeh
Hi guys,

Is there any function that would return the ghost (or ghost+local
preferably) size of a ghosted vector? VecGetSize returns the total
global size and VecGetLocalSize returns only the local part.

I need this size for a error-checking guard i'm adding in my code.

Thanks,
Mohammad


Re: [petsc-users] ghost size of a ghosted vector

2013-09-20 Thread Barry Smith

  You need to call VecGhostGetLocalForm()  and call VecGetSize() on that. Don't 
worry, its cost is only the function calls.

   Barry

On Sep 20, 2013, at 9:34 PM, Mohammad Mirzadeh mirza...@gmail.com wrote:

 Hi guys,
 
 Is there any function that would return the ghost (or ghost+local
 preferably) size of a ghosted vector? VecGetSize returns the total
 global size and VecGetLocalSize returns only the local part.
 
 I need this size for a error-checking guard i'm adding in my code.
 
 Thanks,
 Mohammad



Re: [petsc-users] ghost size of a ghosted vector

2013-09-20 Thread Mohammad Mirzadeh
sweet! Thanks Barry :)

On Fri, Sep 20, 2013 at 7:40 PM, Barry Smith bsm...@mcs.anl.gov wrote:

   You need to call VecGhostGetLocalForm()  and call VecGetSize() on that. 
 Don't worry, its cost is only the function calls.

Barry

 On Sep 20, 2013, at 9:34 PM, Mohammad Mirzadeh mirza...@gmail.com wrote:

 Hi guys,

 Is there any function that would return the ghost (or ghost+local
 preferably) size of a ghosted vector? VecGetSize returns the total
 global size and VecGetLocalSize returns only the local part.

 I need this size for a error-checking guard i'm adding in my code.

 Thanks,
 Mohammad