Actual source code: glexg.c

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

  3: PetscBool DMPlexGenerateRegisterAllCalled = PETSC_FALSE;

  5: #if defined(PETSC_HAVE_TRIANGLE)
  6: PETSC_EXTERN PetscErrorCode DMPlexGenerate_Triangle(DM, PetscBool, DM*);
  7: PETSC_EXTERN PetscErrorCode DMPlexRefine_Triangle(DM, double*, DM*);
  8: #endif
  9: #if defined(PETSC_HAVE_TETGEN)
 10: PETSC_EXTERN PetscErrorCode DMPlexGenerate_Tetgen(DM, PetscBool, DM*);
 11: PETSC_EXTERN PetscErrorCode DMPlexRefine_Tetgen(DM, double*, DM*);
 12: #endif
 13: #if defined(PETSC_HAVE_CTETGEN)
 14: PETSC_EXTERN PetscErrorCode DMPlexGenerate_CTetgen(DM, PetscBool, DM*);
 15: PETSC_EXTERN PetscErrorCode DMPlexRefine_CTetgen(DM, double*, DM*);
 16: #endif

 18: /*@C
 19:   DMPlexGenerateRegisterAll - Registers all of the mesh generation methods in the DMPlexGenerate package.

 21:   Not Collective

 23:   Level: advanced

 25: .seealso:  DMPlexGenerateRegisterDestroy()
 26: @*/
 27: PetscErrorCode  DMPlexGenerateRegisterAll(void)
 28: {
 29: #if defined(PETSC_HAVE_TRIANGLE) || defined(PETSC_HAVE_CTETGEN) || defined(PETSC_HAVE_TETGEN)
 31: #endif

 34:   if (DMPlexGenerateRegisterAllCalled) return(0);
 35:   DMPlexGenerateRegisterAllCalled = PETSC_TRUE;
 36: #if defined(PETSC_HAVE_TRIANGLE)
 37:   DMPlexGenerateRegister("triangle",DMPlexGenerate_Triangle,DMPlexRefine_Triangle,1);
 38: #endif
 39: #if defined(PETSC_HAVE_CTETGEN)
 40:   DMPlexGenerateRegister("ctetgen",DMPlexGenerate_CTetgen,DMPlexRefine_CTetgen,2);
 41: #endif
 42: #if defined(PETSC_HAVE_TETGEN)
 43:   DMPlexGenerateRegister("tetgen",DMPlexGenerate_Tetgen,DMPlexRefine_Tetgen,2);
 44: #endif
 45:   return(0);
 46: }