Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Div, Grad, Curl, Lap operators (autodiff #7) #224

Merged
merged 114 commits into from Feb 1, 2021
Merged

Conversation

sritchie
Copy link
Member

@sritchie sritchie commented Dec 28, 2020

I THINK that Grad and div are related through a one-level-deep transpose only: https://en.wikipedia.org/wiki/Gradient not anything deeper. @littleredcomputer , lmk if you think this impl is correct.

@sritchie sritchie changed the base branch from master to sritchie/diff_six December 28, 2020 19:12
@codecov-io
Copy link

codecov-io commented Dec 28, 2020

Codecov Report

❗ No coverage uploaded for pull request base (sritchie/diff_six@92e829c). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                 Coverage Diff                  @@
##             sritchie/diff_six     #224   +/-   ##
====================================================
  Coverage                     ?   84.33%           
====================================================
  Files                        ?       81           
  Lines                        ?     8336           
  Branches                     ?      449           
====================================================
  Hits                         ?     7030           
  Misses                       ?      857           
  Partials                     ?      449           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92e829c...128896d. Read the comment docs.

@sritchie sritchie changed the base branch from sritchie/diff_six to master February 1, 2021 03:35
@sritchie sritchie merged commit bcb58b8 into master Feb 1, 2021
@@ -376,6 +384,51 @@
(o/make-operator #(g/partial-derivative % selectors)
`(~'partial ~@selectors)))

(def ^{:doc "Operator that takes a function `f` and returns a new function that
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if these definitions are FDG-compliant, in the following sense: you make Grad by taking d and then doing a "static cast" of the variance. But the contravariant components of the gradient are equal to the covariant components only when the ambient metric is the identity matrix. Before FDG, SICMutils has no concept of metric, so there's no way to lift the index except to just patch it in as you do here. I think this loses one of the very important features of SICMutils in that it respects that fact that when f is a scalar function df is a one-form.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there's a lot to be said for being able to use this system to do your Calculus 3 homework.

@sritchie sritchie deleted the sritchie/diff_seven branch May 3, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automatic Differentiation Bugs and issues related to Automatic Differentiation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants