Actual source code: vseqcr.c

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

      6: #include <../src/vec/vec/impls/dvecimpl.h>

      8: /*@
      9:    VecCreateSeq - Creates a standard, sequential array-style vector.

     11:    Collective

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

     17:    Output Parameter:
     18: .  V - the vector

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

     24:    Level: intermediate

     26: .seealso: VecCreateMPI(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateGhost()
     27: @*/
     28: PetscErrorCode  VecCreateSeq(MPI_Comm comm,PetscInt n,Vec *v)
     29: {

     33:   VecCreate(comm,v);
     34:   VecSetSizes(*v,n,n);
     35:   VecSetType(*v,VECSEQ);
     36:   return(0);
     37: }