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