xref: /petsc/include/petscfvtypes.h (revision fe8e7ddd93caa3d7f6fe6c2e358c1c3f5a39763e)
1 #pragma once
2 
3 /* SUBMANSEC = FV */
4 
5 /*S
6   PetscLimiter - PETSc object that manages a finite volume slope limiter
7 
8   Level: beginner
9 
10 .seealso: `PetscLimiterCreate()`, `PetscLimiterSetType()`, `PetscLimiterType`
11 S*/
12 typedef struct _p_PetscLimiter *PetscLimiter;
13 
14 /*S
15   PetscFV - PETSc object that manages a finite volume discretization
16 
17   Level: beginner
18 
19 .seealso: `PetscFVCreate()`, `PetscFVSetType()`, `PetscFVType`
20 S*/
21 typedef struct _p_PetscFV *PetscFV;
22 
23 /*S
24   PetscFVFaceGeom - Data structure (C struct) for storing information about face geometry for a finite volume method.
25 
26   Level: beginner
27 
28   Note:
29   The components are
30 .vb
31   PetscReal   normal[3]   - Area-scaled normals
32   PetscReal   centroid[3] - Location of centroid (quadrature point)
33   PetscScalar grad[2][3]  - Face contribution to gradient in left and right cell
34 .ve
35 
36 .seealso: `PetscFVCellGeom`, `DMPlexComputeGeometryFVM()`
37 S*/
38 typedef struct {
39   PetscReal   normal[3];   /* Area-scaled normals */
40   PetscReal   centroid[3]; /* Location of centroid (quadrature point) */
41   PetscScalar grad[2][3];  /* Face contribution to gradient in left and right cell */
42 } PetscFVFaceGeom;
43 
44 /*S
45   PetscFVCellGeom - Data structure (C struct) for storing information about cell geometry for a finite volume method.
46 
47   Level: beginner
48 
49   Note: The components are
50 .vb
51    PetscReal   centroid[3] - The cell centroid
52    PetscReal   volume      - The cell volume
53 .ve
54 
55 .seealso: `PetscFVFaceGeom`, `DMPlexComputeGeometryFVM()`
56 S*/
57 typedef struct {
58   PetscReal centroid[3];
59   PetscReal volume;
60 } PetscFVCellGeom;
61