-
Notifications
You must be signed in to change notification settings - Fork 17
Iterators and Access functions for edges #1151
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
Conversation
- [x] Adds chunk edge iterator - [x] Adds tests for chunk edge iterator - [x] Adds edge intersection iterator - [x] Adds tests for edge intersection iterator - [x] Adds access functions for chunk field
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.
While I think the binary was-everything-hit-exactly-once test is fine for now, I think in the future, we may want to also check hit order -- though, that may be within the scope of tests post-assembly (do x
and z
match between self and coupled edge, etc.).
case specfem::mesh_entity::type::bottom: | ||
return { ispec, 0, ipoint }; | ||
break; | ||
case specfem::mesh_entity::type::top: | ||
return { ispec, num_points - 1, num_points - 1 - ipoint }; | ||
break; | ||
case specfem::mesh_entity::type::left: | ||
return { ispec, ipoint, 0 }; | ||
break; | ||
case specfem::mesh_entity::type::right: | ||
return { ispec, num_points - 1 - ipoint, num_points - 1 }; | ||
break; |
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.
break
statement's aren't needed after a return
, no?
Also, I guess this type of (edgetype, ipoint) -> (iz, ix)
mapping is fine absent weird element orientations since L/R and T/B are switched, but wouldn't you want to stick to strict clockwise or counterclockwise? What we have right now is
←
┌───┐
↑│ n │↓
└───┘
→
which would require no flipping (orientation reversal) for 90 degrees:
→ ←
┌───┐ ┌───┐
↓│ ᴝ │↑↑│ n │↓
└───┘ └───┘
← →
but 180 will always need to be flipped. If instead we stuck to clockwise or counterclockwise, the coupled iterator could handle the ipoint
flipping, since orientation reversal will always occur, killing the need for the edge.reverse_orientation
.
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.
LGTM, comments are at your own discretion
EdgeIteratorTestParams{ 1024, | ||
"ExactChunkSizeEdgeValues" })); | ||
|
||
INSTANTIATE_TEST_SUITE_P( |
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.
Beautiful!
"initialize_edges", | ||
Kokkos::RangePolicy<Kokkos::DefaultExecutionSpace>(0, number_of_edges), | ||
KOKKOS_CLASS_LAMBDA(const int i) { | ||
for (int j = 0; j < num_points; ++j) |
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.
same here
#1160 may fix unit-test |
- [x] Added `ENUM_ID` to enable strong type checking when checking tags within `FOR_EACH` macro. The macro `_CHECK_ENUM` performs the strong type checking when comparting 2 enums. - [x] Added edge definition macros to enable all types of edges
- [x] Updates mesh containers to hold connecting edges - [x] Adds weakly conforming connection to represent coupled interfaces - [x] Updates mesh reader - [x] Adds edge types container to sort edges for kernel computation
Create edge types to sort all edges with tags
Refactor `FOR_EACH` macro to incorporate interface tags
- [x] Updates coupled interfaces struct - [x] Adds several new point types (point edge index, point interface index, point coupled interface) - [x] Adds coupled interfaces 2 container which will replace current coupled interface container
- [x] New compute coupling kokkos kernel using ChunkEdgePolicy - [x] Media specific compute coupling (elastic-acoustic & acoustic-elastic) - [x] Adds unit-tests
Reimplement coupled interfaces using macros
Implements new kokkos kernel to compute coupling
- [x] Remove old coupled interfaces implementation - [x] Applied dirichlet boundary conditions
Update compute coupling calls
Co-authored-by: Lucas Sawade <[email protected]>
Co-authored-by: Lucas Sawade <[email protected]>
This reverts commit 55d2717.
Description
Issue Number
If there is an issue created for these changes, link it here
Checklist
Please make sure to check developer documentation on specfem docs.