126bd1501SBarry Smith #if !defined(PETSCFETYPES_H) 226bd1501SBarry Smith #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 729b5c115SMatthew G. Knepley Level: beginner 8dbe77d9eSMatthew G. Knepley 9dbe77d9eSMatthew G. Knepley .seealso: PetscSpaceCreate(), PetscDualSpaceCreate(), PetscSpaceSetType(), PetscSpaceType 10dbe77d9eSMatthew G. Knepley S*/ 11dbe77d9eSMatthew G. Knepley typedef struct _p_PetscSpace *PetscSpace; 12dbe77d9eSMatthew G. Knepley 133596293dSMatthew G. Knepley /*MC 143596293dSMatthew G. Knepley PetscSpacePolynomialType - The type of polynomial space 153596293dSMatthew G. Knepley 163596293dSMatthew G. Knepley Notes: 173596293dSMatthew G. Knepley $ PETSCSPACE_POLYNOMIALTYPE_P - This is the normal polynomial space of degree q, P_q or Q_q. 183596293dSMatthew 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: 193596293dSMatthew G. Knepley $ P^-_q = P_{q-1} + P_{(q-1)} x 203596293dSMatthew G. Knepley $ where P_{(q-1)} is the space of homogeneous polynomials of degree q-1. 213596293dSMatthew 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: 223596293dSMatthew G. Knepley $ P^-_q = P_{q-1} + P_{(q-1)} rot x 233596293dSMatthew 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. 243596293dSMatthew G. Knepley 2529b5c115SMatthew G. Knepley Level: beginner 263596293dSMatthew G. Knepley 273596293dSMatthew G. Knepley .seealso: PetscSpace 283596293dSMatthew G. Knepley M*/ 293596293dSMatthew G. Knepley typedef enum { PETSCSPACE_POLYNOMIALTYPE_P, PETSCSPACE_POLYNOMIALTYPE_PMINUS_HDIV, PETSCSPACE_POLYNOMIALTYPE_PMINUS_HCURL } PetscSpacePolynomialType; 303596293dSMatthew G. Knepley PETSC_EXTERN const char * const PetscSpacePolynomialTypes[]; 313596293dSMatthew G. Knepley 32dbe77d9eSMatthew G. Knepley /*S 33dbe77d9eSMatthew 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 34dbe77d9eSMatthew G. Knepley 35*a4ce7ad1SMatthew G. Knepley Level: beginner 36dbe77d9eSMatthew G. Knepley 37dbe77d9eSMatthew G. Knepley .seealso: PetscDualSpaceCreate(), PetscSpaceCreate(), PetscDualSpaceSetType(), PetscDualSpaceType 38dbe77d9eSMatthew G. Knepley S*/ 39dbe77d9eSMatthew G. Knepley typedef struct _p_PetscDualSpace *PetscDualSpace; 40dbe77d9eSMatthew G. Knepley 4155cc6565SMatthew G. Knepley /*MC 4255cc6565SMatthew G. Knepley PetscDualSpaceReferenceCell - The type of reference cell 4355cc6565SMatthew G. Knepley 4455cc6565SMatthew G. Knepley Notes: This is used only for automatic creation of reference cells. A PetscDualSpace can accept an arbitary DM for a reference cell. 4555cc6565SMatthew G. Knepley 46*a4ce7ad1SMatthew G. Knepley Level: beginner 4755cc6565SMatthew G. Knepley 4855cc6565SMatthew G. Knepley .seealso: PetscSpace 4955cc6565SMatthew G. Knepley M*/ 5055cc6565SMatthew G. Knepley typedef enum { PETSCDUALSPACE_REFCELL_SIMPLEX, PETSCDUALSPACE_REFCELL_TENSOR } PetscDualSpaceReferenceCell; 5155cc6565SMatthew G. Knepley PETSC_EXTERN const char * const PetscDualSpaceReferenceCells[]; 5255cc6565SMatthew G. Knepley 534bee2e38SMatthew G. Knepley /*MC 544bee2e38SMatthew G. Knepley PetscDualSpaceTransformType - The type of function transform 554bee2e38SMatthew G. Knepley 564bee2e38SMatthew 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. 574bee2e38SMatthew G. Knepley 584bee2e38SMatthew G. Knepley $ Covariant Piola: $\sigma^*(F) = J^{-T} F \circ \phi^{-1)$ 594bee2e38SMatthew G. Knepley $ Contravariant Piola: $\sigma^*(F) = 1/|J| J F \circ \phi^{-1)$ 604bee2e38SMatthew G. Knepley 614bee2e38SMatthew 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 624bee2e38SMatthew G. Knepley 63*a4ce7ad1SMatthew G. Knepley Level: beginner 644bee2e38SMatthew G. Knepley 654bee2e38SMatthew G. Knepley .seealso: PetscDualSpaceGetDeRahm() 664bee2e38SMatthew G. Knepley M*/ 674bee2e38SMatthew G. Knepley typedef enum {IDENTITY_TRANSFORM, COVARIANT_PIOLA_TRANSFORM, CONTRAVARIANT_PIOLA_TRANSFORM} PetscDualSpaceTransformType; 684bee2e38SMatthew G. Knepley 69dbe77d9eSMatthew G. Knepley /*S 70dbe77d9eSMatthew G. Knepley PetscFE - PETSc object that manages a finite element space, e.g. the P_1 Lagrange element 71dbe77d9eSMatthew G. Knepley 72*a4ce7ad1SMatthew G. Knepley Level: beginner 73dbe77d9eSMatthew G. Knepley 74dbe77d9eSMatthew G. Knepley .seealso: PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate(), PetscFESetType(), PetscFEType 75dbe77d9eSMatthew G. Knepley S*/ 76dbe77d9eSMatthew G. Knepley typedef struct _p_PetscFE *PetscFE; 77dbe77d9eSMatthew G. Knepley 78b7e05686SMatthew G. Knepley /*MC 799c3cf19fSMatthew G. Knepley PetscFEJacobianType - indicates which pointwise functions should be used to fill the Jacobian matrix 80b7e05686SMatthew G. Knepley 81*a4ce7ad1SMatthew G. Knepley Level: beginner 82b7e05686SMatthew G. Knepley 83b7e05686SMatthew G. Knepley .seealso: PetscFEIntegrateJacobian() 84b7e05686SMatthew G. Knepley M*/ 85b7e05686SMatthew G. Knepley typedef enum { PETSCFE_JACOBIAN, PETSCFE_JACOBIAN_PRE, PETSCFE_JACOBIAN_DYN } PetscFEJacobianType; 86b7e05686SMatthew G. Knepley 87dbe77d9eSMatthew G. Knepley #endif 88