-
Notifications
You must be signed in to change notification settings - Fork 5
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
Line integration #299
Open
mrhardman
wants to merge
14
commits into
master
Choose a base branch
from
line-integration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Line integration #299
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9245130
Add the facility for spectrally accurate indefinite 1D line integrati…
mrhardman 5c3047e
Addition of automatic test for indefinite integral feature.
mrhardman 1c935d3
Minor refactor to make chebyshevpoints() run from [-1,1], to be consi…
mrhardman 17be107
Extend indefinite_integral!() to support Chebyshev discretization opt…
mrhardman f809509
Extend indefinite_integral!() to support "finite_difference" option u…
mrhardman b42c849
Attempt to incorporate indefinite_integral!() into calculate_phi_from…
mrhardman 538870d
Correct spelling error primative -> primitive.
mrhardman 1365aca
Correct presumed typo, make sure phi offset added to all points in z.
mrhardman 48a6e59
Addition of test script to directly test the distributed memory MPI f…
mrhardman 25ad9f2
Bugfix of MPI communication of the delta_phi increments to the distri…
mrhardman c0f9982
Update moment_kinetics/src/em_fields.jl
mrhardman 49e36c9
Comment on local nature of `indefinite_integral!()`.
mrhardman 2c7e12c
Documentation of the anti-derivative (integration) matrix.
mrhardman ac343ea
Merge branch 'master' into line-integration
mrhardman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The handling of distributed-MPI is done in
calculate_phi_from_Epar!()
. It might be nicer to handle it generically within this function, to avoid code repetition? Maybe we could add an optional argument or two that would select whether to preserve the value on the lower boundary or the upper boundary.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 thought about doing this, but I didn't want to have to implement all the possible choices for which constant to preserve, I just wanted to show that accurate line integration was possible! I am happy to implement the MPI communication as send-receive operations for a general BC in a generic function, if it is judged useful. (I think the broadcasting operation is slower in scaling because all the processes have to recompute something ever broadcast, but I should check my notes). I also wasn't sure if this operation would be needed anywhere else in the code, and so I left the MPI as a special case for now.
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 that's fine (for now!), but please do add a docstring saying that the indefinite integral functions only work on a single block, and distributed-MPI needs to be implemented elsewhere, but could be refactored into these functions if/when it becomes useful.
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.
OK. Do you have a preference for where I put the documentation for how the method works (my addition to the head descript of the PR)? The functions are spread around a bit, I would be tempted to put the description for the whole method in a docstring in
gauss_legendre.jl
.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.
Sounds good, that's where the main numerical heavy-lifting is done.