Actual source code: dlregisdm.c

petsc-3.5.2 2014-09-08
Report Typos and Errors
  2: #include <../src/vec/is/ao/aoimpl.h>

  4: static PetscBool AOPackageInitialized = PETSC_FALSE;

  8: /*@C
  9:   AOFinalizePackage - This function finalizes everything in the AO package. It is called
 10:   from PetscFinalize().

 12:   Level: developer

 14: .keywords: AO, initialize, package
 15: .seealso: PetscInitialize()
 16: @*/
 17: PetscErrorCode  AOFinalizePackage(void)
 18: {

 22:   PetscFunctionListDestroy(&AOList);
 23:   AOPackageInitialized = PETSC_FALSE;
 24:   return(0);
 25: }

 29: /*@C
 30:   AOInitializePackage - This function initializes everything in the AO package. It is called
 31:   from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to AOCreate().

 33:   Level: developer

 35: .keywords: AO, initialize, package
 36: .seealso: PetscInitialize()
 37: @*/
 38: PetscErrorCode  AOInitializePackage(void)
 39: {
 40:   char           logList[256];
 41:   char           *className;
 42:   PetscBool      opt;

 46:   if (AOPackageInitialized) return(0);
 47:   AOPackageInitialized = PETSC_TRUE;
 48:   /* Register Classes */
 49:   PetscClassIdRegister("Application Order",&AO_CLASSID);
 50:   /* Register Constructors */
 51:   AORegisterAll();
 52:   /* Register Events */
 53:   PetscLogEventRegister("AOPetscToApplication", AO_CLASSID,&AO_PetscToApplication);
 54:   PetscLogEventRegister("AOApplicationToPetsc", AO_CLASSID,&AO_ApplicationToPetsc);
 55:   /* Process info exclusions */
 56:   PetscOptionsGetString(NULL, "-info_exclude", logList, 256, &opt);
 57:   if (opt) {
 58:     PetscStrstr(logList, "ao", &className);
 59:     if (className) {
 60:       PetscInfoDeactivateClass(AO_CLASSID);
 61:     }
 62:   }
 63:   /* Process summary exclusions */
 64:   PetscOptionsGetString(NULL, "-log_summary_exclude", logList, 256, &opt);
 65:   if (opt) {
 66:     PetscStrstr(logList, "ao", &className);
 67:     if (className) {
 68:       PetscLogEventDeactivateClass(AO_CLASSID);
 69:     }
 70:   }
 71:   PetscRegisterFinalize(AOFinalizePackage);
 72:   return(0);
 73: }