petsc-3.15.0 2021-04-05
Report Typos and Errors


Restores a vector after VecGetArray1dWrite() has been called.


#include "petscvec.h"   
PetscErrorCode  VecRestoreArray1dWrite(Vec x,PetscInt m,PetscInt mstart,PetscScalar *a[])
Logically Collective

Input Parameters

x - the vector
m - first dimension of two dimensional array
mstart - first index you will use in first coordinate direction (often 0)
a - location of pointer to array obtained from VecGetArray21()


For regular PETSc vectors this routine does not involve any copies. For any special vectors that do not store local vector data in a contiguous array, this routine will copy the data back into the underlying vector data structure from the array obtained with VecGetArray1d().

This routine actually zeros out the a pointer.

Concepts: vector^accessing local values as 1d array

See Also

VecGetArray(), VecRestoreArray(), VecRestoreArrays(), VecRestoreArrayF90(), VecPlaceArray(),
VecGetArray2d(), VecGetArray3d(), VecRestoreArray3d(), DMDAVecGetArray(), DMDAVecRestoreArray() VecGetArray1d(), VecRestoreArray2d(), VecGetArray4d(), VecRestoreArray4d()




Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages