Date: 2022-03-31T04:46:21+00:00

Actual source code: dlregistagger.c

      1: #include <petsc/private/vecimpl.h>

      3: PetscClassId VEC_TAGGER_CLASSID;

      5: static PetscBool VecTaggerPackageInitialized = PETSC_FALSE;

      7: PetscBool VecTaggerRegisterAllCalled;

      9: /*@C
     10:    VecTaggerInitializePackage - Initialize VecTagger package

     12:    Logically Collective

     14:    Level: developer

     16: .seealso: VecTaggerFinalizePackage()
     17: @*/
     18: PetscErrorCode VecTaggerInitializePackage(void)
     19: {
     20:   if (VecTaggerPackageInitialized) return 0;
     21:   VecTaggerPackageInitialized = PETSC_TRUE;

     23:   PetscClassIdRegister("Vector Indices Tagger",&VEC_TAGGER_CLASSID);
     24:   VecTaggerRegisterAll();
     25:   PetscRegisterFinalize(VecTaggerFinalizePackage);
     26:   return 0;
     27: }

     29: /*@C
     30:    VecTaggerFinalizePackage - Finalize VecTagger package, it is called from PetscFinalize()

     32:    Logically Collective

     34:    Level: developer

     36: .seealso: VecTaggerInitializePackage()
     37: @*/
     38: PetscErrorCode VecTaggerFinalizePackage(void)
     39: {
     40:   PetscFunctionListDestroy(&VecTaggerList);
     41:   VecTaggerPackageInitialized = PETSC_FALSE;
     42:   VecTaggerRegisterAllCalled  = PETSC_FALSE;
     43:   return 0;
     44: }