[petsc-users] VecValid

Matthew Knepley knepley at gmail.com
Thu May 3 21:08:04 CDT 2012


On Thu, May 3, 2012 at 9:20 PM, Sanjay Govindjee <s_g at berkeley.edu> wrote:

> We have some code that has worked up through petsc-3.1 and we are in the
> process of updating it to petsc-3.2.
>
> One thing that I can not find mentioned in the change logs (looking all
> the way back to petsc-2.1.0) or the FAQs is the elimination of the VecValid
> and MatValid tests.
>

In C, this is now the macro PetscValidHeaderSpecific(). This check now
happens in every function call. What
logic would need to look for a corrupt Vec beyond CHKERRQ?

  Thanks,

      Matt


> We used to perform operations like:
>
>      call VecValid(xvec, chk, ierr)
>
>      if(chk .eqv. PETSC_FALSE) then
>                call VecCreate        (PETSC_COMM_WORLD, xvec, ierr)
>                call VecSetSizes      (xvec, numpeq, PETSC_DECIDE, ierr)
>                call VecSetFromOptions(xvec, ierr)
>      else
>        ....
>      endif
>
> But it seems VecValid and MatValid have been eliminated.  Is there a
> reason for this?  or have
> I made a mistake?  Is there a replacement test for invalid Vec and Mat
> pointers?
>
> -sanjay
>
>


-- 
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-users/attachments/20120503/5023cfe7/attachment.htm>


More information about the petsc-users mailing list