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

MatRegister

- Adds a new matrix type

Synopsis

#include "petscmat.h" 
PetscErrorCode  MatRegister(const char sname[],PetscErrorCode (*function)(Mat))
Not Collective Many br

Input Parameters

name - name of a new user-defined matrix type Many br
routine_create - routine to create method context Many br

Notes

MatRegister() may be called multiple times to add several user-defined solvers. Many br

Sample usage

   MatRegister("my_mat",MyMatCreate);
Many br

Then, your solver can be chosen with the procedural interface via Many br

    MatSetType(Mat,"my_mat")
or at runtime via the option Many br
    -mat_type my_mat

Many br

Keywords

Mat, register

See Also

MatRegisterAll()

Many br

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