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 #include "structs.h" 10 11 CeedMemType MemTypeP2C(PetscMemType mtype); 12 PetscErrorCode Kershaw(DM dm_orig, PetscScalar eps); 13 PetscErrorCode SetupDMByDegree(DM dm, PetscInt p_degree, PetscInt q_extra, PetscInt num_comp_u, PetscInt topo_dim, bool enforce_bc); 14 PetscErrorCode CreateRestrictionFromPlex(Ceed ceed, DM dm, CeedInt height, DMLabel domain_label, CeedInt value, CeedElemRestriction *elem_restr); 15 CeedElemTopology ElemTopologyP2C(DMPolytopeType cell_type); 16 PetscErrorCode DMFieldToDSField(DM dm, DMLabel domain_label, PetscInt dm_field, PetscInt *ds_field); 17 PetscErrorCode BasisCreateFromTabulation(Ceed ceed, DM dm, DMLabel domain_label, PetscInt label_value, PetscInt height, PetscInt face, PetscFE fe, 18 PetscTabulation basis_tabulation, PetscQuadrature quadrature, CeedBasis *basis); 19 PetscErrorCode CreateBasisFromPlex(Ceed ceed, DM dm, DMLabel domain_label, CeedInt label_value, CeedInt height, CeedInt dm_field, BPData bp_data, 20 CeedBasis *basis); 21 PetscErrorCode CreateDistributedDM(RunParams rp, DM *dm); 22 23 #endif // libceed_petsc_examples_utils_h 24