Actual source code: dlregisdmfield.c

petsc-3.13.6 2020-09-29
Report Typos and Errors
  1:  #include <petsc/private/dmfieldimpl.h>

  3: PetscClassId DMFIELD_CLASSID;

  5: static PetscBool DMFieldPackageInitialized = PETSC_FALSE;

  7: PetscBool DMFieldRegisterAllCalled;

  9: /*@C
 10:    DMFieldInitializePackage - Initialize DMField package

 12:    Logically Collective

 14:    Level: developer

 16: .seealso: DMFieldFinalizePackage()
 17: @*/
 18: PetscErrorCode DMFieldInitializePackage(void)
 19: {

 23:   if (DMFieldPackageInitialized) return(0);
 24:   DMFieldPackageInitialized = PETSC_TRUE;

 26:   PetscClassIdRegister("Field over DM",&DMFIELD_CLASSID);
 27:   DMFieldRegisterAll();
 28:   PetscRegisterFinalize(DMFieldFinalizePackage);
 29:   return(0);
 30: }

 32: /*@C
 33:    DMFieldFinalizePackage - Finalize DMField package, it is called from PetscFinalize()

 35:    Logically Collective

 37:    Level: developer

 39: .seealso: DMFieldInitializePackage()
 40: @*/
 41: PetscErrorCode DMFieldFinalizePackage(void)
 42: {

 46:   PetscFunctionListDestroy(&DMFieldList);
 47:   DMFieldPackageInitialized = PETSC_FALSE;
 48:   DMFieldRegisterAllCalled  = PETSC_FALSE;
 49:   return(0);
 50: }