|  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    | a new object with type S, a subtype of T |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | attachDLPackInfo(self,
        Vec vec=None,
        dltensor=None) Attach the tensor information from an input vector (vec) or a
DLPack tensor if it is not available in current vector.
 |  |  | 
    |  | 
        
          | axpby(self,
        alpha,
        beta,
        Vec y) |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | bindToCPU(self,
        flg) If *flg* is *True*, all subsequent operations of *self* would be
performed on CPU.
 |  |  | 
    |  |  | 
    |  | 
        
          | clearDLPackInfo(self) Clear the tensor information
See also :meth:`Vec.attachDLPackInfo`.
 |  |  | 
    |  |  | 
    |  | 
        
          | copy(self,
        Vec result=None) |  |  | 
    |  |  | 
    |  | 
        
          | createCUDAWithArrays(self,
        cpuarray=None,
        cudahandle=None,
        size=None,
        bsize=None,
        comm=None) Returns an instance of :class:`Vec`, a VECCUDA with user provided
memory spaces for CPU and GPU arrays.
 |  |  | 
    |  | 
        
          | createGhost(self,
        ghosts,
        size,
        bsize=None,
        comm=None) |  |  | 
    |  | 
        
          | createGhostWithArray(self,
        ghosts,
        array,
        size=None,
        bsize=None,
        comm=None) |  |  | 
    |  | 
        
          | createMPI(self,
        size,
        bsize=None,
        comm=None) |  |  | 
    |  | 
        
          | createNest(self,
        vecs,
        isets=None,
        comm=None) |  |  | 
    |  | 
        
          | createSeq(self,
        size,
        bsize=None,
        comm=None) |  |  | 
    |  | 
        
          | createShared(self,
        size,
        bsize=None,
        comm=None) |  |  | 
    |  | 
        
          | createViennaCLWithArrays(self,
        cpuarray=None,
        viennaclvechandle=None,
        size=None,
        bsize=None,
        comm=None) Returns an instance :class:`Vec`, a VECVIENNACL with user provided memory
spaces for CPU and GPU arrays.
 |  |  | 
    |  | 
        
          | createWithArray(self,
        array,
        size=None,
        bsize=None,
        comm=None) |  |  | 
    |  | 
        
          | createWithDLPack(self,
        dltensor,
        size=None,
        bsize=None,
        comm=None) Returns an instance :class:`Vec`, a PETSc vector from a DLPack object
