-
Notifications
You must be signed in to change notification settings - Fork 104
WIP: Tidying FCI implementation #3092
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
Draft
bendudson
wants to merge
19
commits into
fci-auto-with-debug-higher-order
Choose a base branch
from
fci-higher-order-tidy
base: fci-auto-with-debug-higher-order
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.
Draft
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d09d8f8
difops: Replace Div_par(Field3D, Field3D)
bendudson 81ee64e
Apply clang-format changes
bendudson 3a77437
Coordinates: Fix Div_par(f) for FCI
bendudson 1d78559
FCItransform: Only load some parallel metrics
bendudson e5834c1
DDY: Remove FCI_AUTOMAGIC calcParallelSlices
bendudson e058507
Field: Extend operations to calculate in parallel slices
bendudson a46a4f7
Field: Add withoutParallelSlices() method
bendudson cedeb2b
Apply clang-format changes
bendudson 0b976ec
field ops: Remove FCI_AUTOMAGIC flag
bendudson fd93d69
FCI parallel: Revert deletion of coordinate slices
bendudson 192d105
parallel_boundary_region: Fix ITER macro
bendudson 8d79e50
Apply clang-format changes
bendudson e23b104
Fixes for FCI: Load dy, improve errors, use J in Div_par
bendudson f169b8c
Apply clang-format changes
bendudson ce70d86
Remove FCI_AUTOMAGIC compile option
bendudson 3288808
Remove stray #endif
bendudson c840122
Field3D: Fix operator=(BoutReal)
bendudson 568ad42
applyParallelBoundary can be a no-op for non-fci
dschwoerer 90c4e6c
Merge pull request #3202 from boutproject/fci-higher-order-tidy-noop
dschwoerer 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 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
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
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -237,13 +237,23 @@ public: | |||||
| */ | ||||||
| void splitParallelSlices(); | ||||||
|
|
||||||
| /// Separate fields for yup and ydown, with memory allocated. Note: | ||||||
| /// After this the parallel slices will be allocated and unique, but | ||||||
| /// may contain uninitialised values. | ||||||
| void splitParallelSlicesAndAllocate(); | ||||||
|
|
||||||
| /*! | ||||||
| * Clear the parallel slices, yup and ydown | ||||||
| */ | ||||||
| void clearParallelSlices(); | ||||||
|
|
||||||
| /// Returns a shallow copy without parallel slices | ||||||
| Field3D withoutParallelSlices() const { | ||||||
| Field3D result{getMesh(), getLocation(), getDirections(), getRegionID()}; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would that not be more general:
Suggested change
|
||||||
| result.data = data; | ||||||
| return result; | ||||||
| } | ||||||
|
|
||||||
| /// Check if this field has yup and ydown fields | ||||||
| bool hasParallelSlices() const { | ||||||
| #if CHECK > 2 | ||||||
|
|
@@ -488,10 +498,11 @@ public: | |||||
| friend class Vector2D; | ||||||
|
|
||||||
| Field3D& calcParallelSlices(); | ||||||
| void allowParallelSlices([[maybe_unused]] bool allow) { | ||||||
| Field3D& allowParallelSlices([[maybe_unused]] bool allow) { | ||||||
| #if CHECK > 0 | ||||||
| allowCalcParallelSlices = allow; | ||||||
| #endif | ||||||
| return *this; | ||||||
| } | ||||||
|
|
||||||
| void applyBoundary(bool init = false) override; | ||||||
|
|
||||||
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
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
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
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
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
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.
but here we need a shifted region (at least for FCI) ...
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.
My thinking with this was that if we are operating over a given region of a field, then we also want to operate over all the yup/down fields connected to those points. Hence the region indices should be the same for yup/down. I guess you have a different model for how this should work?