1dbe77d9eSMatthew G. Knepley #if !defined(_PETSCFETYPES_H) 2dbe77d9eSMatthew G. Knepley #define _PETSCFETYPES_H 3dbe77d9eSMatthew G. Knepley 4dbe77d9eSMatthew G. Knepley /*S 5dbe77d9eSMatthew G. Knepley PetscSpace - PETSc object that manages a linear space, e.g. the space of d-dimensional polynomials of given degree 6dbe77d9eSMatthew G. Knepley 7dbe77d9eSMatthew G. Knepley Level: intermediate 8dbe77d9eSMatthew G. Knepley 9dbe77d9eSMatthew G. Knepley Concepts: finite element 10dbe77d9eSMatthew G. Knepley 11dbe77d9eSMatthew G. Knepley .seealso: PetscSpaceCreate(), PetscDualSpaceCreate(), PetscSpaceSetType(), PetscSpaceType 12dbe77d9eSMatthew G. Knepley S*/ 13dbe77d9eSMatthew G. Knepley typedef struct _p_PetscSpace *PetscSpace; 14dbe77d9eSMatthew G. Knepley 153596293dSMatthew G. Knepley /*MC 163596293dSMatthew G. Knepley PetscSpacePolynomialType - The type of polynomial space 173596293dSMatthew G. Knepley 183596293dSMatthew G. Knepley Notes: 193596293dSMatthew G. Knepley $ PETSCSPACE_POLYNOMIALTYPE_P - This is the normal polynomial space of degree q, P_q or Q_q. 203596293dSMatthew G. Knepley $ 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: 213596293dSMatthew G. Knepley $ P^-_q = P_{q-1} + P_{(q-1)} x 223596293dSMatthew G. Knepley $ where P_{(q-1)} is the space of homogeneous polynomials of degree q-1. 233596293dSMatthew G. Knepley $ 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: 243596293dSMatthew G. Knepley $ P^-_q = P_{q-1} + P_{(q-1)} rot x 253596293dSMatthew G. Knepley $ 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. 263596293dSMatthew G. Knepley 273596293dSMatthew G. Knepley Level: intermediate 283596293dSMatthew G. Knepley 293596293dSMatthew G. Knepley .seealso: PetscSpace 303596293dSMatthew G. Knepley M*/ 313596293dSMatthew G. Knepley typedef enum { PETSCSPACE_POLYNOMIALTYPE_P, PETSCSPACE_POLYNOMIALTYPE_PMINUS_HDIV, PETSCSPACE_POLYNOMIALTYPE_PMINUS_HCURL } PetscSpacePolynomialType; 323596293dSMatthew G. Knepley PETSC_EXTERN const char * const PetscSpacePolynomialTypes[]; 333596293dSMatthew G. Knepley 34dbe77d9eSMatthew G. Knepley /*S 35dbe77d9eSMatthew G. Knepley 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 36dbe77d9eSMatthew G. Knepley 37dbe77d9eSMatthew G. Knepley Level: intermediate 38dbe77d9eSMatthew G. Knepley 39dbe77d9eSMatthew G. Knepley Concepts: finite element 40dbe77d9eSMatthew G. Knepley 41dbe77d9eSMatthew G. Knepley .seealso: PetscDualSpaceCreate(), PetscSpaceCreate(), PetscDualSpaceSetType(), PetscDualSpaceType 42dbe77d9eSMatthew G. Knepley S*/ 43dbe77d9eSMatthew G. Knepley typedef struct _p_PetscDualSpace *PetscDualSpace; 44dbe77d9eSMatthew G. Knepley 4555cc6565SMatthew G. Knepley /*MC 4655cc6565SMatthew G. Knepley PetscDualSpaceReferenceCell - The type of reference cell 4755cc6565SMatthew G. Knepley 4855cc6565SMatthew G. Knepley Notes: This is used only for automatic creation of reference cells. A PetscDualSpace can accept an arbitary DM for a reference cell. 4955cc6565SMatthew G. Knepley 5055cc6565SMatthew G. Knepley Level: intermediate 5155cc6565SMatthew G. Knepley 5255cc6565SMatthew G. Knepley .seealso: PetscSpace 5355cc6565SMatthew G. Knepley M*/ 5455cc6565SMatthew G. Knepley typedef enum { PETSCDUALSPACE_REFCELL_SIMPLEX, PETSCDUALSPACE_REFCELL_TENSOR } PetscDualSpaceReferenceCell; 5555cc6565SMatthew G. Knepley PETSC_EXTERN const char * const PetscDualSpaceReferenceCells[]; 5655cc6565SMatthew G. Knepley 57*4bee2e38SMatthew G. Knepley /*MC 58*4bee2e38SMatthew G. Knepley PetscDualSpaceTransformType - The type of function transform 59*4bee2e38SMatthew G. Knepley 60*4bee2e38SMatthew G. Knepley 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*4bee2e38SMatthew G. Knepley 62*4bee2e38SMatthew G. Knepley $ Covariant Piola: $\sigma^*(F) = J^{-T} F \circ \phi^{-1)$ 63*4bee2e38SMatthew G. Knepley $ Contravariant Piola: $\sigma^*(F) = 1/|J| J F \circ \phi^{-1)$ 64*4bee2e38SMatthew G. Knepley 65*4bee2e38SMatthew G. Knepley 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*4bee2e38SMatthew G. Knepley 67*4bee2e38SMatthew G. Knepley Level: advanced 68*4bee2e38SMatthew G. Knepley 69*4bee2e38SMatthew G. Knepley .seealso: PetscDualSpaceGetDeRahm() 70*4bee2e38SMatthew G. Knepley M*/ 71*4bee2e38SMatthew G. Knepley typedef enum {IDENTITY_TRANSFORM, COVARIANT_PIOLA_TRANSFORM, CONTRAVARIANT_PIOLA_TRANSFORM} PetscDualSpaceTransformType; 72*4bee2e38SMatthew G. Knepley 73dbe77d9eSMatthew G. Knepley /*S 74dbe77d9eSMatthew G. Knepley PetscFE - PETSc object that manages a finite element space, e.g. the P_1 Lagrange element 75dbe77d9eSMatthew G. Knepley 76dbe77d9eSMatthew G. Knepley Level: intermediate 77dbe77d9eSMatthew G. Knepley 78dbe77d9eSMatthew G. Knepley Concepts: finite element 79dbe77d9eSMatthew G. Knepley 80dbe77d9eSMatthew G. Knepley .seealso: PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate(), PetscFESetType(), PetscFEType 81dbe77d9eSMatthew G. Knepley S*/ 82dbe77d9eSMatthew G. Knepley typedef struct _p_PetscFE *PetscFE; 83dbe77d9eSMatthew G. Knepley 84b7e05686SMatthew G. Knepley /*MC 859c3cf19fSMatthew G. Knepley PetscFEJacobianType - indicates which pointwise functions should be used to fill the Jacobian matrix 86b7e05686SMatthew G. Knepley 87b7e05686SMatthew G. Knepley Level: intermediate 88b7e05686SMatthew G. Knepley 89b7e05686SMatthew G. Knepley .seealso: PetscFEIntegrateJacobian() 90b7e05686SMatthew G. Knepley M*/ 91b7e05686SMatthew G. Knepley typedef enum { PETSCFE_JACOBIAN, PETSCFE_JACOBIAN_PRE, PETSCFE_JACOBIAN_DYN } PetscFEJacobianType; 92b7e05686SMatthew G. Knepley 93dbe77d9eSMatthew G. Knepley #endif 94