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

Move theta input and change error check #397

Merged
merged 5 commits into from
Jul 27, 2023
Merged

Move theta input and change error check #397

merged 5 commits into from
Jul 27, 2023

Conversation

atb1995
Copy link
Collaborator

@atb1995 atb1995 commented Jul 25, 2023

theta is changed from an optional argument in ThetaMethod to required and limited to 0 < theta < 1. ImplicitMidpoint is changed to be called TrapeziumRule. Note, in future we could add the actual Implicit Method in future.

Copy link
Contributor

@tommbendall tommbendall left a comment

Choose a reason for hiding this comment

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

The code changes are exactly right so as it stands this could be merged onto main. But...

  1. Could you write a short description of the PR (under the "conversation" tab)
  2. Do we want to think about renaming this? I've always wanted to clarify the difference between the following two schemes:
q^{n+1} = q^n + 0.5*dt*F(q^n) + 0.5*dt*F(q^{n+1})

and

q^{n+1} = q^n + dt*F(0.5*[q^n+q^{n+1}])

Since this one is the first, I had wondered if this should be called something like the TrapezoidalThetaMethod? What do you think?

@atb1995 atb1995 linked an issue Jul 26, 2023 that may be closed by this pull request
@atb1995
Copy link
Collaborator Author

atb1995 commented Jul 26, 2023

I've changed the name of ImplicitMidpoint

@tommbendall
Copy link
Contributor

I'm afraid the branch is still failing! I also wondered if we should open an issue to implement GeneralisedMidpoint and ImplicitMidpoint discretisations?

@atb1995
Copy link
Collaborator Author

atb1995 commented Jul 27, 2023

Yep I missed an ImplicitMidpoint and had some trailing whitespace! I think that would be good, although I think it will be tied in to having implicit multistage schemes with a butcher tableau (after explicit is done). I could still create an issue?

Copy link
Contributor

@tommbendall tommbendall left a comment

Choose a reason for hiding this comment

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

Looks good now, thanks!

@tommbendall tommbendall merged commit c173934 into main Jul 27, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants