xref: /petsc/include/petscdstypes.h (revision 5d83a8b16d06840f96948f1a43aa9c83c769a60a)
1a4963045SJacob Faibussowitsch #pragma once
22764a2aaSMatthew G. Knepley 
36528b96dSMatthew G. Knepley #include <petscdmlabel.h>
46528b96dSMatthew G. Knepley 
5ac09b921SBarry Smith /* SUBMANSEC = DT */
6ac09b921SBarry Smith 
72764a2aaSMatthew G. Knepley /*S
887497f52SBarry Smith   PetscDS - PETSc object that manages a discrete system, which is a set of discretizations + continuum equations from a `PetscWeakForm`
92764a2aaSMatthew G. Knepley 
102764a2aaSMatthew G. Knepley   Level: intermediate
112764a2aaSMatthew G. Knepley 
12db781477SPatrick Sanan .seealso: `PetscDSCreate()`, `PetscDSSetType()`, `PetscDSType`, `PetscWeakForm`, `PetscFECreate()`, `PetscFVCreate()`
132764a2aaSMatthew G. Knepley S*/
142764a2aaSMatthew G. Knepley typedef struct _p_PetscDS *PetscDS;
152764a2aaSMatthew G. Knepley 
166528b96dSMatthew G. Knepley /*S
176528b96dSMatthew G. Knepley   PetscWeakForm - PETSc object that manages a sets of pointwise functions defining a system of equations
186528b96dSMatthew G. Knepley 
196528b96dSMatthew G. Knepley   Level: intermediate
206528b96dSMatthew G. Knepley 
21db781477SPatrick Sanan .seealso: `PetscWeakFormCreate()`, `PetscDS`, `PetscFECreate()`, `PetscFVCreate()`
226528b96dSMatthew G. Knepley S*/
236528b96dSMatthew G. Knepley typedef struct _p_PetscWeakForm *PetscWeakForm;
246528b96dSMatthew G. Knepley 
2506ad1575SMatthew G. Knepley /*S
2606ad1575SMatthew G. Knepley   PetscFormKey - This key indicates how to use a set of pointwise functions defining part of a system of equations
2706ad1575SMatthew G. Knepley 
28a5b23f4aSJose E. Roman   The subdomain on which to integrate is specified by (label, value), the test function field by (field), and the
2906ad1575SMatthew G. Knepley   piece of the equation by (part). For example, LHS = 0 and RHS = 1 in IMEX methods. More pieces can be present for
3006ad1575SMatthew G. Knepley   operator splitting methods.
3106ad1575SMatthew G. Knepley 
3206ad1575SMatthew G. Knepley   Level: intermediate
3306ad1575SMatthew G. Knepley 
34*5d83a8b1SBarry Smith   Note:
35*5d83a8b1SBarry Smith   This is a struct, not a `PetscObject`
36*5d83a8b1SBarry Smith 
37db781477SPatrick Sanan .seealso: `DMPlexSNESComputeResidualFEM()`, `DMPlexSNESComputeJacobianFEM()`, `DMPlexSNESComputeBoundaryFEM()`
3806ad1575SMatthew G. Knepley S*/
399371c9d4SSatish Balay typedef struct _PetscFormKey {
4006ad1575SMatthew G. Knepley   DMLabel  label; /* The (label, value) select a subdomain */
416528b96dSMatthew G. Knepley   PetscInt value;
4206ad1575SMatthew G. Knepley   PetscInt field; /* Selects the field for the test function */
4306ad1575SMatthew 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. */
4406ad1575SMatthew G. Knepley } PetscFormKey;
4506ad1575SMatthew G. Knepley 
4606ad1575SMatthew G. Knepley /*E
4706ad1575SMatthew G. Knepley   PetscWeakFormKind - The kind of weak form. The specific forms are given in the documentation for the integraton functions.
4806ad1575SMatthew G. Knepley 
4916a05f60SBarry Smith   Values:
5016a05f60SBarry Smith + OBJECTIVE                  - Objective form
5116a05f60SBarry Smith . F0, F1                     - Residual forms
5216a05f60SBarry Smith . G0, G1, G2, G3             - Jacobian forms
5316a05f60SBarry Smith . GP0, GP1, GP2, GP3         - Jacobian preconditioner matrix forms
5416a05f60SBarry Smith . GT0, GT1, GT2, GT3         - Dynamic Jacobian matrix forms
5516a05f60SBarry Smith . BDF0, BDF1                 - Boundary Residual forms
5616a05f60SBarry Smith . BDG0, BDG1, BDG2, BDG3     - Jacobian forms
5716a05f60SBarry Smith . BDGP0, BDGP1, BDGP2, BDGP3 - Jacobian preconditioner matrix forms
58d2b2dc1eSMatthew G. Knepley . R                          - Riemann solver
59d2b2dc1eSMatthew G. Knepley - CEED                       - libCEED QFunction
6006ad1575SMatthew G. Knepley 
6106ad1575SMatthew G. Knepley   Level: beginner
6206ad1575SMatthew G. Knepley 
6316a05f60SBarry Smith .seealso: `PetscWeakForm`, `PetscFEIntegrateResidual()`, `PetscFEIntegrateJacobian()`, `PetscFEIntegrateBdResidual()`, `PetscFEIntegrateBdJacobian()`,
6416a05f60SBarry Smith           `PetscFVIntegrateRHSFunction()`, `PetscWeakFormSetIndexResidual()`, `PetscWeakFormClearIndex()`
6506ad1575SMatthew G. Knepley E*/
669371c9d4SSatish Balay typedef enum {
679371c9d4SSatish Balay   PETSC_WF_OBJECTIVE,
689371c9d4SSatish Balay   PETSC_WF_F0,
699371c9d4SSatish Balay   PETSC_WF_F1,
709371c9d4SSatish Balay   PETSC_WF_G0,
719371c9d4SSatish Balay   PETSC_WF_G1,
729371c9d4SSatish Balay   PETSC_WF_G2,
739371c9d4SSatish Balay   PETSC_WF_G3,
749371c9d4SSatish Balay   PETSC_WF_GP0,
759371c9d4SSatish Balay   PETSC_WF_GP1,
769371c9d4SSatish Balay   PETSC_WF_GP2,
779371c9d4SSatish Balay   PETSC_WF_GP3,
789371c9d4SSatish Balay   PETSC_WF_GT0,
799371c9d4SSatish Balay   PETSC_WF_GT1,
809371c9d4SSatish Balay   PETSC_WF_GT2,
819371c9d4SSatish Balay   PETSC_WF_GT3,
829371c9d4SSatish Balay   PETSC_WF_BDF0,
839371c9d4SSatish Balay   PETSC_WF_BDF1,
849371c9d4SSatish Balay   PETSC_WF_BDG0,
859371c9d4SSatish Balay   PETSC_WF_BDG1,
869371c9d4SSatish Balay   PETSC_WF_BDG2,
879371c9d4SSatish Balay   PETSC_WF_BDG3,
889371c9d4SSatish Balay   PETSC_WF_BDGP0,
899371c9d4SSatish Balay   PETSC_WF_BDGP1,
909371c9d4SSatish Balay   PETSC_WF_BDGP2,
919371c9d4SSatish Balay   PETSC_WF_BDGP3,
929371c9d4SSatish Balay   PETSC_WF_R,
93d2b2dc1eSMatthew G. Knepley   PETSC_WF_CEED,
949371c9d4SSatish Balay   PETSC_NUM_WF
959371c9d4SSatish Balay } PetscWeakFormKind;
9606ad1575SMatthew G. Knepley PETSC_EXTERN const char *const PetscWeakFormKinds[];
97