1 #ifndef petscutils_h 2 #define petscutils_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 PetscFECreateByDegree(DM dm, PetscInt dim, PetscInt Nc, 11 PetscBool isSimplex, const char prefix[], 12 PetscInt order, PetscFE *fem); 13 PetscErrorCode ProjectToUnitSphere(DM dm); 14 typedef PetscErrorCode (*BCFunction)(PetscInt dim, PetscReal time, 15 const PetscReal x[], 16 PetscInt ncompu, PetscScalar *u, void *ctx); 17 PetscErrorCode SetupDMByDegree(DM dm, PetscInt degree, PetscInt ncompu, 18 PetscInt topodim, 19 bool enforcebc, BCFunction bcsfunc); 20 PetscErrorCode CreateRestrictionFromPlex(Ceed ceed, DM dm, CeedInt P, 21 CeedInt topodim, CeedInt height, DMLabel domainLabel, CeedInt value, 22 CeedElemRestriction *Erestrict); 23 24 #endif // petscutils_h 25