Actual source code: petscfv.h
petsc-3.6.2 2015-10-02
Report Typos and Errors

      1: /*
      2:       Objects which encapsulate finite volume spaces and operations
      3: */
      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_STATIC_INLINE PetscErrorCode PetscLimiterViewFromOptions(PetscLimiter A,PetscObject B,const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,B,name);}
     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_STATIC_INLINE PetscErrorCode PetscFVViewFromOptions(PetscFV A,PetscObject B,const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,B,name);}
     68: PETSC_EXTERN PetscErrorCode PetscFVView(PetscFV, PetscViewer);
     69: PETSC_EXTERN PetscErrorCode PetscFVRegister(const char [], PetscErrorCode (*)(PetscFV));
     70: PETSC_EXTERN PetscErrorCode PetscFVRegisterDestroy(void);

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

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

     87: PETSC_EXTERN PetscErrorCode PetscFVGetDefaultTabulation(PetscFV, PetscReal **, PetscReal **, PetscReal **);
     88: PETSC_EXTERN PetscErrorCode PetscFVGetTabulation(PetscFV, PetscInt, const PetscReal[], PetscReal **, PetscReal **, PetscReal **);
     89: PETSC_EXTERN PetscErrorCode PetscFVRestoreTabulation(PetscFV, PetscInt, const PetscReal[], PetscReal **, PetscReal **, PetscReal **);

     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: #endif