xref: /petsc/include/petscfvtypes.h (revision 16a05f60a523f53ab316acaac9f77b7425611adc)
16524c165SJacob Faibussowitsch #ifndef PETSCFVTYPES_H
226bd1501SBarry Smith #define PETSCFVTYPES_H
3f62f30faSMatthew G. Knepley 
4ac09b921SBarry Smith /* SUBMANSEC = FV */
5ac09b921SBarry 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 
29*16a05f60SBarry Smith   Note:
30*16a05f60SBarry Smith   The components are
31*16a05f60SBarry Smith .vb
32*16a05f60SBarry Smith   PetscReal   normal[3]   - Area-scaled normals
33*16a05f60SBarry Smith   PetscReal   centroid[3] - Location of centroid (quadrature point)
34*16a05f60SBarry Smith   PetscScalar grad[2][3]  - Face contribution to gradient in left and right cell
35*16a05f60SBarry Smith .ve
36891a9168SMatthew G. Knepley 
37*16a05f60SBarry Smith .seealso: `PetscFVCellGeom`, `DMPlexComputeGeometryFVM()`
38891a9168SMatthew G. Knepley S*/
39523f37fcSMatthew G. Knepley typedef struct {
40523f37fcSMatthew G. Knepley   PetscReal   normal[3];   /* Area-scaled normals */
41523f37fcSMatthew G. Knepley   PetscReal   centroid[3]; /* Location of centroid (quadrature point) */
42523f37fcSMatthew G. Knepley   PetscScalar grad[2][3];  /* Face contribution to gradient in left and right cell */
43523f37fcSMatthew G. Knepley } PetscFVFaceGeom;
44523f37fcSMatthew G. Knepley 
45891a9168SMatthew G. Knepley /*S
46891a9168SMatthew G. Knepley   PetscFVCellGeom - Data structure (C struct) for storing information about cell geometry for a finite volume method.
47891a9168SMatthew G. Knepley 
48891a9168SMatthew G. Knepley   Level: beginner
49891a9168SMatthew G. Knepley 
50891a9168SMatthew G. Knepley   Note: The components are
51*16a05f60SBarry Smith .vb
52*16a05f60SBarry Smith    PetscReal   centroid[3] - The cell centroid
53*16a05f60SBarry Smith    PetscReal   volume      - The cell volume
54*16a05f60SBarry Smith .ve
55891a9168SMatthew G. Knepley 
56*16a05f60SBarry Smith .seealso: `PetscFVFaceGeom`, `DMPlexComputeGeometryFVM()`
57891a9168SMatthew G. Knepley S*/
58523f37fcSMatthew G. Knepley typedef struct {
59523f37fcSMatthew G. Knepley   PetscReal centroid[3];
60523f37fcSMatthew G. Knepley   PetscReal volume;
61523f37fcSMatthew G. Knepley } PetscFVCellGeom;
62523f37fcSMatthew G. Knepley 
63f62f30faSMatthew G. Knepley #endif
64