[petsc-users] VecChop not in petsc4py

Justin Chang jychang48 at gmail.com
Mon Sep 21 14:35:12 CDT 2015


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:

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/449c31f5/attachment.html>


More information about the petsc-users mailing list