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

Offset start time when stepping #2760

Closed
valentinsulzer opened this issue Mar 9, 2023 · 1 comment · Fixed by #2773 or #2907
Closed

Offset start time when stepping #2760

valentinsulzer opened this issue Mar 9, 2023 · 1 comment · Fixed by #2773 or #2907
Assignees

Comments

@valentinsulzer
Copy link
Member

valentinsulzer commented Mar 9, 2023

Currently, when solving a simulation by stepping, the final time step of the old solution (e.g. [0,0.01 ..., 1]) is the same as the first time step of the next solution (e.g. [1,1.01,...]). We get around this by excluding the first time step of the next solution when constructing the full solution ([0,0.01,...,1,1.01,...]). However, this means that the solution naively constructed by concatenating together all the steps is different from the solution as constructed by PyBaMM. Instead, we should offset the start of each step by a relevant small number (e.g. 1e-6) and then keep the first step.

@valentinsulzer valentinsulzer self-assigned this Mar 9, 2023
@valentinsulzer
Copy link
Member Author

Is it better to offset time by a small number, save only parts [1:] of the step, or leave as is?

valentinsulzer added a commit that referenced this issue Mar 10, 2023
valentinsulzer added a commit that referenced this issue Mar 13, 2023
@valentinsulzer valentinsulzer mentioned this issue Mar 13, 2023
8 tasks
valentinsulzer added a commit that referenced this issue Mar 14, 2023
valentinsulzer added a commit that referenced this issue Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant