petsc-3.12.5 2020-03-29
Report Typos and Errors

MatDensePlaceArray

Allows one to replace the array in a dense array with an array provided by the user. This is useful to avoid copying an array into a matrix

Synopsis

#include "petscmat.h"  
PetscErrorCode  MatDensePlaceArray(Mat mat,const PetscScalar array[])
Not Collective

Input Parameters

mat - the matrix
array - the array in column major order

Notes

You can return to the original array with a call to MatDenseResetArray(). The user is responsible for freeing this array; it will not be freed when the matrix is destroyed.

See Also

MatDenseGetArray(), MatDenseResetArray(), VecPlaceArray(), VecGetArray(), VecRestoreArray(), VecReplaceArray(), VecResetArray()

Level

developer

Location

src/mat/impls/dense/mpi/mpidense.c

Implementations

MatDensePlaceArray_MPIDense in src/mat/impls/dense/mpi/mpidense.c
MatDensePlaceArray_SeqDense in src/mat/impls/dense/seq/dense.c

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