25 size_t num_anglesets = angleset_group.
AngleSets().size();
26 for (
size_t as = 0; as < num_anglesets; as++)
28 auto angleset = angleset_group.
AngleSets()[as];
36 for (
size_t level = 0; level < leveled_graph.size(); level++)
38 for (
size_t index = 0; index < leveled_graph[level].item_id.size();
41 if (leveled_graph[level].item_id[index] ==
Chi::mpi.location_id)
43 loc_depth =
static_cast<int>(leveled_graph.size() - level);
54 new_rule_vals.
set_index = as + q * num_anglesets;
56 const auto& omega = spds.Omega();
66 <<
"Location depth not found in Depth-Of-Graph algorithm.";
130 std::make_shared<chi::ChiLog::EventInfo>(std::string(
"Sweep initiated"));
136 bool finished =
false;
137 size_t scheduled_angleset = 0;
141 for (
auto& rule_value : rule_values_)
143 auto angleset = rule_value.angle_set;
153 Status status = angleset->AngleSetAdvance(sweep_chunk,
154 sweep_timing_events_tag_,
155 ExePerm::NO_EXEC_IF_READY);
160 if (status == Status::READY_TO_EXECUTE)
162 std::stringstream message_i;
163 message_i <<
"Angleset " << angleset->GetID() <<
" executed on location "
167 std::make_shared<chi::ChiLog::EventInfo>(message_i.str());
173 status = angleset->AngleSetAdvance(sweep_chunk,
174 sweep_timing_events_tag_,
177 std::stringstream message_f;
178 message_f <<
"Angleset " << angleset->GetID() <<
" finished on location "
182 std::make_shared<chi::ChiLog::EventInfo>(message_f.str());
188 scheduled_angleset++;
191 if (status != Status::FINISHED) finished =
false;
197 bool received_delayed_data =
false;
198 while (not received_delayed_data)
200 received_delayed_data =
true;
202 for (
auto& angle_set_group : angle_agg_.angle_set_groups)
203 for (
auto& angle_set : angle_set_group.AngleSets())
205 if (angle_set->FlushSendBuffers() == Status::MESSAGES_PENDING)
206 received_delayed_data =
false;
208 if (not angle_set->ReceiveDelayedData())
209 received_delayed_data =
false;
214 for (
auto& angle_set_group : angle_agg_.angle_set_groups)
215 for (
auto& angle_set : angle_set_group.AngleSets())
216 angle_set->ResetSweepBuffers();
218 for (
auto& [bid, bndry] : angle_agg_.sim_boundaries)
222 auto rbndry = std::static_pointer_cast<
static void Exit(int error_code)
static chi::MPI_Info & mpi
@ SINGLE_OCCURRENCE
Signals a single occurrence.
@ EVENT_BEGIN
Signals the begin of an event.
@ EVENT_END
Signals the end of an event.
void LogEvent(size_t ev_tag, EventType ev_type, const std::shared_ptr< EventInfo > &ev_info)
const int & location_id
Current process rank.
std::vector< AngleSetGroup > angle_set_groups
std::vector< std::shared_ptr< AngleSet > > & AngleSets()
void ResetAnglesReadyStatus()
const std::vector< STDG > & GetGlobalSweepPlanes() const
std::vector< RULE_VALUES > rule_values_
void ScheduleAlgoDOG(SweepChunk &sweep_chunk)
AngleAggregation & angle_agg_
@ REFLECTING
Reflecting boundary condition about a normal.
std::vector< TGSPO > TLEVELED_GRAPH