Actual source code: dlregists.c
1: #define PETSCTS_DLL
3: #include include/private/tsimpl.h
7: /*@C
8: TSInitializePackage - This function initializes everything in the TS package. It is called
9: from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to TSCreate()
10: when using static libraries.
12: Input Parameter:
13: path - The dynamic library path, or PETSC_NULL
15: Level: developer
17: .keywords: TS, initialize, package
18: .seealso: PetscInitialize()
19: @*/
20: PetscErrorCode TSInitializePackage(const char path[]) {
21: static PetscTruth initialized = PETSC_FALSE;
22: char logList[256];
23: char *className;
24: PetscTruth opt;
25: PetscErrorCode ierr;
28: if (initialized) return(0);
29: initialized = PETSC_TRUE;
30: /* Register Classes */
31: PetscLogClassRegister(&TS_COOKIE, "TS");
32: /* Register Constructors */
33: TSRegisterAll(path);
34: /* Register Events */
39: /* Process info exclusions */
40: PetscOptionsGetString(PETSC_NULL, "-info_exclude", logList, 256, &opt);
41: if (opt) {
42: PetscStrstr(logList, "ts", &className);
43: if (className) {
44: PetscInfoDeactivateClass(TS_COOKIE);
45: }
46: }
47: /* Process summary exclusions */
48: PetscOptionsGetString(PETSC_NULL, "-log_summary_exclude", logList, 256, &opt);
49: if (opt) {
50: PetscStrstr(logList, "ts", &className);
51: if (className) {
53: }
54: }
55: return(0);
56: }
58: #ifdef PETSC_USE_DYNAMIC_LIBRARIES
62: /*
63: PetscDLLibraryRegister - This function is called when the dynamic library it is in is opened.
65: This one registers all the TS methods that are in the basic PETSc libpetscts library.
67: Input Parameter:
68: path - library path
69: */
70: PetscErrorCode PetscDLLibraryRegister_petscts(char *path)
71: {
74: PetscInitializeNoArguments(); if (ierr) return 1;
77: /*
78: If we got here then PETSc was properly loaded
79: */
80: TSInitializePackage(path);
81: return(0);
82: }
86: #endif /* PETSC_USE_DYNAMIC_LIBRARIES */