-
-
Notifications
You must be signed in to change notification settings - Fork 221
Remove NewtonSolver from hyperelasticity demo #3929
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
base: main
Are you sure you want to change the base?
Conversation
|
On a related note, where are we with providing the things needed to interface with SNES from C++? |
| VecGhostUpdateBegin(x, INSERT_VALUES, SCATTER_FORWARD); | ||
| VecGhostUpdateEnd(x, INSERT_VALUES, SCATTER_FORWARD); | ||
| PetscReal residual = 0; | ||
| VecNorm(r, NORM_2, &residual); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use NORM_INFINITY for residual norms instead (as a naive fix)? I always struggle that NORM_2 grows with numbers of elements so for a finer mesh you'll violate atol very soon.
Btw. are C++ demos run in CI? Could not find the job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw. are C++ demos run in CI? Could not find the job.
https://github.com/FEniCS/dolfinx/blob/main/.github/workflows/ccpp.yml#L230 - CI step has a confusing name.
|
Is the long term plan to remove the DOLFINx C++ Newton solver, in favor of another solver (like SNES)? If we plan to remove it, I think we need to give some deprecation notice to the C++ users + an alternative that is not copying solver logic across multiple user files. |
|
Yes, the plan is to remove NewtonSolver and provide some tooling/examples to help people interface SNES from C++. However, I've never done it myself, so I have no idea where to even begin. |
|
I think that the example here is sufficiently simple that reproducing the logic of NewtonSolver (and simplifying) is OK (only adds 70 lines of code). |
|
Could you add that deprecated message so we can get this merged for 0.10? |
No description provided.