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