xref: /petsc/include/petscfvtypes.h (revision ac09b9214d23ea9ad238aa607de9fa447fd4e91b)
126bd1501SBarry Smith #if !defined(PETSCFVTYPES_H)
226bd1501SBarry Smith #define PETSCFVTYPES_H
3f62f30faSMatthew G. Knepley 
4*ac09b921SBarry Smith /* SUBMANSEC = FV */
5*ac09b921SBarry Smith 
6f62f30faSMatthew G. Knepley /*S
7ab2453f0SMatthew G. Knepley   PetscLimiter - PETSc object that manages a finite volume slope limiter
8ab2453f0SMatthew G. Knepley 
988f5f89eSMatthew G. Knepley   Level: beginner
10ab2453f0SMatthew G. Knepley 
11db781477SPatrick Sanan .seealso: `PetscLimiterCreate()`, `PetscLimiterSetType()`, `PetscLimiterType`
12ab2453f0SMatthew G. Knepley S*/
13ab2453f0SMatthew G. Knepley typedef struct _p_PetscLimiter *PetscLimiter;
14ab2453f0SMatthew G. Knepley 
15ab2453f0SMatthew G. Knepley /*S
16f62f30faSMatthew G. Knepley   PetscFV - PETSc object that manages a finite volume discretization
17f62f30faSMatthew G. Knepley 
1888f5f89eSMatthew G. Knepley   Level: beginner
19f62f30faSMatthew G. Knepley 
20db781477SPatrick Sanan .seealso: `PetscFVCreate()`, `PetscFVSetType()`, `PetscFVType`
21f62f30faSMatthew G. Knepley S*/
22f62f30faSMatthew G. Knepley typedef struct _p_PetscFV *PetscFV;
23f62f30faSMatthew G. Knepley 
24891a9168SMatthew G. Knepley /*S
25891a9168SMatthew G. Knepley   PetscFVFaceGeom - Data structure (C struct) for storing information about face geometry for a finite volume method.
26891a9168SMatthew G. Knepley 
27891a9168SMatthew G. Knepley   Level: beginner
28891a9168SMatthew G. Knepley 
29891a9168SMatthew G. Knepley   Note: The components are
30891a9168SMatthew G. Knepley $  PetscReal   normal[3]   - Area-scaled normals
31891a9168SMatthew G. Knepley $  PetscReal   centroid[3] - Location of centroid (quadrature point)
32891a9168SMatthew G. Knepley $  PetscScalar grad[2][3]  - Face contribution to gradient in left and right cell
33891a9168SMatthew G. Knepley 
34db781477SPatrick Sanan .seealso: `DMPlexComputeGeometryFVM()`
35891a9168SMatthew G. Knepley S*/
36523f37fcSMatthew G. Knepley typedef struct {
37523f37fcSMatthew G. Knepley   PetscReal   normal[3];   /* Area-scaled normals */
38523f37fcSMatthew G. Knepley   PetscReal   centroid[3]; /* Location of centroid (quadrature point) */
39523f37fcSMatthew G. Knepley   PetscScalar grad[2][3];  /* Face contribution to gradient in left and right cell */
40523f37fcSMatthew G. Knepley } PetscFVFaceGeom;
41523f37fcSMatthew G. Knepley 
42891a9168SMatthew G. Knepley /*S
43891a9168SMatthew G. Knepley   PetscFVCellGeom - Data structure (C struct) for storing information about cell geometry for a finite volume method.
44891a9168SMatthew G. Knepley 
45891a9168SMatthew G. Knepley   Level: beginner
46891a9168SMatthew G. Knepley 
47891a9168SMatthew G. Knepley   Note: The components are
48891a9168SMatthew G. Knepley $  PetscReal   centroid[3] - The cell centroid
49891a9168SMatthew G. Knepley $  PetscReal   volume      - The cell volume
50891a9168SMatthew G. Knepley 
51db781477SPatrick Sanan .seealso: `DMPlexComputeGeometryFVM()`
52891a9168SMatthew G. Knepley S*/
53523f37fcSMatthew G. Knepley typedef struct {
54523f37fcSMatthew G. Knepley   PetscReal centroid[3];
55523f37fcSMatthew G. Knepley   PetscReal volume;
56523f37fcSMatthew G. Knepley } PetscFVCellGeom;
57523f37fcSMatthew G. Knepley 
58f62f30faSMatthew G. Knepley #endif
59