-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Flatten integral domains in C++ #2225
Merged
Merged
Conversation
This file contains 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
jorgensd
requested review from
garth-wells,
chrisrichardson,
IgorBaratta and
jpdean
June 1, 2022 11:04
garth-wells
requested changes
Jun 4, 2022
garth-wells
requested changes
Jun 10, 2022
garth-wells
approved these changes
Jun 10, 2022
jorgensd
added a commit
to jorgensd/dolfinx_mpc
that referenced
this pull request
Jun 13, 2022
jorgensd
added a commit
to Wells-Group/asimov-custom-assemblers
that referenced
this pull request
Jun 13, 2022
Compatible with: FEniCS/dolfinx#2225
jorgensd
added a commit
to Wells-Group/asimov-custom-assemblers
that referenced
this pull request
Jun 13, 2022
* Flatten integration entities in C++ Compatible with: FEniCS/dolfinx#2225 * Bump version
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.
The current usage of
std::vector<std::int32_t>
,std::vector<std::pair<std::int32_t, int>>
,std::vector<std::tuple<std::int32_t, int,std::int32_t, int>
is overly complicated, when we always know the second dimension of the array when accessed.Additionally, the second int (referring to the local entity index for a facet) can be an
std::int32_t
without adding any new assumptions to the code.This pull request flattens the C++ layout of all these entities to
std::vector<std::int32_t>
.The Python interface still reshapes the data to be 1,2 or 3 dimensional.
This change also makes it easier to pass integral entities down to C++ for exterior libraries, as all the entities in DOLFINx has the same type.