VecCreateMPIWithArray
Creates a parallel vector with a user provided array.
Synopsis
int VecCreateMPIWithArray(MPI_Comm comm,int n,int N,Scalar *array,Vec *vv)
Collective on
MPI_Comm
Input Parameters
comm | - the MPI communicator to use
|
n | - local vector length (or PETSC_DECIDE to have calculated if N is given)
|
N | - global vector length (or PETSC_DECIDE to have calculated if n is given)
|
array | - the user provided array to store the vector values
|
Output Parameter
vv -the vector
Notes:
Use VecDuplicate() or VecDuplicateVecs() to form additional vectors of the
same type as an existing vector.
If use provided array is PETSC_NULL, then VecPlaceArray() can be used
at a later atage to SET the array for storing the vector values.
Keywords
vector, create, MPI
See Also
VecCreateSeq(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateGhost(),
VecCreateMPI(), VecCreateGhostWithArray(), VecPlaceArray()
Location: src/vec/impls/mpi/pbvec.c
Vector Index
Table of Contents