Skip to content

Conversation

@ilateur
Copy link
Collaborator

@ilateur ilateur commented Jan 20, 2025

This is a redo of pull request #57. The idea is exactly the same, but the implementation is different. It was easiest to start over.
Instead of using raw pointers pointing to parameters located in magnet, it uses enum class MaxError in Variable to remember what error to use. The actual values of the 3 errors are now stored in the TimeSolver class, along with all other adaptive time stepping parameters. I think/hope this solution is cleaner.

Still need to take a look at sensibleTimeStep().

@ilateur ilateur added the enhancement New feature or request label Jan 20, 2025
@ilateur ilateur self-assigned this Jan 20, 2025
@ilateur
Copy link
Collaborator Author

ilateur commented Jan 27, 2025

Some todo's I should not forget:

  • take a look at sensibleTimeStep()
  • add a test comparing results with a very small step size
  • may need to tweak default values 1e-18 and 1e-7 of displacementMaxError and velocityMaxError

Copy link
Contributor

@lamoreel lamoreel left a comment

Choose a reason for hiding this comment

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

Definitely cleaner than the previous fix and I like this for now 👍. Still need to look at your TODOs before merging.

def max_error(self):
"""Return the maximum error per step the solver can tollerate.
def magnetization_max_error(self):
"""Return the maximum error per step the solver can tollerate for the
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: tolerate (also the two extra ones).

@ilateur ilateur added this to the v1.1.1 milestone Jul 9, 2025
@ilateur ilateur removed this from the v1.1.1 milestone Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants