Open
Conversation
Create matrix representation of interpolation, saved in CSR format in the BOUT++ grid file.
dschwoerer
approved these changes
Mar 12, 2026
Collaborator
dschwoerer
left a comment
There was a problem hiding this comment.
This looks good, however that would require quite significant changes on the BOUT++ side as well.
Needed to enable correct calculation of divergence operator.
Renaming, some refactoring, more documentation, standard CSR output.
Collaborator
Author
|
Thanks @dschwoerer . BOUT++ changes in this PR: boutproject/BOUT-dev#3330 . |
In addition to following a field-line from cell center, follow a set of points distributed over each cell. Using Gauss-Legendre points to perform averaging over each cell.
Adds an option to trace multiple field lines per cell (default is 1). Uses Gauss-Legendre points. The resulting maps are used to calculate forward & backward matrices.
Collaborator
|
I think it might make sense to allow for multiple target BCs for one cell. That might also help with numerical stability, as you do not get such sharp transitions from "sees a target" to "does not see a target". boutproject/BOUT-dev#3308 would allow to implement this in BOUT++, without having to touch the physics code, if they use the new interface. I am also not sure that boutproject/BOUT-dev#3320 makes sense, if we start computing parallel slices on demand. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Define a matrix operation to calculate the forward and backward interpolation.
This enables matrices to be constructed that represent operators such as
Grad_parandDiv_par.