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 option to run finite difference on gradient of energy #52

Merged
merged 14 commits into from
Dec 7, 2023

Conversation

arvigj
Copy link
Contributor

@arvigj arvigj commented Dec 5, 2023

No description provided.

@arvigj arvigj requested review from teseoch and Huangzizhou December 5, 2023 16:42
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (b376f67) 88.52% compared to head (ae37148) 88.62%.
Report is 3 commits behind head on main.

❗ Current head ae37148 differs from pull request most recent head 035b97c. Consider uploading reports for the commit 035b97c to get more accurate results

Files Patch % Lines
src/polysolve/nonlinear/Solver.cpp 93.18% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   88.52%   88.62%   +0.10%     
==========================================
  Files          46       46              
  Lines        1839     1882      +43     
==========================================
+ Hits         1628     1668      +40     
- Misses        211      214       +3     
Flag Coverage Δ
polysolve 88.62% <93.18%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

"doc": "Expensive Option: Eps for finite difference to verify gradient of energy."
},
{
"pointer": "/advanced/gradient_fd_components",
Copy link
Member

Choose a reason for hiding this comment

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

Better name?

@@ -319,5 +322,23 @@
"default": 100,
"type": "int",
"doc": "Dangerous Option: Quit the optimization if the solver reduces the energy by less than f_delta for consecutive f_delta_step_tol steps."
},
{
"pointer": "/advanced/gradient_fd",
Copy link
Member

Choose a reason for hiding this comment

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

maybe this instead of a bool is a string with 3 opts? none, full and directional?

src/polysolve/nonlinear/Solver.cpp Outdated Show resolved Hide resolved
src/polysolve/nonlinear/Solver.cpp Outdated Show resolved Hide resolved
// Finite Difference Utilities
// ====================================================================

bool gradient_fd = false;
Copy link
Member

Choose a reason for hiding this comment

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

all of these should be private and filed should start with m_

@teseoch
Copy link
Member

teseoch commented Dec 5, 2023

this pr contains the changes of the other pr too

@arvigj arvigj requested a review from teseoch December 7, 2023 00:26
@arvigj arvigj merged commit 8a8c103 into polyfem:main Dec 7, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants