1 #if !defined(_PETSCFETYPES_H) 2 #define _PETSCFETYPES_H 3 4 /*S 5 PetscSpace - PETSc object that manages a linear space, e.g. the space of d-dimensional polynomials of given degree 6 7 Level: intermediate 8 9 Concepts: finite element 10 11 .seealso: PetscSpaceCreate(), PetscDualSpaceCreate(), PetscSpaceSetType(), PetscSpaceType 12 S*/ 13 typedef struct _p_PetscSpace *PetscSpace; 14 15 /*MC 16 PetscSpacePolynomialType - The type of polynomial space 17 18 Notes: 19 $ PETSCSPACE_POLYNOMIALTYPE_P - This is the normal polynomial space of degree q, P_q or Q_q. 20 $ PETSCSPACE_POLYNOMIALTYPE_PMINUS_HDIV - This is the smallest polynomial space contained in P_q/Q_q such that the divergence is in P_{q-1}/Q_{q-1}. Making this space is straightforward: 21 $ P^-_q = P_{q-1} + P_{(q-1)} x 22 $ where P_{(q-1)} is the space of homogeneous polynomials of degree q-1. 23 $ PETSCSPACE_POLYNOMIALTYPE_PMINUS_HCURL - This is the smallest polynomial space contained in P_q/Q_q such that the curl is in P_{q-1}/Q_{q-1}. Making this space is straightforward: 24 $ P^-_q = P_{q-1} + P_{(q-1)} rot x 25 $ where P_{(q-1)} is the space of homogeneous polynomials of degree q-1, and rot x is (-y, x) in 2D, and (z - y, x - z, y - x) in 3D, being the generators of the rotation algebra. 26 27 Level: intermediate 28 29 .seealso: PetscSpace 30 M*/ 31 typedef enum { PETSCSPACE_POLYNOMIALTYPE_P, PETSCSPACE_POLYNOMIALTYPE_PMINUS_HDIV, PETSCSPACE_POLYNOMIALTYPE_PMINUS_HCURL } PetscSpacePolynomialType; 32 PETSC_EXTERN const char * const PetscSpacePolynomialTypes[]; 33 34 /*S 35 PetscDualSpace - PETSc object that manages the dual space to a linear space, e.g. the space of evaluation functionals at the vertices of a triangle 36 37 Level: intermediate 38 39 Concepts: finite element 40 41 .seealso: PetscDualSpaceCreate(), PetscSpaceCreate(), PetscDualSpaceSetType(), PetscDualSpaceType 42 S*/ 43 typedef struct _p_PetscDualSpace *PetscDualSpace; 44 45 /*MC 46 PetscDualSpaceReferenceCell - The type of reference cell 47 48 Notes: This is used only for automatic creation of reference cells. A PetscDualSpace can accept an arbitary DM for a reference cell. 49 50 Level: intermediate 51 52 .seealso: PetscSpace 53 M*/ 54 typedef enum { PETSCDUALSPACE_REFCELL_SIMPLEX, PETSCDUALSPACE_REFCELL_TENSOR } PetscDualSpaceReferenceCell; 55 PETSC_EXTERN const char * const PetscDualSpaceReferenceCells[]; 56 57 /*MC 58 PetscDualSpaceTransformType - The type of function transform 59 60 Notes: These transforms, and their inverses, are used to move functions and functionals between the reference element and real space. Suppose that we have a mapping $\phi$ which maps the reference cell to real space, and its Jacobian $J$. If we want to transform function $F$ on the reference element, so that it acts on real space, we use the pushforward transform $\sigma^*$. The pullback $\sigma_*$ is the inverse transform. 61 62 $ Covariant Piola: $\sigma^*(F) = J^{-T} F \circ \phi^{-1)$ 63 $ Contravariant Piola: $\sigma^*(F) = 1/|J| J F \circ \phi^{-1)$ 64 65 Note: For details, please see Rognes, Kirby, and Logg, Efficient Assembly of Hdiv and Hrot Conforming Finite Elements, SISC, 31(6), 4130-4151, arXiv 1205.3085, 2010 66 67 Level: advanced 68 69 .seealso: PetscDualSpaceGetDeRahm() 70 M*/ 71 typedef enum {IDENTITY_TRANSFORM, COVARIANT_PIOLA_TRANSFORM, CONTRAVARIANT_PIOLA_TRANSFORM} PetscDualSpaceTransformType; 72 73 /*S 74 PetscFE - PETSc object that manages a finite element space, e.g. the P_1 Lagrange element 75 76 Level: intermediate 77 78 Concepts: finite element 79 80 .seealso: PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate(), PetscFESetType(), PetscFEType 81 S*/ 82 typedef struct _p_PetscFE *PetscFE; 83 84 /*MC 85 PetscFEJacobianType - indicates which pointwise functions should be used to fill the Jacobian matrix 86 87 Level: intermediate 88 89 .seealso: PetscFEIntegrateJacobian() 90 M*/ 91 typedef enum { PETSCFE_JACOBIAN, PETSCFE_JACOBIAN_PRE, PETSCFE_JACOBIAN_DYN } PetscFEJacobianType; 92 93 #endif 94