Each analysis module has to have the following prototype:
static PetscErrorCode MyModule(Mat A,AnalysisItem *rv,PetscTruth *flg)
A is the input matrixrv is the return valueflg is true if the quantity was succesfully computed, false otherwise
The module return code should be 0 for success, anything else for (catastrophic) failure. A simple failure (or refusal) to compute should be indicated through the flg variable.
The modules (including the return type of their computed quantities) are declared to the system by calling routine
PetscErrorCode RegisterMyModules()
{
PetscErrorCode ierr;
PetscFunctionBegin;
ierr = RegisterModule
("mycategory","mymodule",THERESULTTYPE,&MyModule); CHKERRQ(ierr);
....
1.5.9