Actual source code: petscfv.h

petsc-3.13.6 2020-09-29
Report Typos and Errors
  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 *);


 45: PETSC_EXTERN PetscErrorCode PetscFVInitializePackage(void);

 47: PETSC_EXTERN PetscClassId PETSCFV_CLASSID;

 49: /*J
 50:   PetscFVType - String with the name of a PETSc finite volume discretization

 52:   Level: beginner

 54: .seealso: PetscFVSetType(), PetscFV
 55: J*/
 56: typedef const char *PetscFVType;
 57: #define PETSCFVUPWIND       "upwind"
 58: #define PETSCFVLEASTSQUARES "leastsquares"

 60: PETSC_EXTERN PetscFunctionList PetscFVList;
 61: PETSC_EXTERN PetscErrorCode PetscFVCreate(MPI_Comm, PetscFV *);
 62: PETSC_EXTERN PetscErrorCode PetscFVDestroy(PetscFV *);
 63: PETSC_EXTERN PetscErrorCode PetscFVSetType(PetscFV, PetscFVType);
 64: PETSC_EXTERN PetscErrorCode PetscFVGetType(PetscFV, PetscFVType *);
 65: PETSC_EXTERN PetscErrorCode PetscFVSetUp(PetscFV);
 66: PETSC_EXTERN PetscErrorCode PetscFVSetFromOptions(PetscFV);
 67: PETSC_EXTERN PetscErrorCode PetscFVViewFromOptions(PetscFV,PetscObject,const char[]);
 68: PETSC_EXTERN PetscErrorCode PetscFVView(PetscFV, PetscViewer);
 69: PETSC_EXTERN PetscErrorCode PetscFVRegister(const char [], PetscErrorCode (*)(PetscFV));
 70: PETSC_EXTERN PetscErrorCode PetscFVRegisterDestroy(void);
 71: PETSC_EXTERN PetscErrorCode PetscFVSetComponentName(PetscFV, PetscInt, const char []);
 72: PETSC_EXTERN PetscErrorCode PetscFVGetComponentName(PetscFV, PetscInt, const char *[]);

 74: PETSC_EXTERN PetscErrorCode PetscFVSetLimiter(PetscFV, PetscLimiter);
 75: PETSC_EXTERN PetscErrorCode PetscFVGetLimiter(PetscFV, PetscLimiter *);
 76: PETSC_EXTERN PetscErrorCode PetscFVSetNumComponents(PetscFV, PetscInt);
 77: PETSC_EXTERN PetscErrorCode PetscFVGetNumComponents(PetscFV, PetscInt *);
 78: PETSC_EXTERN PetscErrorCode PetscFVSetSpatialDimension(PetscFV, PetscInt);
 79: PETSC_EXTERN PetscErrorCode PetscFVGetSpatialDimension(PetscFV, PetscInt *);
 80: PETSC_EXTERN PetscErrorCode PetscFVSetComputeGradients(PetscFV, PetscBool);
 81: PETSC_EXTERN PetscErrorCode PetscFVGetComputeGradients(PetscFV, PetscBool *);
 82: PETSC_EXTERN PetscErrorCode PetscFVSetQuadrature(PetscFV, PetscQuadrature);
 83: PETSC_EXTERN PetscErrorCode PetscFVGetQuadrature(PetscFV, PetscQuadrature *);
 84: PETSC_EXTERN PetscErrorCode PetscFVSetDualSpace(PetscFV, PetscDualSpace);
 85: PETSC_EXTERN PetscErrorCode PetscFVGetDualSpace(PetscFV, PetscDualSpace *);

 87: PETSC_EXTERN PetscErrorCode PetscFVRefine(PetscFV, PetscFV *);

 89: PETSC_EXTERN PetscErrorCode PetscFVGetCellTabulation(PetscFV, PetscTabulation *);
 90: PETSC_EXTERN PetscErrorCode PetscFVCreateTabulation(PetscFV, PetscInt, PetscInt, const PetscReal[], PetscInt, PetscTabulation *);

 92: PETSC_EXTERN PetscErrorCode PetscFVComputeGradient(PetscFV, PetscInt, PetscScalar[], PetscScalar[]);
 93: PETSC_EXTERN PetscErrorCode PetscFVIntegrateRHSFunction(PetscFV, PetscDS, PetscInt, PetscInt, PetscFVFaceGeom *, PetscReal *, PetscScalar[], PetscScalar[], PetscScalar[], PetscScalar[]);

 95: PETSC_EXTERN PetscErrorCode PetscFVLeastSquaresSetMaxFaces(PetscFV, PetscInt);

 97: PETSC_EXTERN PetscErrorCode PetscDualSpaceApplyFVM(PetscDualSpace, PetscInt, PetscReal, PetscFVCellGeom *, PetscInt, PetscErrorCode (*)(PetscInt, PetscReal, const PetscReal [], PetscInt, PetscScalar *, void *), void *, PetscScalar *);

 99: #endif