#include "petscvec.h" int VecCreateMPIWithArray(MPI_Comm comm,int n,int N,const PetscScalar array[],Vec *vv)Collective on MPI_Comm
comm | - the MPI communicator to use | |
n | - local vector length, cannot be PETSC_DECIDE | |
N | - global vector length (or PETSC_DECIDE to have calculated) | |
array | - the user provided array to store the vector values |
If the user-provided array is PETSC_NULL, then VecPlaceArray() can be used at a later stage to SET the array for storing the vector values.
PETSc does NOT free the array when the vector is destroyed via VecDestroy(). The user should not free the array until the vector is destroyed.
Level:intermediate
Location:src/vec/impls/mpi/pbvec.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages