xref: /petsc/include/petscfvtypes.h (revision a496304597bacff3545e802853d69e8765312868)
1*a4963045SJacob Faibussowitsch #pragma once
2f62f30faSMatthew G. Knepley 
3ac09b921SBarry Smith /* SUBMANSEC = FV */
4ac09b921SBarry Smith 
5f62f30faSMatthew G. Knepley /*S
6ab2453f0SMatthew G. Knepley   PetscLimiter - PETSc object that manages a finite volume slope limiter
7ab2453f0SMatthew G. Knepley 
888f5f89eSMatthew G. Knepley   Level: beginner
9ab2453f0SMatthew G. Knepley 
10db781477SPatrick Sanan .seealso: `PetscLimiterCreate()`, `PetscLimiterSetType()`, `PetscLimiterType`
11ab2453f0SMatthew G. Knepley S*/
12ab2453f0SMatthew G. Knepley typedef struct _p_PetscLimiter *PetscLimiter;
13ab2453f0SMatthew G. Knepley 
14ab2453f0SMatthew G. Knepley /*S
15f62f30faSMatthew G. Knepley   PetscFV - PETSc object that manages a finite volume discretization
16f62f30faSMatthew G. Knepley 
1788f5f89eSMatthew G. Knepley   Level: beginner
18f62f30faSMatthew G. Knepley 
19db781477SPatrick Sanan .seealso: `PetscFVCreate()`, `PetscFVSetType()`, `PetscFVType`
20f62f30faSMatthew G. Knepley S*/
21f62f30faSMatthew G. Knepley typedef struct _p_PetscFV *PetscFV;
22f62f30faSMatthew G. Knepley 
23891a9168SMatthew G. Knepley /*S
24891a9168SMatthew G. Knepley   PetscFVFaceGeom - Data structure (C struct) for storing information about face geometry for a finite volume method.
25891a9168SMatthew G. Knepley 
26891a9168SMatthew G. Knepley   Level: beginner
27891a9168SMatthew G. Knepley 
2816a05f60SBarry Smith   Note:
2916a05f60SBarry Smith   The components are
3016a05f60SBarry Smith .vb
3116a05f60SBarry Smith   PetscReal   normal[3]   - Area-scaled normals
3216a05f60SBarry Smith   PetscReal   centroid[3] - Location of centroid (quadrature point)
3316a05f60SBarry Smith   PetscScalar grad[2][3]  - Face contribution to gradient in left and right cell
3416a05f60SBarry Smith .ve
35891a9168SMatthew G. Knepley 
3616a05f60SBarry Smith .seealso: `PetscFVCellGeom`, `DMPlexComputeGeometryFVM()`
37891a9168SMatthew G. Knepley S*/
38523f37fcSMatthew G. Knepley typedef struct {
39523f37fcSMatthew G. Knepley   PetscReal   normal[3];   /* Area-scaled normals */
40523f37fcSMatthew G. Knepley   PetscReal   centroid[3]; /* Location of centroid (quadrature point) */
41523f37fcSMatthew G. Knepley   PetscScalar grad[2][3];  /* Face contribution to gradient in left and right cell */
42523f37fcSMatthew G. Knepley } PetscFVFaceGeom;
43523f37fcSMatthew G. Knepley 
44891a9168SMatthew G. Knepley /*S
45891a9168SMatthew G. Knepley   PetscFVCellGeom - Data structure (C struct) for storing information about cell geometry for a finite volume method.
46891a9168SMatthew G. Knepley 
47891a9168SMatthew G. Knepley   Level: beginner
48891a9168SMatthew G. Knepley 
49891a9168SMatthew G. Knepley   Note: The components are
5016a05f60SBarry Smith .vb
5116a05f60SBarry Smith    PetscReal   centroid[3] - The cell centroid
5216a05f60SBarry Smith    PetscReal   volume      - The cell volume
5316a05f60SBarry Smith .ve
54891a9168SMatthew G. Knepley 
5516a05f60SBarry Smith .seealso: `PetscFVFaceGeom`, `DMPlexComputeGeometryFVM()`
56891a9168SMatthew G. Knepley S*/
57523f37fcSMatthew G. Knepley typedef struct {
58523f37fcSMatthew G. Knepley   PetscReal centroid[3];
59523f37fcSMatthew G. Knepley   PetscReal volume;
60523f37fcSMatthew G. Knepley } PetscFVCellGeom;
61