Actual source code: vmpicr.c
petsc-3.10.5 2019-03-28
Report Typos and Errors

      2: /*
      3:    This file contains routines for Parallel vector operations.
      4:  */

      6:  #include <petscvec.h>

      8: /*@
      9:    VecCreateMPI - Creates a parallel vector.

     11:    Collective on MPI_Comm

     13:    Input Parameters:
     14: +  comm - the MPI communicator to use
     15: .  n - local vector length (or PETSC_DECIDE to have calculated if N is given)
     16: -  N - global vector length (or PETSC_DETERMINE to have calculated if n is given)

     18:    Output Parameter:
     19: .  vv - the vector

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

     25:    Level: intermediate

     27:    Concepts: vectors^creating parallel

     29: .seealso: VecCreateSeq(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateGhost(),
     30:           VecCreateMPIWithArray(), VecCreateGhostWithArray(), VecMPISetGhost()

     32: @*/
     33: PetscErrorCode  VecCreateMPI(MPI_Comm comm,PetscInt n,PetscInt N,Vec *v)
     34: {

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