Actual source code: dlregisdm.c

petsc-3.8.4 2018-03-24
Report Typos and Errors

  2:  #include <../src/vec/is/ao/aoimpl.h>

  4: static PetscBool AOPackageInitialized = PETSC_FALSE;

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

 10:   Level: developer

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

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

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

 30:   Level: developer

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

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