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 adaptive time stepping to elastic sims via enum in Variable #60

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

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

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.

2 participants