[petsc-users] VecChop not in petsc4py
Justin Chang
jychang48 at gmail.com
Mon Sep 21 18:15:04 CDT 2015
Just did, it works for my test problems, so hope it gets passed ;)
On Mon, Sep 21, 2015 at 1:53 PM, Jed Brown <jed at jedbrown.org> wrote:
> Justin Chang <jychang48 at gmail.com> writes:
>
> > Hi all,
> >
> > I noticed that there's no VecChop in petsc4py. I see a MatChop, but was
> > wondering if you guys can add the petsc4py implementation of VecChop.
> >
> > I am guessing it would be something like:
>
> Since you've done the work, you might as well submit it as a pull
> request.
>
> > in src/PETSc/Vec.pyx:
> >
> > def chop(self, tol):
> > cdef PetscReal rval = asReal(tol)
> > CHKERR( VecChop(self.vec, rval) )
> >
> > in src/PETSc/petscvec.pxi:
> >
> > int VecChop(PetscVec, PetscReal)
> >
> > Thanks,
> > Justin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150921/faf07efc/attachment.html>
More information about the petsc-users
mailing list