1*a4963045SJacob 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 34db781477SPatrick Sanan .seealso: `DMPlexSNESComputeResidualFEM()`, `DMPlexSNESComputeJacobianFEM()`, `DMPlexSNESComputeBoundaryFEM()` 3506ad1575SMatthew G. Knepley S*/ 369371c9d4SSatish Balay typedef struct _PetscFormKey { 3706ad1575SMatthew G. Knepley DMLabel label; /* The (label, value) select a subdomain */ 386528b96dSMatthew G. Knepley PetscInt value; 3906ad1575SMatthew G. Knepley PetscInt field; /* Selects the field for the test function */ 4006ad1575SMatthew 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. */ 4106ad1575SMatthew G. Knepley } PetscFormKey; 4206ad1575SMatthew G. Knepley 4306ad1575SMatthew G. Knepley /*E 4406ad1575SMatthew G. Knepley PetscWeakFormKind - The kind of weak form. The specific forms are given in the documentation for the integraton functions. 4506ad1575SMatthew G. Knepley 4616a05f60SBarry Smith Values: 4716a05f60SBarry Smith + OBJECTIVE - Objective form 4816a05f60SBarry Smith . F0, F1 - Residual forms 4916a05f60SBarry Smith . G0, G1, G2, G3 - Jacobian forms 5016a05f60SBarry Smith . GP0, GP1, GP2, GP3 - Jacobian preconditioner matrix forms 5116a05f60SBarry Smith . GT0, GT1, GT2, GT3 - Dynamic Jacobian matrix forms 5216a05f60SBarry Smith . BDF0, BDF1 - Boundary Residual forms 5316a05f60SBarry Smith . BDG0, BDG1, BDG2, BDG3 - Jacobian forms 5416a05f60SBarry Smith . BDGP0, BDGP1, BDGP2, BDGP3 - Jacobian preconditioner matrix forms 5516a05f60SBarry Smith - R - Riemann solver 5606ad1575SMatthew G. Knepley 5706ad1575SMatthew G. Knepley Level: beginner 5806ad1575SMatthew G. Knepley 5916a05f60SBarry Smith .seealso: `PetscWeakForm`, `PetscFEIntegrateResidual()`, `PetscFEIntegrateJacobian()`, `PetscFEIntegrateBdResidual()`, `PetscFEIntegrateBdJacobian()`, 6016a05f60SBarry Smith `PetscFVIntegrateRHSFunction()`, `PetscWeakFormSetIndexResidual()`, `PetscWeakFormClearIndex()` 6106ad1575SMatthew G. Knepley E*/ 629371c9d4SSatish Balay typedef enum { 639371c9d4SSatish Balay PETSC_WF_OBJECTIVE, 649371c9d4SSatish Balay PETSC_WF_F0, 659371c9d4SSatish Balay PETSC_WF_F1, 669371c9d4SSatish Balay PETSC_WF_G0, 679371c9d4SSatish Balay PETSC_WF_G1, 689371c9d4SSatish Balay PETSC_WF_G2, 699371c9d4SSatish Balay PETSC_WF_G3, 709371c9d4SSatish Balay PETSC_WF_GP0, 719371c9d4SSatish Balay PETSC_WF_GP1, 729371c9d4SSatish Balay PETSC_WF_GP2, 739371c9d4SSatish Balay PETSC_WF_GP3, 749371c9d4SSatish Balay PETSC_WF_GT0, 759371c9d4SSatish Balay PETSC_WF_GT1, 769371c9d4SSatish Balay PETSC_WF_GT2, 779371c9d4SSatish Balay PETSC_WF_GT3, 789371c9d4SSatish Balay PETSC_WF_BDF0, 799371c9d4SSatish Balay PETSC_WF_BDF1, 809371c9d4SSatish Balay PETSC_WF_BDG0, 819371c9d4SSatish Balay PETSC_WF_BDG1, 829371c9d4SSatish Balay PETSC_WF_BDG2, 839371c9d4SSatish Balay PETSC_WF_BDG3, 849371c9d4SSatish Balay PETSC_WF_BDGP0, 859371c9d4SSatish Balay PETSC_WF_BDGP1, 869371c9d4SSatish Balay PETSC_WF_BDGP2, 879371c9d4SSatish Balay PETSC_WF_BDGP3, 889371c9d4SSatish Balay PETSC_WF_R, 899371c9d4SSatish Balay PETSC_NUM_WF 909371c9d4SSatish Balay } PetscWeakFormKind; 9106ad1575SMatthew G. Knepley PETSC_EXTERN const char *const PetscWeakFormKinds[]; 92