Draft
Conversation
Field3DParallel enforces that parallel derivatives can be taken. This means for FCI, parallel fields are present. It also ensures that if an operation is taken on such a field, the parallel fields are retained. This replaces part of fci-automagic, that always retained parallel fields on operations.
dicts have been preserving order for several releases now.
Otherwise, the Field3DParallel is casted to Field3D and the wrong overloads are used
The communication was a no-op, as that did never calculate the parallel fields.
They should return Field3D, not Field3DParallel
This is needed for 2D metrics, and in this case we probably want to clear the parallel fields.
the functions where implemented, but not defined in the header
Otherwise `Field3DParallel(0.0)` fails, as it constructs a `Field3D` without parallel slices, and then fails as that cannot be converted to a `Field3DParallel`
Add unit test as well as fix
Contributor
Author
|
This needs https://github.com/boutproject/BOUT-dev/tree/par-metrics which needs boutproject/zoidberg#60 |
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.
A field that can be used to compute parallel derivatives. For FCI that means, it has parallel slices, and will preserve them.
Any Field3D can be turned into a Field3DParallel, if it has parallel slices. If not, it will raise a runtime error, as that is not known at compile time.
This can be used to preserve parallel slices, by turning a Field3D into a Field3DParallel:
fwill have parallel slices. If f2 or f3 do not have parallel slices, this will throw an error.