xref: /petsc/include/petscfetypes.h (revision 0aec8e07ff6e51593a6e043bab7c61c22e0e2484)
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 /*S
46   PetscFE - PETSc object that manages a finite element space, e.g. the P_1 Lagrange element
47 
48   Level: intermediate
49 
50   Concepts: finite element
51 
52 .seealso: PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate(), PetscFESetType(), PetscFEType
53 S*/
54 typedef struct _p_PetscFE *PetscFE;
55 
56 /*MC
57   PetscFEJacobianType - indicates which pointwise functions should be used to fill the Jacobian matrix
58 
59   Level: intermediate
60 
61 .seealso: PetscFEIntegrateJacobian()
62 M*/
63 typedef enum { PETSCFE_JACOBIAN, PETSCFE_JACOBIAN_PRE, PETSCFE_JACOBIAN_DYN } PetscFEJacobianType;
64 
65 #endif
66