#include "petscmat.h" PetscErrorCode MatSetValuesCOO(Mat A, const PetscScalar coo_v[], InsertMode imode)Collective on Mat
A | - matrix being preallocated | |
coo_v | - the matrix values (can be NULL) | |
imode | - the insert mode |
Notes: The values must follow the order of the indices prescribed with MatSetPreallocationCOO(). When repeated entries are specified in the COO indices the coo_v values are first properly summed. The imode flag indicates if coo_v must be added to the current values of the matrix (ADD_VALUES) or overwritten (INSERT_VALUES). Currently optimized for cuSPARSE matrices only. Passing coo_v == NULL is equivalent to passing an array of zeros.