Curry signed integrals into Hodge star #106
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Converting between primal and dual differential forms requires two pieces of information: the$\S 4.1$ from Hirani’s thesis.
n
-dimensional volumes of the primal and dual regions of space, and their sign. In the continuous theory, the Hodge star operator accommodates both of these pieces of information. The discrete theory also accounts for this. See for exampleCurrently, CombinatorialSpaces treats the multiplication by volume-ratios separately from accommodating the sign. In other words, the Hodge star handles only the volume computation, and the
sign
operator must be called on-demand. And indeedsign
must always be called for other discrete operators to compute correctly, since they expect signed integrals.This two-stage process has been a source of confusion. For example, one may expect
dual_derivative(0,sd) * interior_product(sd, u, v)
to compute the exterior derivative of the interior product. But this is not so. Before the changes in this PR, the correct answer was to computedual_derivative(0,sd) * (sign(2,sd) .* interior_product(sd, u, v))
, since the Hodge star inside the interior-product computation does not compute the signed volume, which the dual exterior derivative expects. The original 1-1 Lie derivative operation did not account for this.This has been partially addressed on case-by-case bases. For example, PR 78 explicitly added a sign computation inside the primal-dual 1-1 wedge product.
This PR explicitly captures the sign computation in the Hodge star computation, so discrete operator composition works correctly in all cases.