Actual source code: dlregisdm.c
petsc-3.12.5 2020-03-29
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: .seealso: PetscInitialize()
13: @*/
14: PetscErrorCode AOFinalizePackage(void)
15: {
19: PetscFunctionListDestroy(&AOList);
20: AOPackageInitialized = PETSC_FALSE;
21: AORegisterAllCalled = PETSC_FALSE;
22: return(0);
23: }
25: /*@C
26: AOInitializePackage - This function initializes everything in the AO package. It is called
27: from PetscDLLibraryRegister_petscvec() when using dynamic libraries, and on the first call to AOCreate()
28: when using static or shared libraries.
30: Level: developer
32: .seealso: PetscInitialize()
33: @*/
34: PetscErrorCode AOInitializePackage(void)
35: {
36: char logList[256];
37: PetscBool opt,pkg;
41: if (AOPackageInitialized) return(0);
42: AOPackageInitialized = PETSC_TRUE;
43: /* Register Classes */
44: PetscClassIdRegister("Application Order",&AO_CLASSID);
45: /* Register Constructors */
46: AORegisterAll();
47: /* Register Events */
48: PetscLogEventRegister("AOPetscToApplication", AO_CLASSID,&AO_PetscToApplication);
49: PetscLogEventRegister("AOApplicationToPetsc", AO_CLASSID,&AO_ApplicationToPetsc);
50: /* Process info exclusions */
51: PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,sizeof(logList),&opt);
52: if (opt) {
53: PetscStrInList("ao",logList,',',&pkg);
54: if (pkg) {PetscInfoDeactivateClass(AO_CLASSID);}
55: }
56: /* Process summary exclusions */
57: PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,sizeof(logList),&opt);
58: if (opt) {
59: PetscStrInList("ao",logList,',',&pkg);
60: if (pkg) {PetscLogEventExcludeClass(AO_CLASSID);}
61: }
62: /* Register package finalizer */
63: PetscRegisterFinalize(AOFinalizePackage);
64: return(0);
65: }