Chi-Tech
CBC_AngleSet.h
Go to the documentation of this file.
1#ifndef CHITECH_CBC_ANGLESET_H
2#define CHITECH_CBC_ANGLESET_H
3
5#include "CBC_AsyncComm.h"
6
7namespace lbs
8{
9
10class CBC_SPDS;
11struct Task;
12
14{
15public:
16 CBC_AngleSet(size_t id,
17 size_t num_groups,
19 std::shared_ptr<chi_mesh::sweep_management::FLUDS>& fluds,
20 const std::vector<size_t>& angle_indices,
21 std::map<uint64_t, SweepBndryPtr>& sim_boundaries,
22 size_t in_ref_subset,
23 const chi::ChiMPICommunicatorSet& comm_set);
24
26 GetCommunicator() override;
28 int GetMaxBufferMessages() const override { return 0; }
29 void SetMaxBufferMessages(int new_max) override {}
30
33 const std::vector<size_t>& timing_tags,
35
37 {
38 const bool all_messages_sent = async_comm_.SendData();
39 return all_messages_sent
42 }
43 void ResetSweepBuffers() override;
44 bool ReceiveDelayedData() override { return true; }
45 const double* PsiBndry(uint64_t bndry_map,
46 unsigned int angle_num,
47 uint64_t cell_local_id,
48 unsigned int face_num,
49 unsigned int fi,
50 int g,
51 size_t gs_ss_begin,
52 bool surface_source_active) override;
53 double* ReflectingPsiOutBoundBndry(uint64_t bndry_map,
54 unsigned int angle_num,
55 uint64_t cell_local_id,
56 unsigned int face_num,
57 unsigned int fi,
58 size_t gs_ss_begin) override;
59
60protected:
62 std::vector<chi_mesh::sweep_management::Task> current_task_list_;
64};
65
66} // namespace lbs
67
68#endif // CHITECH_CBC_ANGLESET_H
void SetMaxBufferMessages(int new_max) override
Definition: CBC_AngleSet.h:29
CBC_AngleSet(size_t id, size_t num_groups, const chi_mesh::sweep_management::SPDS &spds, std::shared_ptr< chi_mesh::sweep_management::FLUDS > &fluds, const std::vector< size_t > &angle_indices, std::map< uint64_t, SweepBndryPtr > &sim_boundaries, size_t in_ref_subset, const chi::ChiMPICommunicatorSet &comm_set)
Definition: CBC_AngleSet.cc:15
double * ReflectingPsiOutBoundBndry(uint64_t bndry_map, unsigned int angle_num, uint64_t cell_local_id, unsigned int face_num, unsigned int fi, size_t gs_ss_begin) override
chi_mesh::sweep_management::AngleSetStatus FlushSendBuffers() override
Definition: CBC_AngleSet.h:36
void ResetSweepBuffers() override
CBC_ASynchronousCommunicator async_comm_
Definition: CBC_AngleSet.h:63
int GetMaxBufferMessages() const override
Definition: CBC_AngleSet.h:28
void InitializeDelayedUpstreamData() override
Definition: CBC_AngleSet.h:27
bool ReceiveDelayedData() override
Definition: CBC_AngleSet.h:44
chi_mesh::sweep_management::AsynchronousCommunicator * GetCommunicator() override
Definition: CBC_AngleSet.cc:37
const double * PsiBndry(uint64_t bndry_map, unsigned int angle_num, uint64_t cell_local_id, unsigned int face_num, unsigned int fi, int g, size_t gs_ss_begin, bool surface_source_active) override
const CBC_SPDS & cbc_spds_
Definition: CBC_AngleSet.h:61
std::vector< chi_mesh::sweep_management::Task > current_task_list_
Definition: CBC_AngleSet.h:62
chi_mesh::sweep_management::AngleSetStatus AngleSetAdvance(chi_mesh::sweep_management::SweepChunk &sweep_chunk, const std::vector< size_t > &timing_tags, chi_mesh::sweep_management::ExecutionPermission permission) override
Definition: CBC_AngleSet.cc:43