Actual source code: dlregismat.c

  1: #define PETSCMAT_DLL

 3:  #include include/private/matimpl.h

  5: const char *MatOptions[] = {"ROW_ORIENTED","COLUMN_ORIENTED","ROWS_SORTED",
  6:               "COLUMNS_SORTED","NO_NEW_NONZERO_LOCATIONS",
  7:               "YES_NEW_NONZERO_LOCATIONS","SYMMETRIC",
  8:               "STRUCTURALLY_SYMMETRIC","NO_NEW_DIAGONALS",
  9:               "YES_NEW_DIAGONALS","INODE_LIMIT_1","INODE_LIMIT_2",
 10:               "INODE_LIMIT_3","INODE_LIMIT_4","INODE_LIMIT_5",
 11:               "IGNORE_OFF_PROC_ENTRIES,ROWS_UNSORTED",
 12:               "COLUMNS_UNSORTED","NEW_NONZERO_LOCATION_ERR",
 13:               "NEW_NONZERO_ALLOCATION_ERR","USE_HASH_TABLE",
 14:               "KEEP_ZEROED_ROWS","IGNORE_ZERO_ENTRIES","USE_INODES",
 15:               "DO_NOT_USE_INODES","NOT_SYMMETRIC,HERMITIAN",
 16:               "NOT_STRUCTURALLY_SYMMETRIC","NOT_HERMITIAN",
 17:               "SYMMETRY_ETERNAL","NOT_SYMMETRY_ETERNAL",
 18:               "USE_COMPRESSEDROW","DO_NOT_USE_COMPRESSEDROW",
 19:               "IGNORE_LOWER_TRIANGULAR","ERROR_LOWER_TRIANGULAR","GETROW_UPPERTRIANGULAR","MatOption","MAT_",0};

 23: /*@C
 24:   MatInitializePackage - This function initializes everything in the Mat package. It is called
 25:   from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to MatCreate()
 26:   when using static libraries.

 28:   Input Parameter:
 29:   path - The dynamic library path, or PETSC_NULL

 31:   Level: developer

 33: .keywords: Mat, initialize, package
 34: .seealso: PetscInitialize()
 35: @*/
 36: PetscErrorCode  MatInitializePackage(char *path)
 37: {
 38:   static PetscTruth initialized = PETSC_FALSE;
 39:   char              logList[256];
 40:   char              *className;
 41:   PetscTruth        opt;
 42:   PetscErrorCode    ierr;

 45:   if (initialized) return(0);
 46:   initialized = PETSC_TRUE;
 47:   /* Register Classes */
 48:   PetscLogClassRegister(&MAT_COOKIE,              "Matrix");
 49:   PetscLogClassRegister(&MAT_FDCOLORING_COOKIE,   "Matrix FD Coloring");
 50:   PetscLogClassRegister(&MAT_PARTITIONING_COOKIE, "Matrix Partitioning");
 51:   PetscLogClassRegister(&MAT_NULLSPACE_COOKIE,    "Matrix Null Space");
 52:   /* Register Constructors */
 53:   MatRegisterAll(path);
 54:   /* Register Events */
109:   /* Turn off high traffic events by default */
111:   /* Process info exclusions */
112:   PetscOptionsGetString(PETSC_NULL, "-info_exclude", logList, 256, &opt);
113:   if (opt) {
114:     PetscStrstr(logList, "mat", &className);
115:     if (className) {
116:       PetscInfoDeactivateClass(MAT_COOKIE);
117:     }
118:   }
119:   /* Process summary exclusions */
120:   PetscOptionsGetString(PETSC_NULL, "-log_summary_exclude", logList, 256, &opt);
121:   if (opt) {
122:     PetscStrstr(logList, "mat", &className);
123:     if (className) {
125:     }
126:   }
127:   return(0);
128: }

130: #ifdef PETSC_USE_DYNAMIC_LIBRARIES
134: /*
135:   PetscDLLibraryRegister - This function is called when the dynamic library it is in is opened.

137:   This one registers all the matrix methods that are in the basic PETSc Matrix library.

139:   Input Parameter:
140:   path - library path
141:  */
142: PetscErrorCode  PetscDLLibraryRegister_petscmat(char *path)
143: {

146:   PetscInitializeNoArguments(); if (ierr) return 1;

149:   /*
150:       If we got here then PETSc was properly loaded
151:   */
152:   MatInitializePackage(path);
153:   return(0);
154: }


158: #endif /* PETSC_USE_DYNAMIC_LIBRARIES */