VecCreateMPI#
Creates a parallel vector.
Synopsis#
#include "petscvec.h"
PetscErrorCode VecCreateMPI(MPI_Comm comm, PetscInt n, PetscInt N, Vec *v)
Collective
Input Parameters#
comm - the MPI communicator to use
n - local vector length (or
PETSC_DECIDE
to have calculated ifN
is given)N - global vector length (or
PETSC_DETERMINE
to have calculated ifn
is given)
Output Parameter#
vv - the vector
Notes#
Use VecDuplicate()
or VecDuplicateVecs()
to form additional vectors of the
same type as an existing vector.
See Also#
Vectors and Parallel Data, Vec
, VecType
, VecCreateSeq()
, VecCreate()
, VecDuplicate()
, VecDuplicateVecs()
, VecCreateGhost()
,
VecCreateMPIWithArray()
, VecCreateGhostWithArray()
, VecMPISetGhost()
Level#
intermediate
Location#
Examples#
src/dm/field/tutorials/ex1.c
src/ksp/ksp/tutorials/ex15f.F90
src/ksp/ksp/tutorials/ex2f.F90
src/ksp/ksp/tutorials/ex52f.F90
src/ksp/ksp/tutorials/ex57f.F90
src/ksp/ksp/tutorials/ex77.c
src/tao/bound/tutorials/plate2.c
src/tao/bound/tutorials/plate2f.F90
src/ts/tutorials/ex11.c
src/vec/vec/tutorials/ex1.c
src/vec/vec/tutorials/ex11.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages