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