Actual source code: dlregisdm.c
petsc-3.11.4 2019-09-28
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_petscvec() when using dynamic libraries, and on the first call to AOCreate()
29: when using static or shared libraries.
31: Level: developer
33: .keywords: AO, initialize, package
34: .seealso: PetscInitialize()
35: @*/
36: PetscErrorCode AOInitializePackage(void)
37: {
38: char logList[256];
39: PetscBool opt,pkg;
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,sizeof(logList),&opt);
54: if (opt) {
55: PetscStrInList("ao",logList,',',&pkg);
56: if (pkg) {PetscInfoDeactivateClass(AO_CLASSID);}
57: }
58: /* Process summary exclusions */
59: PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,sizeof(logList),&opt);
60: if (opt) {
61: PetscStrInList("ao",logList,',',&pkg);
62: if (pkg) {PetscLogEventExcludeClass(AO_CLASSID);}
63: }
64: /* Register package finalizer */
65: PetscRegisterFinalize(AOFinalizePackage);
66: return(0);
67: }