[petsc-dev] VECCUSP needs to be zeroed?

2011-11-08 Thread Jose E. Roman
The following code prints a vector of uninitialized entries. ierr = VecCreate(comm,&v);CHKERRQ(ierr); ierr = VecSetSizes(v,n,n);CHKERRQ(ierr); ierr = VecSetType(v,VECSEQCUSP);CHKERRQ(ierr); ierr = VecView(v,PETSC_NULL);CHKERRQ(ierr); In contrast, if the type is VECSEQ the vector is initia

[petsc-dev] VECCUSP needs to be zeroed?

2011-11-08 Thread Matthew Knepley
- 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 -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pip

[petsc-dev] [petsc-maint #95962] condition number

2011-11-08 Thread Barry Smith
Belongs in the FAQ? Barry On Nov 8, 2011, at 5:28 AM, Jed Brown wrote: > On Tue, Nov 8, 2011 at 07:23, wrote: > >> Is there any function which compute the condition number of a matrix (MAT)? > > > -pc_type svd -pc_svd_monitor (for very small problems) > > -ksp_gmres_restart 1000 -ks

[petsc-dev] checking if a vector is ghosted

2011-11-08 Thread mspieg
Hi All, is there a clean way to test if a vector is ghosted (i.e created with VecCreateGhost?) without trying to call VecGhostGetLocalForm and throwing an exception? In 3.1 I got around this using PetscExceptonTry1 but apparently in 3.2 and dev PetscException? is "too cool for school" ;^)

[petsc-dev] checking if a vector is ghosted

2011-11-08 Thread mspieg
Nevermind?I should always think for 10 more minutes before I type? Just want to check that the following is a kosher use of the return error handler bool _is_ghosted = true; PetscErrorCode ierr; PetscPushErrorHandler(PetscReturnErrorHandler,PETSC_NULL); ierr= VecGhostGetLocalForm

[petsc-dev] checking if a vector is ghosted

2011-11-08 Thread Matthew Knepley
columbia.edu/~mspieg > tel: 845 704 2323 (SkypeIn) > > > > -- 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 -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/2008/7509d6c1/attachment.html>

[petsc-dev] checking if a vector is ghosted

2011-11-08 Thread Jed Brown
); ierr = PetscObjectReference((PetscObject)*l);CHKERRQ(ierr); PetscFunctionReturn(0); } -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/2008/2b23d368/attachment.html>

[petsc-dev] checking if a vector is ghosted

2011-11-08 Thread Barry Smith
We should add a VecIsGhosted() Barry On Nov 8, 2011, at 12:07 PM, Jed Brown wrote: > On Tue, Nov 8, 2011 at 14:05, Matthew Knepley wrote: > Just want to check that the following is a kosher use of the return error > handler > >bool _is_ghosted = true; >PetscErrorCode ierr; >

[petsc-dev] checking if a vector is ghosted

2011-11-08 Thread mspieg
Thanks everyone for getting back so fast (as usual). VecIsGhosted would be nice? I assume that would go into dev? In the meantime, I think the error handler trick will work in 3.2? thanks marc On Nov 8, 2011, at 3:41 PM, Barry Smith wrote: > > We should add a VecIsGhosted() > > Barry >

[petsc-dev] XXXGetContext() in Fortran

2011-11-08 Thread Jed Brown
ts with multigrid (or any other case where you have multiple instances of shell objects, breaking the common blocks.) -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/2008/b3a7450d/attachment.html>

[petsc-dev] XXXGetContext() in Fortran

2011-11-08 Thread Satish Balay
On Tue, 8 Nov 2011, Jed Brown wrote: > We have bindings for this, but I can't find a way to make it work. I can > pass a context into a function, but I can't get one back out with a > subroutine call. F90 pointers are grotesque creatures that don't seem to be > up to this task either, at least not

[petsc-dev] XXXGetContext() in Fortran

2011-11-08 Thread Blaise Bourdin
On Nov 8, 2011, at 8:57 PM, Jed Brown wrote: > We have bindings for this, but I can't find a way to make it work. I can pass > a context into a function, but I can't get one back out with a subroutine > call. F90 pointers are grotesque creatures that don't seem to be up to this > task either,