# MatSeqAIJRegister
- Adds a new sub-matrix type for sequential `MATSEQAIJ` matrices 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatSeqAIJRegister(const char sname[], PetscErrorCode (*function)(Mat, MatType, MatReuse, Mat *))
```
Not Collective


## Input Parameters

- ***name -*** name of a new user-defined matrix type, for example `MATSEQAIJCRL`
- ***function -*** routine to convert to subtype



## Notes
`MatSeqAIJRegister()` may be called multiple times to add several user-defined solvers.

Then, your matrix can be chosen with the procedural interface at runtime via the option
```none
-mat_seqaij_type my_mat
```




## See Also
 `MatSeqAIJRegisterAll()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/aij.c.html#MatSeqAIJRegister">src/mat/impls/aij/seq/aij.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/aij/seq/aij.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
