1 #ifndef setupdm_h 2 #define setupdm_h 3 4 #include <ceed.h> 5 #include <petsc.h> 6 #include <petscdmplex.h> 7 #include <petscfe.h> 8 #include "../include/structs.h" 9 10 // ----------------------------------------------------------------------------- 11 // Setup DM 12 // ----------------------------------------------------------------------------- 13 PetscErrorCode CreateBCLabel(DM dm, const char name[]); 14 15 // Create FE by degree 16 PetscErrorCode PetscFECreateByDegree(DM dm, PetscInt dim, PetscInt Nc, 17 PetscBool is_simplex, const char prefix[], 18 PetscInt order, PetscFE *fem); 19 20 // Read mesh and distribute DM in parallel 21 PetscErrorCode CreateDistributedDM(MPI_Comm comm, AppCtx app_ctx, DM *dm); 22 23 // Setup DM with FE space of appropriate degree 24 PetscErrorCode SetupDMByDegree(DM dm, AppCtx app_ctx, PetscInt order, 25 PetscBool boundary, PetscInt num_comp_u); 26 27 #endif // setupdm_h 28