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

[WIP] Add functionality to have user-specific convergence criteria for nonlinear solvers #341

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tarun-mitruka
Copy link
Collaborator

@tarun-mitruka tarun-mitruka commented Nov 26, 2024

See #182

TO-DOs

  • Change the solver-dependent structs, for example, NRConvergenceCriteria to criteria-dependent structs. This should then be overloaded with bool operator()(...){} for different solvers. Remove the MAKE_ENUM and then pass the criteria-dependent structs directly to the nonlinear solvers. This would allow easy extensibility for the users.
  • Fix the bug in Python tests
  • Implement convergence criteria for trust region method
  • Update CHANGELOG
  • Fix in ikarus-examples, if needed
  • Use DUNE::AlwaysFalse as per the comments (see convergencecriteria.hh)

Decisions to be made

@tarun-mitruka tarun-mitruka self-assigned this Nov 26, 2024
@tarun-mitruka tarun-mitruka added enhancement New request to enhance existing features feature New feature labels Nov 26, 2024
@tarun-mitruka tarun-mitruka force-pushed the feature/convergenceCriteria branch from b755a1c to b02eead Compare November 28, 2024 12:55
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 8 lines in your changes missing coverage. Please review.

Project coverage is 80.88%. Comparing base (f1928da) to head (b02eead).

Files with missing lines Patch % Lines
...olver/newtonraphsonwithscalarsubsidiaryfunction.hh 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #341      +/-   ##
==========================================
+ Coverage   80.86%   80.88%   +0.02%     
==========================================
  Files          68       69       +1     
  Lines        2299     2312      +13     
==========================================
+ Hits         1859     1870      +11     
- Misses        440      442       +2     
Flag Coverage Δ
tests 80.88% <73.33%> (+0.02%) ⬆️

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.

@@ -32,24 +30,28 @@ struct NRSettings
* \struct NewtonRaphsonConfig
* \brief Config for the Newton-Raphson solver.
*/
template <typename LS = utils::SolverDefault, typename UF = utils::UpdateDefault>
template <ConvergenceCriterion CC = ConvergenceCriterion::ResiduumNorm, typename LS = utils::SolverDefault,
Copy link
Collaborator

Choose a reason for hiding this comment

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

template<typename NLS>
struct ResidualNorm

template<>
struct ResidualNorm<NRwithsubsidary>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New request to enhance existing features feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add functionality to have user specific convergence criteria for non-linear solvers
3 participants