SALSA Analysis Modules
stats.c
Go to the documentation of this file.
00001 /*! \file stats.c \ingroup categories 
00002   \brief Statistics on the AnaMod system
00003 
00004   \section stats Statistics on the AnaMod system
00005 
00006   The stats module needs to be enabled explicitly.
00007 
00008  */
00009 
00010 #include <stdlib.h>
00011 #include "anamod.h"
00012 #include "petscerror.h"
00013 
00014 #undef __FUNCT__
00015 #define __FUNCT__ "Version"
00016 /*! The AnaMod format version string
00017 */
00018 static PetscErrorCode Version
00019 (AnaModNumericalProblem prob,AnalysisItem *rv,int *l,PetscBool *flg)
00020 {
00021   int id; PetscBool has; PetscErrorCode ierr;
00022   PetscFunctionBegin;
00023   ierr = GetDataID("simple","trace",&id,&has); CHKERRQ(ierr);
00024   HASTOEXIST(has);
00025   rv->c = ANAMOD_FORMAT_VERSION;
00026   
00027   PetscFunctionReturn(0);
00028 }
00029 
00030 #undef __FUNCT__
00031 #define __FUNCT__ "RegisterStatsModules"
00032 /*! Declare statistics modules
00033 */
00034 PetscErrorCode RegisterStatsModules()
00035 {
00036   PetscErrorCode ierr;
00037   PetscFunctionBegin;
00038 
00039   ierr = RegisterModule
00040     ("stats","version",ANALYSISSTRING,&Version); CHKERRQ(ierr);
00041 
00042   PetscFunctionReturn(0);
00043 }