Actual source code: dlregisdm.c
petsc-3.13.6 2020-09-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 */
51: {
52: PetscClassId classids[1];
54: classids[0] = AO_CLASSID;
55: PetscInfoProcessClass("ao", 1, classids);
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) {PetscLogEventExcludeClass(AO_CLASSID);}
62: }
63: /* Register package finalizer */
64: PetscRegisterFinalize(AOFinalizePackage);
65: return(0);
66: }