BVGetArray#
Returns a pointer to a contiguous array that contains this processor’s portion of the BV data.
Synopsis#
#include "slepcbv.h"
PetscErrorCode BVGetArray(BV bv,PetscScalar **a)
Logically Collective
Input Parameters#
bv - the basis vectors context
Output Parameter#
a - location to put pointer to the array
Notes#
BVRestoreArray() must be called when access to the array is no longer needed. This operation may imply a data copy, for BV types that do not store data contiguously in memory.
The pointer will normally point to the first entry of the first column, but if the BV has constraints then these go before the regular columns.
Note that for manipulating the pointer to the BV array, one must take into account the leading dimension, which might be different from the local number of rows, see BVGetLeadingDimension().
Use BVGetArrayRead() for read-only access.
See Also#
BVRestoreArray(), BVInsertConstraints(), BVGetLeadingDimension(), BVGetArrayRead()
Level#
advanced
Location#
Implementations#
BVGetArray_Contiguous() in src/sys/classes/bv/impls/contiguous/contig.c
BVGetArray_Mat() in src/sys/classes/bv/impls/mat/bvmat.c
BVGetArray_Svec() in src/sys/classes/bv/impls/svec/svec.c
BVGetArray_Vecs() in src/sys/classes/bv/impls/vecs/vecs.c
Index of all BV routines Table of Contents for all manual pages Index of all manual pages