Actual source code: dlregissf.c

petsc-3.4.4 2014-03-13
  1: #include <petsc-private/sfimpl.h>

  3: PetscClassId PETSCSF_CLASSID;

  5: static PetscBool PetscSFPackageInitialized = PETSC_FALSE;

  7: PetscBool PetscSFRegisterAllCalled;

 11: /*@C
 12:    PetscSFInitializePackage - Initialize SF package

 14:    Logically Collective

 16:    Level: developer

 18: .seealso: PetscSFFinalizePackage()
 19: @*/
 20: PetscErrorCode PetscSFInitializePackage(void)
 21: {

 25:   if (PetscSFPackageInitialized) return(0);
 26:   PetscSFPackageInitialized = PETSC_TRUE;

 28:   PetscClassIdRegister("Bipartite Graph",&PETSCSF_CLASSID);
 29:   PetscSFRegisterAll();
 30:   PetscRegisterFinalize(PetscSFFinalizePackage);
 31:   return(0);
 32: }

 36: /*@C
 37:    PetscSFFinalizePackage - Finalize PetscSF package, it is called from PetscFinalize()

 39:    Logically Collective

 41:    Level: developer

 43: .seealso: PetscSFInitializePackage()
 44: @*/
 45: PetscErrorCode PetscSFFinalizePackage(void)
 46: {

 50:   PetscFunctionListDestroy(&PetscSFList);
 51:   PetscSFPackageInitialized = PETSC_FALSE;
 52:   PetscSFRegisterAllCalled  = PETSC_FALSE;
 53:   return(0);
 54: }