Merge FCI changes into next #2
Open
totork wants to merge 256 commits intototork:next-fcifrom
Open
Conversation
Use the new track feature (better name required) to dump the different components of the ddt() as well as the residuum for the evolved fields.
This keeps track of all the changes done to the field and stores them to a OptionsObject.
This keeps track of all the changes done to the field and stores them to a OptionsObject.
Useful for templates
gcc 9.4 is unable to correctly parse the construction for the function argument, if name.change is used directly. First making a copy seems to work around that issue.
When using FCI yup/down fields, each poloidal plane uses a different coordinate system. Quantities like J therefore can't be averaged between planes. Magnetic field strength is a scalar that can be interpolated, and is used here to calculate the divergence of a parallel flow.
Use Bxy rather than J on neighboring slices: B can be compared between slices, but J cannot (different coordinate system).
Each poloidal slice has a different coordinate system, so metrics can't be directly compared or averaged. Only Bxy and the parallel connection length (dy, g_22) make sense to calculate.
Don't calculate parallel slices in a derivative: The result is unlikely to be correct.
If the argument to `sqrt` has parallel slices, then the slices will be operated on and the result will have parallel slices. To avoid unnecessary work, discard slices before calling.
Returns a shallow copy without parallel slices. Enables user to avoid performing calculations on slices if not needed.
Always perform calculations in the yup/down slices if present in BOTH arguments. i.e. automagic always on for arithmetic operators. To avoid unnecessary work, use `withoutParallelSlices` to pass arguments without parallel slices.
Added comment to explain why it's ok to use the yup/down slices of the metric components if they are read from the grid file.
Iterated for `i < localmesh->ystart - abs_offset()` so when ystart is 1 and the boundary offset is 1, no boundary is applied.
Reverting some changes back to David's version.
Prefer to have consistent behavior so that code works and can be optimized without breaking. The field.withoutParallelSlices() method can be used to strip slices before calling an operation, if slices are not needed.
If the field has parallel slices, assign the value also to the slices.
applyParallelBoundary can be a no-op for non-fci
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.
No description provided.