Actual source code: vseqcr.c

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

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

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

 14:    Collective on MPI_Comm

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

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

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

 27:    Level: intermediate

 29:    Concepts: vectors^creating sequential

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

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