Actual source code: vseqcr.c
petsc-3.9.0 2018-04-07
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 on MPI_Comm
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: Concepts: vectors^creating sequential
28: .seealso: VecCreateMPI(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateGhost()
29: @*/
30: PetscErrorCode VecCreateSeq(MPI_Comm comm,PetscInt n,Vec *v)
31: {
35: VecCreate(comm,v);
36: VecSetSizes(*v,n,n);
37: VecSetType(*v,VECSEQ);
38: return(0);
39: }