Actual source code: dlregisdm.c

petsc-3.9.2 2018-05-20
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:   PetscBool      opt,pkg;

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