Actual source code: petscdt.h
petsc-dev 2014-02-02
1: /*
2: Common tools for constructing discretizations
3: */
7: #include <petscsys.h>
9: typedef struct {
10: PetscInt dim; /* The spatial dimension */
11: PetscInt numPoints; /* The number of quadrature points on an element */
12: const PetscReal *points; /* The quadrature point coordinates */
13: const PetscReal *weights; /* The quadrature weights */
14: } PetscQuadrature;
16: typedef struct {
17: PetscReal *v0, *n, *J, *invJ, *detJ;
18: } PetscCellGeometry;
20: PETSC_EXTERN PetscErrorCode PetscDTLegendreEval(PetscInt,const PetscReal*,PetscInt,const PetscInt*,PetscReal*,PetscReal*,PetscReal*);
21: PETSC_EXTERN PetscErrorCode PetscDTGaussQuadrature(PetscInt,PetscReal,PetscReal,PetscReal*,PetscReal*);
22: PETSC_EXTERN PetscErrorCode PetscDTReconstructPoly(PetscInt,PetscInt,const PetscReal*,PetscInt,const PetscReal*,PetscReal*);
23: PETSC_EXTERN PetscErrorCode PetscDTGaussJacobiQuadrature(PetscInt,PetscInt,PetscReal,PetscReal,PetscQuadrature*);
24: PETSC_EXTERN PetscErrorCode PetscQuadratureView(PetscQuadrature,PetscViewer);
25: PETSC_EXTERN PetscErrorCode PetscQuadratureDestroy(PetscQuadrature*);
27: #endif