Date: 2015-10-02T22:02:34+00:00

Actual source code: vseqcr.c
petsc-3.6.2 2015-10-02
Report Typos and Errors

      2: /*
      3:    Implements the sequential vectors.
      4: */

      6: #include <../src/vec/vec/impls/dvecimpl.h>          /*I  "petscvec.h"   I*/

     10: /*@
     11:    VecCreateSeq - Creates a standard, sequential array-style vector.

     13:    Collective on MPI_Comm

     15:    Input Parameter:
     16: +  comm - the communicator, should be PETSC_COMM_SELF
     17: -  n - the vector length

     19:    Output Parameter:
     20: .  V - the vector

     22:    Notes:
     23:    Use VecDuplicate() or VecDuplicateVecs() to form additional vectors of the
     24:    same type as an existing vector.

     26:    Level: intermediate

     28:    Concepts: vectors^creating sequential

     30: .seealso: VecCreateMPI(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateGhost()
     31: @*/
     32: PetscErrorCode  VecCreateSeq(MPI_Comm comm,PetscInt n,Vec *v)
     33: {

     37:   VecCreate(comm,v);
     38:   VecSetSizes(*v,n,n);
     39:   VecSetType(*v,VECSEQ);
     40:   return(0);
     41: }