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