Actual source code: petscfv.h
1: /*
2: Objects which encapsulate finite volume spaces and operations
3: */
4: #if !defined(PETSCFV_H)
5: #define PETSCFV_H
6: #include <petscdm.h>
7: #include <petscdt.h>
8: #include <petscfvtypes.h>
9: #include <petscdstypes.h>
11: PETSC_EXTERN PetscClassId PETSCLIMITER_CLASSID;
13: /*J
14: PetscLimiterType - String with the name of a PETSc finite volume slope limiter
16: Level: beginner
18: .seealso: PetscLimiterSetType(), PetscLimiter
19: J*/
20: typedef const char *PetscLimiterType;
21: #define PETSCLIMITERSIN "sin"
22: #define PETSCLIMITERZERO "zero"
23: #define PETSCLIMITERNONE "none"
24: #define PETSCLIMITERMINMOD "minmod"
25: #define PETSCLIMITERVANLEER "vanleer"
26: #define PETSCLIMITERVANALBADA "vanalbada"
27: #define PETSCLIMITERSUPERBEE "superbee"
28: #define PETSCLIMITERMC "mc"
30: PETSC_EXTERN PetscFunctionList PetscLimiterList;
31: PETSC_EXTERN PetscErrorCode PetscLimiterCreate(MPI_Comm, PetscLimiter *);
32: PETSC_EXTERN PetscErrorCode PetscLimiterDestroy(PetscLimiter *);
33: PETSC_EXTERN PetscErrorCode PetscLimiterSetType(PetscLimiter, PetscLimiterType);
34: PETSC_EXTERN PetscErrorCode PetscLimiterGetType(PetscLimiter, PetscLimiterType *);
35: PETSC_EXTERN PetscErrorCode PetscLimiterSetUp(PetscLimiter);
36: PETSC_EXTERN PetscErrorCode PetscLimiterSetFromOptions(PetscLimiter);
37: PETSC_EXTERN PetscErrorCode PetscLimiterViewFromOptions(PetscLimiter,PetscObject,const char[]);
38: PETSC_EXTERN PetscErrorCode PetscLimiterView(PetscLimiter, PetscViewer);
39: PETSC_EXTERN PetscErrorCode PetscLimiterRegister(const char [], PetscErrorCode (*)(PetscLimiter));
40: PETSC_EXTERN PetscErrorCode PetscLimiterRegisterDestroy(void);
42: PETSC_EXTERN PetscErrorCode PetscLimiterLimit(PetscLimiter, PetscReal, PetscReal *);
44: PETSC_EXTERN PetscErrorCode PetscFVInitializePackage(void);
46: PETSC_EXTERN PetscClassId PETSCFV_CLASSID;
48: /*J
49: PetscFVType - String with the name of a PETSc finite volume discretization
51: Level: beginner
53: .seealso: PetscFVSetType(), PetscFV
54: J*/
55: typedef const char *PetscFVType;
56: #define PETSCFVUPWIND "upwind"
57: #define PETSCFVLEASTSQUARES "leastsquares"
59: PETSC_EXTERN PetscFunctionList PetscFVList;
60: PETSC_EXTERN PetscErrorCode PetscFVCreate(MPI_Comm, PetscFV *);
61: PETSC_EXTERN PetscErrorCode PetscFVDestroy(PetscFV *);
62: PETSC_EXTERN PetscErrorCode PetscFVSetType(PetscFV, PetscFVType);
63: PETSC_EXTERN PetscErrorCode PetscFVGetType(PetscFV, PetscFVType *);
64: PETSC_EXTERN PetscErrorCode PetscFVSetUp(PetscFV);
65: PETSC_EXTERN PetscErrorCode PetscFVSetFromOptions(PetscFV);
66: PETSC_EXTERN PetscErrorCode PetscFVViewFromOptions(PetscFV,PetscObject,const char[]);
67: PETSC_EXTERN PetscErrorCode PetscFVView(PetscFV, PetscViewer);
68: PETSC_EXTERN PetscErrorCode PetscFVRegister(const char [], PetscErrorCode (*)(PetscFV));
69: PETSC_EXTERN PetscErrorCode PetscFVRegisterDestroy(void);
70: PETSC_EXTERN PetscErrorCode PetscFVSetComponentName(PetscFV, PetscInt, const char []);
71: PETSC_EXTERN PetscErrorCode PetscFVGetComponentName(PetscFV, PetscInt, const char *[]);
73: PETSC_EXTERN PetscErrorCode PetscFVSetLimiter(PetscFV, PetscLimiter);
74: PETSC_EXTERN PetscErrorCode PetscFVGetLimiter(PetscFV, PetscLimiter *);
75: PETSC_EXTERN PetscErrorCode PetscFVSetNumComponents(PetscFV, PetscInt);
76: PETSC_EXTERN PetscErrorCode PetscFVGetNumComponents(PetscFV, PetscInt *);
77: PETSC_EXTERN PetscErrorCode PetscFVSetSpatialDimension(PetscFV, PetscInt);
78: PETSC_EXTERN PetscErrorCode PetscFVGetSpatialDimension(PetscFV, PetscInt *);
79: PETSC_EXTERN PetscErrorCode PetscFVSetComputeGradients(PetscFV, PetscBool);
80: PETSC_EXTERN PetscErrorCode PetscFVGetComputeGradients(PetscFV, PetscBool *);
81: PETSC_EXTERN PetscErrorCode PetscFVSetQuadrature(PetscFV, PetscQuadrature);
82: PETSC_EXTERN PetscErrorCode PetscFVGetQuadrature(PetscFV, PetscQuadrature *);
83: PETSC_EXTERN PetscErrorCode PetscFVSetDualSpace(PetscFV, PetscDualSpace);
84: PETSC_EXTERN PetscErrorCode PetscFVGetDualSpace(PetscFV, PetscDualSpace *);
86: PETSC_EXTERN PetscErrorCode PetscFVRefine(PetscFV, PetscFV *);
88: PETSC_EXTERN PetscErrorCode PetscFVGetCellTabulation(PetscFV, PetscTabulation *);
89: PETSC_EXTERN PetscErrorCode PetscFVCreateTabulation(PetscFV, PetscInt, PetscInt, const PetscReal[], PetscInt, PetscTabulation *);
91: PETSC_EXTERN PetscErrorCode PetscFVComputeGradient(PetscFV, PetscInt, PetscScalar[], PetscScalar[]);
92: PETSC_EXTERN PetscErrorCode PetscFVIntegrateRHSFunction(PetscFV, PetscDS, PetscInt, PetscInt, PetscFVFaceGeom *, PetscReal *, PetscScalar[], PetscScalar[], PetscScalar[], PetscScalar[]);
94: PETSC_EXTERN PetscErrorCode PetscFVLeastSquaresSetMaxFaces(PetscFV, PetscInt);
96: PETSC_EXTERN PetscErrorCode PetscDualSpaceApplyFVM(PetscDualSpace, PetscInt, PetscReal, PetscFVCellGeom *, PetscInt, PetscErrorCode (*)(PetscInt, PetscReal, const PetscReal [], PetscInt, PetscScalar *, void *), void *, PetscScalar *);
98: #endif