xref: /petsc/include/petscdstypes.h (revision 06ad157546d036f7e09b18c4984a823580aab6f1)
126bd1501SBarry Smith #if !defined(PETSCDSTYPES_H)
226bd1501SBarry Smith #define PETSCDSTYPES_H
32764a2aaSMatthew G. Knepley 
46528b96dSMatthew G. Knepley #include <petscdmlabel.h>
56528b96dSMatthew G. Knepley 
62764a2aaSMatthew G. Knepley /*S
76528b96dSMatthew G. Knepley   PetscDS - PETSc object that manages a discrete system, which is a set of discretizations + continuum equations from a PetscWeakForm
82764a2aaSMatthew G. Knepley 
92764a2aaSMatthew G. Knepley   Level: intermediate
102764a2aaSMatthew G. Knepley 
116528b96dSMatthew G. Knepley .seealso: PetscDSCreate(), PetscDSSetType(), PetscDSType, PetscWeakForm, PetscFECreate(), PetscFVCreate()
122764a2aaSMatthew G. Knepley S*/
132764a2aaSMatthew G. Knepley typedef struct _p_PetscDS *PetscDS;
142764a2aaSMatthew G. Knepley 
156528b96dSMatthew G. Knepley /*S
166528b96dSMatthew G. Knepley   PetscWeakForm - PETSc object that manages a sets of pointwise functions defining a system of equations
176528b96dSMatthew G. Knepley 
186528b96dSMatthew G. Knepley   Level: intermediate
196528b96dSMatthew G. Knepley 
206528b96dSMatthew G. Knepley .seealso: PetscWeakFormCreate(), PetscDS, PetscFECreate(), PetscFVCreate()
216528b96dSMatthew G. Knepley S*/
226528b96dSMatthew G. Knepley typedef struct _p_PetscWeakForm *PetscWeakForm;
236528b96dSMatthew G. Knepley 
24*06ad1575SMatthew G. Knepley /*S
25*06ad1575SMatthew G. Knepley   PetscFormKey - This key indicates how to use a set of pointwise functions defining part of a system of equations
26*06ad1575SMatthew G. Knepley 
27*06ad1575SMatthew G. Knepley   The subdomain on which to integrate is specificed by (label, value), the test function field by (field), and the
28*06ad1575SMatthew G. Knepley   piece of the equation by (part). For example, LHS = 0 and RHS = 1 in IMEX methods. More pieces can be present for
29*06ad1575SMatthew G. Knepley   operator splitting methods.
30*06ad1575SMatthew G. Knepley 
31*06ad1575SMatthew G. Knepley   Level: intermediate
32*06ad1575SMatthew G. Knepley 
33*06ad1575SMatthew G. Knepley .seealso: DMPlexSNESComputeResidualFEM(), DMPlexSNESComputeJacobianFEM(), DMPlexSNESComputeBoundaryFEM()
34*06ad1575SMatthew G. Knepley S*/
35*06ad1575SMatthew G. Knepley typedef struct _PetscFormKey
366528b96dSMatthew G. Knepley {
37*06ad1575SMatthew G. Knepley   DMLabel  label; /* The (label, value) select a subdomain */
386528b96dSMatthew G. Knepley   PetscInt value;
39*06ad1575SMatthew G. Knepley   PetscInt field; /* Selects the field for the test function */
40*06ad1575SMatthew G. Knepley   PetscInt part;  /* Selects the equation part. For example, LHS = 0 and RHS = 1 in IMEX methods. More pieces can be present for operator splitting methods. */
41*06ad1575SMatthew G. Knepley } PetscFormKey;
42*06ad1575SMatthew G. Knepley 
43*06ad1575SMatthew G. Knepley /*E
44*06ad1575SMatthew G. Knepley   PetscWeakFormKind - The kind of weak form. The specific forms are given in the documentation for the integraton functions.
45*06ad1575SMatthew G. Knepley 
46*06ad1575SMatthew G. Knepley   Supported kinds include:
47*06ad1575SMatthew G. Knepley $ OBJECTIVE                  - Objective form
48*06ad1575SMatthew G. Knepley $ F0, F1                     - Residual forms
49*06ad1575SMatthew G. Knepley $ G0, G1, G2, G3             - Jacobian forms
50*06ad1575SMatthew G. Knepley $ GP0, GP1, GP2, GP3         - Jacobian preconditioner matrix forms
51*06ad1575SMatthew G. Knepley $ GT0, GT1, GT2, GT3         - Dynamic Jacobian matrix forms
52*06ad1575SMatthew G. Knepley $ BDF0, BDF1                 - Boundary Residual forms
53*06ad1575SMatthew G. Knepley $ BDG0, BDG1, BDG2, BDG3     - Jacobian forms
54*06ad1575SMatthew G. Knepley $ BDGP0, BDGP1, BDGP2, BDGP3 - Jacobian preconditioner matrix forms
55*06ad1575SMatthew G. Knepley $ R                          - Riemann solver
56*06ad1575SMatthew G. Knepley 
57*06ad1575SMatthew G. Knepley   Level: beginner
58*06ad1575SMatthew G. Knepley 
59*06ad1575SMatthew G. Knepley .seealso: PetscFEIntegrateResidual(), PetscFEIntegrateJacobian(), PetscFEIntegrateBdResidual(), PetscFEIntegrateBdJacobian(), PetscFVIntegrateRHSFunction(), PetscWeakFormSetIndexResidual(), PetscWeakFormClearIndex()
60*06ad1575SMatthew G. Knepley E*/
61*06ad1575SMatthew G. Knepley typedef enum {PETSC_WF_OBJECTIVE, PETSC_WF_F0, PETSC_WF_F1, PETSC_WF_G0, PETSC_WF_G1, PETSC_WF_G2, PETSC_WF_G3, PETSC_WF_GP0, PETSC_WF_GP1, PETSC_WF_GP2, PETSC_WF_GP3, PETSC_WF_GT0, PETSC_WF_GT1, PETSC_WF_GT2, PETSC_WF_GT3, PETSC_WF_BDF0, PETSC_WF_BDF1, PETSC_WF_BDG0, PETSC_WF_BDG1, PETSC_WF_BDG2, PETSC_WF_BDG3, PETSC_WF_BDGP0, PETSC_WF_BDGP1, PETSC_WF_BDGP2, PETSC_WF_BDGP3, PETSC_WF_R, PETSC_NUM_WF} PetscWeakFormKind;
62*06ad1575SMatthew G. Knepley PETSC_EXTERN const char *const PetscWeakFormKinds[];
636528b96dSMatthew G. Knepley 
642764a2aaSMatthew G. Knepley #endif
65