MatShellGetScalingShifts#

Gets members of a MATSHELL used internally for scaling and shifting the Mat or calling MatAXPY(), MatZeroRows(), or MatZeroRowsColumns() with it

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatShellGetScalingShifts(Mat A, PetscScalar *vshift, PetscScalar *vscale, Vec *dshift, Vec *left, Vec *right, Mat *axpy, IS *zrows, IS *zcols)

Logically Collective

Input Parameter#

Output Parameters#

  • vshift - PetscScalar pointer (can be NULL), see MatShift(), or MAT_SHELL_NOT_ALLOWED if the internal shift should be 0

  • vscale - PetscScalar pointer (can be NULL), see MatScale(), or MAT_SHELL_NOT_ALLOWED if the internal scaling should be 1

  • dshift - Vec pointer (can be NULL), see MatDiagonalSet(), or MAT_SHELL_NOT_ALLOWED if the internal shift should be NULL

  • left - Vec pointer (can be NULL), see MatDiagonalScale(), or MAT_SHELL_NOT_ALLOWED if the internal scaling should be NULL

  • right - Vec pointer (can be NULL), see MatDiagonalScale(), or MAT_SHELL_NOT_ALLOWED if the internal scaling should be NULL

  • axpy - Mat pointer (can be NULL), or MAT_SHELL_NOT_ALLOWED if MatAXPY() should have not been called on A

  • zrows - Vec pointer (can be NULL), or MAT_SHELL_NOT_ALLOWED if MatZeroRows() should have not been called on A

  • zcols - Vec pointer (can be NULL), or MAT_SHELL_NOT_ALLOWED if MatZeroRowsColumns() should have not been called on A

Developer Notes#

This is mostly useful to check for corner-cases in MatType deriving from MATSHELL, e.g, MATCOMPOSITE or MATVIRTUALTRANSPOSE, since scaling and shifts often require extra work which is not always implemented.

See Also#

Matrices, Mat, MATSHELL, MatCreateShell(), MatShift(), MatScale(), MatDiagonalSet(), MatDiagonalScale(), MatAXPY(), MatZeroRows(), MatZeroRowsColumns(), MatShellSetManageScalingShifts()

Level#

advanced

Location#

src/mat/impls/shell/shell.c

Implementations#

MatShellGetScalingShifts_Shell() in src/mat/impls/shell/shell.c


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