1 #ifndef libceed_petsc_examples_utils_h 2 #define libceed_petsc_examples_utils_h 3 4 #include <ceed.h> 5 #include <petsc.h> 6 #include <petscdmplex.h> 7 #include <petscfe.h> 8 9 CeedMemType MemTypeP2C(PetscMemType mtype); 10 PetscErrorCode Kershaw(DM dm_orig, PetscScalar eps); 11 typedef PetscErrorCode (*BCFunction)(PetscInt dim, PetscReal time, 12 const PetscReal x[], 13 PetscInt num_comp_u, PetscScalar *u, void *ctx); 14 PetscErrorCode SetupDMByDegree(DM dm, PetscInt degree, PetscInt num_comp_u, 15 PetscInt topo_dim, 16 bool enforce_bc, BCFunction bc_func); 17 PetscErrorCode CreateRestrictionFromPlex(Ceed ceed, DM dm, CeedInt height, 18 DMLabel domain_label, CeedInt value, CeedElemRestriction *elem_restr); 19 20 #endif // libceed_petsc_examples_utils_h 21