-
Notifications
You must be signed in to change notification settings - Fork 17
Add adaptive time stepping to elastic sims via enum in Variable #60
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: dev
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -159,23 +159,65 @@ def time(self, time): | |
| self._impl.time = time | ||
|
|
||
| @property | ||
| 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 | ||
|
ilateur marked this conversation as resolved.
Outdated
|
||
| magnetization-torque equations of motion (rad). | ||
|
|
||
| The default value is 1e-5. | ||
|
|
||
| See Also | ||
| -------- | ||
| headroom, lower_bound, sensible_factor, upper_bound | ||
| displacement_max_error, velocity_max_error | ||
| """ | ||
|
|
||
| return self._impl.max_error | ||
| return self._impl.torque_max_error | ||
|
|
||
| @max_error.setter | ||
| def max_error(self, error): | ||
| @magnetization_max_error.setter | ||
| def magnetization_max_error(self, error): | ||
| assert error > 0, "The maximum error should be bigger than 0." | ||
| self._impl.max_error = error | ||
| self._impl.magnetization_max_error = error | ||
|
|
||
| @property | ||
| def displacement_max_error(self): | ||
| """Return the maximum error per step the solver can tollerate for the | ||
| displacement-velocity equations of motion (m). | ||
|
|
||
| The default value is 1e-18. | ||
|
|
||
| See Also | ||
| -------- | ||
| headroom, lower_bound, sensible_factor, upper_bound | ||
|
ilateur marked this conversation as resolved.
Outdated
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| magnetization_max_error, velocity_max_error | ||
| """ | ||
|
|
||
| return self._impl.displacement_max_error | ||
|
|
||
| @displacement_max_error.setter | ||
| def displacement_max_error(self, error): | ||
| assert error > 0, "The maximum error should be bigger than 0." | ||
| self._impl.displacement_max_error = error | ||
|
|
||
| @property | ||
| def velocity_max_error(self): | ||
| """Return the maximum error per step the solver can tollerate for the | ||
| velocity-acceleration equations of motion (m/s). | ||
|
|
||
| The default value is 1e-7. | ||
|
|
||
| See Also | ||
| -------- | ||
| headroom, lower_bound, sensible_factor, upper_bound | ||
| displacement_max_error, magnetization_max_error | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comments as with
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ( |
||
| """ | ||
|
|
||
| return self._impl.velocity_max_error | ||
|
|
||
| @velocity_max_error.setter | ||
| def velocity_max_error(self, error): | ||
| assert error > 0, "The maximum error should be bigger than 0." | ||
| self._impl.velocity_max_error = error | ||
|
|
||
| @property | ||
| def headroom(self): | ||
| """Return the solver headroom. | ||
|
|
@@ -184,7 +226,8 @@ def headroom(self): | |
|
|
||
| See Also | ||
| -------- | ||
| lower_bound, max_error, sensible_factor, upper_bound | ||
| lower_bound, sensible_factor, upper_bound | ||
| displacement_max_error, magnetization_max_error, velocity_max_error | ||
| """ | ||
| return self._impl.headroom | ||
|
|
||
|
|
@@ -202,7 +245,8 @@ def lower_bound(self): | |
|
|
||
| See Also | ||
| -------- | ||
| headroom, max_error, sensible_factor, upper_bound | ||
| headroom, sensible_factor, upper_bound | ||
| displacement_max_error, magnetization_max_error, velocity_max_error | ||
| """ | ||
| return self._impl.lower_bound | ||
|
|
||
|
|
@@ -220,7 +264,8 @@ def upper_bound(self): | |
|
|
||
| See Also | ||
| -------- | ||
| headroom, lower_bound, max_error, sensible_factor | ||
| headroom, lower_bound, sensible_factor | ||
| displacement_max_error, magnetization_max_error, velocity_max_error | ||
| """ | ||
| return self._impl.upper_bound | ||
|
|
||
|
|
@@ -238,7 +283,8 @@ def sensible_factor(self): | |
|
|
||
| See Also | ||
| -------- | ||
| headroom, lower_bound, max_error, upper_bound | ||
| headroom, lower_bound, upper_bound | ||
| displacement_max_error, magnetization_max_error, velocity_max_error | ||
| """ | ||
| return self._impl.sensible_factor | ||
|
|
||
|
|
||
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.
I think dispersion relations generally show up better with fixed timestepping 🤔