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 an option for implicit external source terms #709

Merged
merged 5 commits into from
Dec 13, 2019

Conversation

maximumcats
Copy link
Member

PR summary

The external source terms are currently only implemented as an explicit predictor-corrector scheme. This is incompatible with how wdmerger implements its relaxation source term, so wdmerger is currently not working as intended. This PR introduces a new option, castro.ext_src_implicit (defaulting to 0) which, if turned on, changes the handling of the external source terms to allow an implicit solve. This is done by subtracting the full old-time source and adding the full new-time source in the corrector, rather than -0.5 and +0.5 of each, respectively. It would still be up to the individual problem to make sure they are consistent with this scheme if they turn the option on. Even if they don't, the source term ends up being a simple time-advanced source term at n+1 which is not a serious problem.

PR checklist

  • test suite needs to be run on this PR
  • this PR will change answers in the test suite
  • all functions have docstrings as per the coding conventions
  • the CHANGES file has been updated
  • if appropriate, this change is described in the docs

@zingale
Copy link
Member

zingale commented Dec 13, 2019

all tests pass, but the PR suggested that answers should change, so I will not merge until we understand this.

@zingale
Copy link
Member

zingale commented Dec 13, 2019

@maximumcats
Copy link
Member Author

I incorrectly believed that at least one of the wdmerger problems was using the external source terms, but this was not the case. I have now made this change on wdmerger_3D in development. Please run that test on development, reset it, and then re-run the test on this branch.

@zingale zingale merged commit d7ac90f into development Dec 13, 2019
@zingale zingale deleted the ext_src_implicit branch December 13, 2019 17:37
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 this pull request may close these issues.

2 participants