MatRegisterRootName#
Registers a name that can be used for either a sequential or its corresponding parallel matrix type. MatSetType()
and -mat_type name
will automatically use the sequential or parallel version based on the size of the MPI communicator associated with the matrix.
Synopsis#
#include "petscmat.h"
PetscErrorCode MatRegisterRootName(const char rname[], const char sname[], const char mname[])
Input Parameters#
Note#
The matrix rootname should not be confused with the base type of the function PetscObjectBaseTypeCompare()
Developer Note#
PETSc vectors have a similar rootname that indicates PETSc should automatically select the appropriate VecType
based on the
size of the communicator but it is implemented by simply having additional VecCreate_RootName()
registerer routines that dispatch to the
appropriate creation routine. Why have two different ways of implementing the same functionality for different types of objects? It is
confusing.
See Also#
Level#
developer
Location#
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages