MatSetValuesBlockedLocal#

Inserts or adds values into certain locations of a matrix, using a local ordering of the nodes a block at a time.

Synopsis#

#include "petscmat.h"
PetscErrorCode MatSetValuesBlockedLocal(Mat mat, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt icol[], const PetscScalar y[], InsertMode addv)


Not Collective

Input Parameters#

• x - the matrix

• nrow, irow - number of rows and their local indices

• ncol, icol - number of columns and their local indices

• y - a logically two-dimensional array of values

• addv - either ADD_VALUES to add values to any existing entries, or INSERT_VALUES to replace existing entries with new values

Notes#

If you create the matrix yourself (that is not with a call to DMCreateMatrix()) then you MUST call MatXXXXSetPreallocation() or MatSetUp() before using this routine

If you create the matrix yourself (that is not with a call to DMCreateMatrix()) then you MUST call MatSetBlockSize() and MatSetLocalToGlobalMapping() before using this routineBefore calling MatSetValuesLocal(), the user must first set the

Calls to MatSetValuesBlockedLocal() with the INSERT_VALUES and ADD_VALUES options cannot be mixed without intervening calls to the assembly routines.

These values may be cached, so MatAssemblyBegin() and MatAssemblyEnd() MUST be called after all calls to MatSetValuesBlockedLocal() have been completed.

Developer Note#

This is labeled with C so does not automatically generate Fortran stubs and interfaces because it requires multiple Fortran interfaces depending on which arguments are scalar or arrays.

Mat, MatSetBlockSize(), MatSetLocalToGlobalMapping(), MatAssemblyBegin(), MatAssemblyEnd(), MatSetValuesLocal(), MatSetValuesBlocked()

intermediate

Location#

src/mat/interface/matrix.c

Edit on GitLab