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

Documentation: stepsize and Newton Solver #777

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

KulaginVladimir
Copy link
Collaborator

Proposed changes

Based on #775, this PR updates docs for Stepsize and adds some information on the usage of a custom NewtonSolver.

Types of changes

What types of changes does your code introduce to FESTIM?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactoring
  • Documentation Update (if none of the other choices apply)
  • New tests

Checklist

  • Black formatted
  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

docs/source/userguide/newton_solver.rst Outdated Show resolved Hide resolved
Comment on lines 88 to 90
.. warning::

For a stationary heat transfer problem, a custom Newton solver has to be provided before the simulation initialisation!
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we add another warning saying that this will override the solver parameters given in Settings?

Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

A few additional changes

docs/source/userguide/newton_solver.rst Outdated Show resolved Hide resolved
docs/source/userguide/newton_solver.rst Outdated Show resolved Hide resolved
docs/source/userguide/newton_solver.rst Outdated Show resolved Hide resolved

The linear solver method can be set with the ``linear_solver`` attribute. The list of available linear solvers can be viewed with: ``print(fenics.list_linear_solver_methods())``.

.. dropdown:: Linear solver methods
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice, didn't know that 👍

docs/source/userguide/newton_solver.rst Outdated Show resolved Hide resolved
docs/source/userguide/newton_solver.rst Outdated Show resolved Hide resolved
@KulaginVladimir
Copy link
Collaborator Author

@RemDelaporteMathurin
All comments on text were included. Another warning was added.

I also included another example for a CustomSolver. Let me know what you think.

Concerning the last example, maybe a full simulation case, e.g. Poisson problem or whatever, will be better? Say, I'll add a simple problem with a plot of convergence dynamics similar to this: #673 (comment)

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.53%. Comparing base (8e0649d) to head (bea2ccc).
Report is 170 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #777   +/-   ##
=======================================
  Coverage   99.53%   99.53%           
=======================================
  Files          59       59           
  Lines        2577     2577           
=======================================
  Hits         2565     2565           
  Misses         12       12           

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

@RemDelaporteMathurin
Copy link
Collaborator

Concerning the last example, maybe a full simulation case, e.g. Poisson problem or whatever, will be better?

Maybe a tutorial in the workshop is better?

@KulaginVladimir
Copy link
Collaborator Author

If the included examples are fine, I can make a new tutorial task for the workshop.

@RemDelaporteMathurin RemDelaporteMathurin merged commit 36da67b into festim-dev:main Jun 10, 2024
5 checks passed
@KulaginVladimir KulaginVladimir deleted the UpdDocs branch June 27, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update documentation for new adaptive timestepping arguments
2 participants