Actual source code: dlregis.c

 2:  #include slepceps.h

  4: #ifdef PETSC_USE_DYNAMIC_LIBRARIES
  5: EXTERN_C_BEGIN
  8: /*
  9:   PetscDLLibraryRegister - This function is called when the dynamic library 
 10:   it is in is opened.

 12:   This one registers all the EPS and ST methods in the libslepc.a
 13:   library.

 15:   Input Parameter:
 16:   path - library path
 17:  */
 18: PetscErrorCode PetscDLLibraryRegister(char *path)
 19: {
 20:   PetscErrorCode ierr;

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

 25:   /*
 26:       If we got here then PETSc was properly loaded
 27:   */
 28:   EPSRegisterAll(path);
 29:   STRegisterAll(path);
 30:   return(0);
 31: }
 32: EXTERN_C_END

 34: /* --------------------------------------------------------------------------*/
 35: static char *contents = "Iterative methods for large sparse eigenvalue problems.\n";

 37: static char *authors = SLEPC_AUTHOR_INFO;
 38: static char *version = SLEPC_VERSION_NUMBER;

 40: /* --------------------------------------------------------------------------*/
 41: EXTERN_C_BEGIN
 44: PetscErrorCode PetscDLLibraryInfo(char *path,char *type,char **mess)
 45: {
 46:   PetscErrorCode ierr;
 47:   PetscTruth     iscon,isaut,isver;


 51:   PetscStrcmp(type,"Contents",&iscon);
 52:   PetscStrcmp(type,"Authors",&isaut);
 53:   PetscStrcmp(type,"Version",&isver);
 54:   if (iscon)      *mess = contents;
 55:   else if (isaut) *mess = authors;
 56:   else if (isver) *mess = version;
 57:   else            *mess = 0;

 59:   return(0);
 60: }
 61: EXTERN_C_END

 63: #endif /* PETSC_USE_DYNAMIC_LIBRARIES */