petsc-3.7.1 2016-05-15
Report Typos and Errors

MatSetValuesBatch

Adds (ADD_VALUES) many blocks of values into a matrix at once. The blocks must all be square and the same size. Currently, this can only be called once and creates the given matrix.

Synopsis

#include "petscmat.h" 
PetscErrorCode MatSetValuesBatch(Mat mat, PetscInt nb, PetscInt bs, PetscInt rows[], const PetscScalar v[])
Not Collective Many br

Input Parameters

mat - the matrix Many br
nb - the number of blocks Many br
bs - the number of rows (and columns) in each block Many br
rows - a concatenation of the rows for each block Many br
v - a concatenation of logically two-dimensional arrays of values Many br

Notes

In the future, we will extend this routine to handle rectangular blocks, and to allow multiple calls for a given matrix. Many br

Many br

See Also

MatSetOption(), MatAssemblyBegin(), MatAssemblyEnd(), MatSetValuesBlocked(), MatSetValuesLocal(),
InsertMode, INSERT_VALUES, ADD_VALUES, MatSetValues() Many br

Level:advanced
Location:
src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ksp/ksp/examples/tutorials/ex4.c.html