Actual source code: vmpicr.c
1: /*$Id: vmpicr.c,v 1.14 2001/03/23 23:21:26 balay Exp $*/
3: /*
4: This file contains routines for Parallel vector operations.
5: */
7: #include src/vec/impls/mpi/pvecimpl.h
9: #undef __FUNCT__
11: /*@C
12: VecCreateMPI - Creates a parallel vector.
14: Collective on MPI_Comm
15:
16: Input Parameters:
17: + comm - the MPI communicator to use
18: . n - local vector length (or PETSC_DECIDE to have calculated if N is given)
19: - N - global vector length (or PETSC_DETERMINE to have calculated if n is given)
21: Output Parameter:
22: . vv - the vector
24: Notes:
25: Use VecDuplicate() or VecDuplicateVecs() to form additional vectors of the
26: same type as an existing vector.
28: Level: intermediate
30: Concepts: vectors^creating parallel
32: .seealso: VecCreateSeq(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateGhost(),
33: VecCreateMPIWithArray(), VecCreateGhostWithArray()
35: @*/
36: int VecCreateMPI(MPI_Comm comm,int n,int N,Vec *v)
37: {
41: VecCreate(comm,v);
42: VecSetSizes(*v,n,N);
43: VecSetType(*v,VECMPI);
44: return(0);
45: }