| #
fbdc3dfe
|
| 01-Apr-2020 |
Toby Isaac <tisaac@cc.gatech.edu> |
Add PetscDTPDKEvalJet(), PetscDTJacobiEvalJet(), PetscDTIndexToGradedOrder(), and PetscDTGradedOrderToIndex()
The Proriol-Koordwinder-Dubiner basis (PKD) is orthonormal on the reference simplex, so
Add PetscDTPDKEvalJet(), PetscDTJacobiEvalJet(), PetscDTIndexToGradedOrder(), and PetscDTGradedOrderToIndex()
The Proriol-Koordwinder-Dubiner basis (PKD) is orthonormal on the reference simplex, so we should make it available as a stable basis of evaluation.
The recursive definition allows for a straightforward and stable calculation of all derivatives, not just first and second.
`src/dm/dt/tests/ex9.c` tests that the basis is orthonormal and compares the derivatives against the derivatives computed by tensor-product Legendre polynomials.
I thought about how to make an interface that would handle that, and I decided returning the jet in the same kind of graded representation that makes sense for multivariate polynomial spaces was a good choice.
To facilitate this, I also added indexing functions for figuring out where a tuple (either of exponents in a monomial or orders in a partial derivatives) is in this ordering.
Along the way I made PetscDTStroudConicalQuadrature() handle arbitrary dimensions instead of just 1--3.
We have a variety of dimensional orderings in PetscDT, related to how we order points of evaluation, components of the jet, and basis functions.
I thought that: - downstream users concerned with performance might prefer points of evaluation as the fastest varying index to facilitate vectorization of numerical integration, and - having basis functions as one of the outer dimensions (first or last) would simplify computing the matrix-matrix product of a [basis function x evaluation point] matrix with a Vandermonde inverse matrix
So I ordered the output dimensions of PetscDTPKDEvalJet() as [basis function, jet component (derivative), evaluation point]. I am seeking comment as to whether this is good, and whether it might be a good convention to adopt elsewhere in PetscDT.
undo extern
Fix complex type issue in dm/dt/tests/ex9.c
squashme: fix scaling in PetscDTStroudConicalQuadrature()
squashme: loosen tolerance for single precision
squashme: cast to double before printing
squashme: remove unused static functions
show more ...
|