Actual source code: dlregisdm.c
petsc-3.7.7 2017-09-25
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: AORegisterAllCalled = PETSC_FALSE;
25: return(0);
26: }
30: /*@C
31: AOInitializePackage - This function initializes everything in the AO package. It is called
32: from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to AOCreate().
34: Level: developer
36: .keywords: AO, initialize, package
37: .seealso: PetscInitialize()
38: @*/
39: PetscErrorCode AOInitializePackage(void)
40: {
41: char logList[256];
42: char *className;
43: PetscBool opt;
47: if (AOPackageInitialized) return(0);
48: AOPackageInitialized = PETSC_TRUE;
49: /* Register Classes */
50: PetscClassIdRegister("Application Order",&AO_CLASSID);
51: /* Register Constructors */
52: AORegisterAll();
53: /* Register Events */
54: PetscLogEventRegister("AOPetscToApplication", AO_CLASSID,&AO_PetscToApplication);
55: PetscLogEventRegister("AOApplicationToPetsc", AO_CLASSID,&AO_ApplicationToPetsc);
56: /* Process info exclusions */
57: PetscOptionsGetString(NULL,NULL, "-info_exclude", logList, 256, &opt);
58: if (opt) {
59: PetscStrstr(logList, "ao", &className);
60: if (className) {
61: PetscInfoDeactivateClass(AO_CLASSID);
62: }
63: }
64: /* Process summary exclusions */
65: PetscOptionsGetString(NULL,NULL, "-log_exclude", logList, 256, &opt);
66: if (opt) {
67: PetscStrstr(logList, "ao", &className);
68: if (className) {
69: PetscLogEventDeactivateClass(AO_CLASSID);
70: }
71: }
72: PetscRegisterFinalize(AOFinalizePackage);
73: return(0);
74: }