Actual source code: glexg.c
petsc-3.10.5 2019-03-28
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: .keywords: DMPlexGenerate, register, all

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

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