sharing the same memory.
 |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | duplicate(self,
        array=None) |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | getArray(self,
        readonly=False) |  |  | 
    |  |  | 
    |  | 
        
          | getBuffer(self,
        readonly=False) |  |  | 
    |  |  | 
    |  | 
        
          | getCLMemHandle(self,
        mode='rw') Returns a Vec's CL buffer as :class:`int`.
 |  |  | 
    |  |  | 
    |  | 
        
          | getCUDAHandle(self,
        mode='rw') |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | getOffloadMask(self) Returns :class:`int` of the Vec's PetscOffloadMask enum value.
 |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | getSubVector(self,
        IS iset,
        Vec subvec=None) |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | getValues(self,
        indices,
        values=None) |  |  | 
    |  | 
        
          | getValuesStagStencil(self,
        indices,
        values=None) |  |  | 
    |  | 
        
          | ghostUpdate(self,
        addv=None,
        mode=None) |  |  | 
    |  | 
        
          | ghostUpdateBegin(self,
        addv=None,
        mode=None) |  |  | 
    |  | 
        
          | ghostUpdateEnd(self,
        addv=None,
        mode=None) |  |  | 
    |  | 
        
          | isaxpy(self,
        IS idx,
        alpha,
        Vec x) |  |  | 
    |  | 
        
          | isset(self,
        IS idx,
        alpha) |  |  | 
    |  | 
        
          | load(self,
        Viewer viewer) |  |  | 
    |  | 
        
          | localForm(self) Intended for use in context manager:
 |  |  | 
    |  |  | 
    |  | 
        
          | mDot(self,
        vecs,
        out=None) |  |  | 
    |  | 
        
          | mDotBegin(self,
        vecs,
        out=None) |  |  | 
    |  | 
        
          | mDotEnd(self,
        vecs,
        out=None) |  |  | 
    |  |  | 
    |  | 
        
          | maxPointwiseDivide(self,
        Vec vec) |  |  | 
    |  | 
        
          | maxpy(self,
        alphas,
        vecs) |  |  | 
    |  |  | 
    |  | 
        
          | mtDot(self,
        vecs,
        out=None) |  |  | 
    |  | 
        
          | mtDotBegin(self,
        vecs,
        out=None) |  |  | 
    |  | 
        
          | mtDotEnd(self,
        vecs,
        out=None) |  |  | 
    |  | 
        
          | norm(self,
        norm_type=None) |  |  | 
    |  | 
        
          | normBegin(self,
        norm_type=None) |  |  | 
    |  | 
        
          | normEnd(self,
        norm_type=None) |  |  | 
    |  |  | 
    |  | 
        
          | permute(self,
        IS order,
        invert=False) |  |  | 
    |  |  | 
    |  | 
        
          | pointwiseDivide(self,
        Vec x,
        Vec y) |  |  | 
    |  | 
        
          | pointwiseMax(self,
        Vec x,
        Vec y) |  |  | 
    |  | 
        
          | pointwiseMaxAbs(self,
        Vec x,
        Vec y) |  |  | 
    |  | 
        
          | pointwiseMin(self,
        Vec x,
        Vec y) |  |  | 
    |  | 
        
          | pointwiseMult(self,
        Vec x,
        Vec y) |  |  | 
    |  |  | 
    |  | 
        
          | resetArray(self,
        force=False) |  |  | 
    |  | 
        
          | restoreCLMemHandle(self) To be called after accessing a Vec's cl_mem in 'w' or 'rw' modes.
 |  |  | 
    |  | 
        
          | restoreCUDAHandle(self,
        handle,
        mode='rw') |  |  | 
    |  | 
        
          | restoreSubVector(self,
        IS iset,
        Vec subvec) |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | setBlockSize(self,
        bsize) |  |  | 
    |  |  | 
    |  | 
        
          | setLGMap(self,
        LGMap lgmap) |  |  | 
    |  | 
        
          | setMPIGhost(self,
        ghosts) Alternative to createGhost()
 |  |  | 
    |  | 
        
          | setNestSubVecs(self,
        sx,
        idxm=None) |  |  | 
    |  | 
        
          | setOption(self,
        option,
        flag) |  |  | 
    |  |  | 
    |  | 
        
          | setRandom(self,
        Random random=None) |  |  | 
    |  | 
        
          | setSizes(self,
        size,
        bsize=None) |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | setValue(self,
        index,
        value,
        addv=None) |  |  | 
    |  | 
        
          | setValueLocal(self,
        index,
        value,
        addv=None) |  |  | 
    |  | 
        
          | setValues(self,
        indices,
        values,
        addv=None) |  |  | 
    |  | 
        
          | setValuesBlocked(self,
        indices,
        values,
        addv=None) |  |  | 
    |  | 
        
          | setValuesBlockedLocal(self,
        indices,
        values,
        addv=None) |  |  | 
    |  | 
        
          | setValuesLocal(self,
        indices,
        values,
        addv=None) |  |  | 
    |  | 
        
          | setValuesStagStencil(self,
        indices,
        values,
        addv=None) |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | strideGather(self,
        field,
        Vec vec,
        addv=None) |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | strideNorm(self,
        field,
        norm_type=None) |  |  | 
    |  | 
        
          | strideScale(self,
        field,
        alpha) |  |  | 
    |  | 
        
          | strideScatter(self,
        field,
        Vec vec,
        addv=None) |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  |  | 
    |  | 
        
          | view(self,
        Viewer viewer=None) |  |  | 
    |  | 
        
          | waxpy(self,
        alpha,
        Vec x,
        Vec y) |  |  | 
    |  |  | 
  
    | Inherited from Object:__copy__,__deepcopy__,__eq__,__ge__,__gt__,__le__,__lt__,__ne__,__nonzero__,compose,decRef,getAttr,getClassId,getClassName,getComm,getDict,getName,getRefCount,getTabLevel,incRef,incrementTabLevel,query,setAttr,setName,setTabLevel,stateIncrease,viewFromOptions Inherited from object:__delattr__,__format__,__getattribute__,__hash__,__init__,__reduce__,__reduce_ex__,__repr__,__setattr__,__sizeof__,__str__,__subclasshook__ |