Skip to content

Commit

Permalink
Merge pull request sxs-collaboration#6143 from nilsdeppe/add_threadin…
Browse files Browse the repository at this point in the history
…g_20

Enable nodegroups with LTS and compute correct hash for boundary data
  • Loading branch information
nilsdeppe authored Jul 10, 2024
2 parents c7cb5ac + 3b91e74 commit 6295030
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ bool receive_boundary_data_local_time_stepping(
evolution::dg::AtomicInboxBoundaryData<Dim>,
typename evolution::dg::Tags::
BoundaryCorrectionAndGhostCellsInbox<Dim>::type>) {
ERROR("LTS does not yet work with nodegroups");
// We only decrease the counter if we are done with the current time
// and we only decrease it by the number of neighbors at the current
// time.
Expand Down
2 changes: 1 addition & 1 deletion src/Evolution/DiscontinuousGalerkin/InboxTags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct BoundaryCorrectionAndGhostCellsInbox {
const DirectionalId<Dim>& neighbor_id = data.first;
// Note: This assumes the neighbor_id is oriented into our (the element
// whose inbox this is) frame.
const size_t neighbor_index = hash_value(neighbor_id);
const size_t neighbor_index = inbox->index(neighbor_id);
if (UNLIKELY(not gsl::at(inbox->boundary_data_in_directions, neighbor_index)
.try_emplace(time_step_id, std::move(data.second),
std::move(data.first)))) {
Expand Down
9 changes: 6 additions & 3 deletions tests/Unit/Helpers/Domain/Structure/NeighborHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ std::vector<SegmentId> valid_neighbor_segments(const SegmentId& segment_id);
std::vector<SegmentId> valid_neighbor_segments(const SegmentId& segment_id,
const FaceType face_type);

/// Valid Neighbors for an Element with `element_id` in the given `direction`
/// with the given `face_type`
/// \brief All valid neighbor configurations for an Element with `element_id` in
/// the given `direction` with the given `face_type`
///
/// \details FaceType needs to be passed in only if the Element abuts a Block
/// boundary in the given `direction`
/// boundary in the given `direction`3
///
/// The `generator` is used to assign a random orientation if the neighbor is
/// in a different block, i.e. `face_type == FaceType::Block`.
template <size_t Dim>
std::vector<Neighbors<Dim>> valid_neighbors(
gsl::not_null<std::mt19937*> generator, const ElementId<Dim>& element_id,
Expand Down

0 comments on commit 6295030

Please sign in to comment.