xref: /petsc/include/petscfv.h (revision ac09b9214d23ea9ad238aa607de9fa447fd4e91b)
1f62f30faSMatthew G. Knepley /*
2f62f30faSMatthew G. Knepley       Objects which encapsulate finite volume spaces and operations
3f62f30faSMatthew G. Knepley */
426bd1501SBarry Smith #if !defined(PETSCFV_H)
526bd1501SBarry Smith #define PETSCFV_H
6*ac09b921SBarry Smith 
7f62f30faSMatthew G. Knepley #include <petscdm.h>
8f62f30faSMatthew G. Knepley #include <petscdt.h>
9f62f30faSMatthew G. Knepley #include <petscfvtypes.h>
10879707a1SMatthew G. Knepley #include <petscdstypes.h>
11f62f30faSMatthew G. Knepley 
12*ac09b921SBarry Smith /* SUBMANSEC = FV */
13*ac09b921SBarry Smith 
14ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscClassId PETSCLIMITER_CLASSID;
15ab2453f0SMatthew G. Knepley 
16ab2453f0SMatthew G. Knepley /*J
17ab2453f0SMatthew G. Knepley   PetscLimiterType - String with the name of a PETSc finite volume slope limiter
18ab2453f0SMatthew G. Knepley 
19ab2453f0SMatthew G. Knepley   Level: beginner
20ab2453f0SMatthew G. Knepley 
21db781477SPatrick Sanan .seealso: `PetscLimiterSetType()`, `PetscLimiter`
22ab2453f0SMatthew G. Knepley J*/
23ab2453f0SMatthew G. Knepley typedef const char *PetscLimiterType;
24ab2453f0SMatthew G. Knepley #define PETSCLIMITERSIN       "sin"
259347ee04SMatthew G. Knepley #define PETSCLIMITERZERO      "zero"
269347ee04SMatthew G. Knepley #define PETSCLIMITERNONE      "none"
279347ee04SMatthew G. Knepley #define PETSCLIMITERMINMOD    "minmod"
289347ee04SMatthew G. Knepley #define PETSCLIMITERVANLEER   "vanleer"
299347ee04SMatthew G. Knepley #define PETSCLIMITERVANALBADA "vanalbada"
309347ee04SMatthew G. Knepley #define PETSCLIMITERSUPERBEE  "superbee"
319347ee04SMatthew G. Knepley #define PETSCLIMITERMC        "mc"
32ab2453f0SMatthew G. Knepley 
33ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscFunctionList PetscLimiterList;
34ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterCreate(MPI_Comm, PetscLimiter *);
35ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterDestroy(PetscLimiter *);
36ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterSetType(PetscLimiter, PetscLimiterType);
37ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterGetType(PetscLimiter, PetscLimiterType *);
38ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterSetUp(PetscLimiter);
39ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterSetFromOptions(PetscLimiter);
40fe2efc57SMark PETSC_EXTERN PetscErrorCode PetscLimiterViewFromOptions(PetscLimiter,PetscObject,const char[]);
41ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterView(PetscLimiter, PetscViewer);
42ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterRegister(const char [], PetscErrorCode (*)(PetscLimiter));
43ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterRegisterDestroy(void);
44ab2453f0SMatthew G. Knepley 
451475bf87SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscLimiterLimit(PetscLimiter, PetscReal, PetscReal *);
46ab2453f0SMatthew G. Knepley 
47f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVInitializePackage(void);
48f62f30faSMatthew G. Knepley 
49f62f30faSMatthew G. Knepley PETSC_EXTERN PetscClassId PETSCFV_CLASSID;
50f62f30faSMatthew G. Knepley 
51f62f30faSMatthew G. Knepley /*J
52f62f30faSMatthew G. Knepley   PetscFVType - String with the name of a PETSc finite volume discretization
53f62f30faSMatthew G. Knepley 
54f62f30faSMatthew G. Knepley   Level: beginner
55f62f30faSMatthew G. Knepley 
56db781477SPatrick Sanan .seealso: `PetscFVSetType()`, `PetscFV`
57f62f30faSMatthew G. Knepley J*/
58f62f30faSMatthew G. Knepley typedef const char *PetscFVType;
59f62f30faSMatthew G. Knepley #define PETSCFVUPWIND       "upwind"
60f62f30faSMatthew G. Knepley #define PETSCFVLEASTSQUARES "leastsquares"
61f62f30faSMatthew G. Knepley 
62f62f30faSMatthew G. Knepley PETSC_EXTERN PetscFunctionList PetscFVList;
63f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVCreate(MPI_Comm, PetscFV *);
64f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVDestroy(PetscFV *);
65f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetType(PetscFV, PetscFVType);
66f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVGetType(PetscFV, PetscFVType *);
67f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetUp(PetscFV);
68f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetFromOptions(PetscFV);
69fe2efc57SMark PETSC_EXTERN PetscErrorCode PetscFVViewFromOptions(PetscFV,PetscObject,const char[]);
70f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVView(PetscFV, PetscViewer);
71f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVRegister(const char [], PetscErrorCode (*)(PetscFV));
72f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVRegisterDestroy(void);
73a00cdb45SToby Isaac PETSC_EXTERN PetscErrorCode PetscFVSetComponentName(PetscFV, PetscInt, const char []);
74a00cdb45SToby Isaac PETSC_EXTERN PetscErrorCode PetscFVGetComponentName(PetscFV, PetscInt, const char *[]);
75f62f30faSMatthew G. Knepley 
76ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetLimiter(PetscFV, PetscLimiter);
77ab2453f0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVGetLimiter(PetscFV, PetscLimiter *);
78f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetNumComponents(PetscFV, PetscInt);
79f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVGetNumComponents(PetscFV, PetscInt *);
80f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetSpatialDimension(PetscFV, PetscInt);
81f62f30faSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVGetSpatialDimension(PetscFV, PetscInt *);
82eb4d80e8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetComputeGradients(PetscFV, PetscBool);
83eb4d80e8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVGetComputeGradients(PetscFV, PetscBool *);
84ce379721SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetQuadrature(PetscFV, PetscQuadrature);
85ce379721SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVGetQuadrature(PetscFV, PetscQuadrature *);
86dd0f9b09SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVSetDualSpace(PetscFV, PetscDualSpace);
87dd0f9b09SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVGetDualSpace(PetscFV, PetscDualSpace *);
88f62f30faSMatthew G. Knepley 
89a48af489SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVRefine(PetscFV, PetscFV *);
90a48af489SMatthew G. Knepley 
91ef0bb6c7SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVGetCellTabulation(PetscFV, PetscTabulation *);
92ef0bb6c7SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVCreateTabulation(PetscFV, PetscInt, PetscInt, const PetscReal[], PetscInt, PetscTabulation *);
936c1a3d01SMatthew G. Knepley 
94c5148223SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVComputeGradient(PetscFV, PetscInt, PetscScalar[], PetscScalar[]);
95879707a1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVIntegrateRHSFunction(PetscFV, PetscDS, PetscInt, PetscInt, PetscFVFaceGeom *, PetscReal *, PetscScalar[], PetscScalar[], PetscScalar[], PetscScalar[]);
96f62f30faSMatthew G. Knepley 
97c5148223SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscFVLeastSquaresSetMaxFaces(PetscFV, PetscInt);
98c5148223SMatthew G. Knepley 
99af092e56SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscDualSpaceApplyFVM(PetscDualSpace, PetscInt, PetscReal, PetscFVCellGeom *, PetscInt, PetscErrorCode (*)(PetscInt, PetscReal, const PetscReal [], PetscInt, PetscScalar *, void *), void *, PetscScalar *);
100af092e56SMatthew G. Knepley 
101f62f30faSMatthew G. Knepley #endif
102