Skip to content

Field3DParallel#3320

Draft
dschwoerer wants to merge 57 commits intonextfrom
f3dparallel
Draft

Field3DParallel#3320
dschwoerer wants to merge 57 commits intonextfrom
f3dparallel

Conversation

@dschwoerer
Copy link
Contributor

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:

Field3D f = (f1.asField3DParallel() * f2) + f3;

f will have parallel slices. If f2 or f3 do not have parallel slices, this will throw an error.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 33. Check the log or trigger a new build to see more.

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`
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@dschwoerer dschwoerer marked this pull request as draft March 12, 2026 12:36
@dschwoerer dschwoerer marked this pull request as draft March 12, 2026 12:36
@dschwoerer
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant