xref: /petsc/include/petscdt.h (revision f1ea0e2ffa717737f4d63c6f0832024f88059e12)
137045ce4SJed Brown /*
237045ce4SJed Brown   Common tools for constructing discretizations
337045ce4SJed Brown */
437045ce4SJed Brown #if !defined(__PETSCDT_H)
537045ce4SJed Brown #define __PETSCDT_H
637045ce4SJed Brown 
737045ce4SJed Brown #include <petscsys.h>
837045ce4SJed Brown 
9a0845e3aSMatthew G. Knepley typedef struct {
10a0845e3aSMatthew G. Knepley   PetscInt         numQuadPoints; /* The number of quadrature points on an element */
11a0845e3aSMatthew G. Knepley   const PetscReal *quadPoints;    /* The quadrature point coordinates */
12a0845e3aSMatthew G. Knepley   const PetscReal *quadWeights;   /* The quadrature weights */
13a0845e3aSMatthew G. Knepley   PetscInt         numBasisFuncs; /* The number of finite element basis functions on an element */
14a0845e3aSMatthew G. Knepley   PetscInt         numComponents; /* The number of components for each basis function */
15a0845e3aSMatthew G. Knepley   const PetscReal *basis;         /* The basis functions tabulated at the quadrature points */
16a0845e3aSMatthew G. Knepley   const PetscReal *basisDer;      /* The basis function derivatives tabulated at the quadrature points */
17a0845e3aSMatthew G. Knepley } PetscQuadrature;
18a0845e3aSMatthew G. Knepley 
19a0845e3aSMatthew G. Knepley typedef struct {
20*f1ea0e2fSMatthew G. Knepley   PetscReal *v0, *n, *J, *invJ, *detJ;
21a0845e3aSMatthew G. Knepley } PetscCellGeometry;
22a0845e3aSMatthew G. Knepley 
2337045ce4SJed Brown PETSC_EXTERN PetscErrorCode PetscDTLegendreEval(PetscInt,const PetscReal*,PetscInt,const PetscInt*,PetscReal*,PetscReal*,PetscReal*);
2437045ce4SJed Brown PETSC_EXTERN PetscErrorCode PetscDTGaussQuadrature(PetscInt,PetscReal,PetscReal,PetscReal*,PetscReal*);
25194825f6SJed Brown PETSC_EXTERN PetscErrorCode PetscDTReconstructPoly(PetscInt,PetscInt,const PetscReal*,PetscInt,const PetscReal*,PetscReal*);
26a0845e3aSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscDTGaussJacobiQuadrature(PetscInt,PetscInt,PetscReal,PetscReal,PetscQuadrature*);
27a0845e3aSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscQuadratureDestroy(PetscQuadrature*);
2837045ce4SJed Brown 
2937045ce4SJed Brown #endif
30