Chi-Tech
CBC_FLUDS.h
Go to the documentation of this file.
1#ifndef CHITECH_CBC_FLUDS_H
2#define CHITECH_CBC_FLUDS_H
3
6
7#include <map>
8#include <functional>
9
10namespace chi_math
11{
12class UnknownManager;
13class SpatialDiscretization;
14} // namespace chi_math
15
16namespace chi_mesh
17{
18class Cell;
19}
20
21namespace lbs
22{
23
25{
26public:
27 CBC_FLUDS(size_t num_groups,
28 size_t num_angles,
29 const CBC_FLUDSCommonData& common_data,
30 std::vector<double>& local_psi_data,
31 const chi_math::UnknownManager& psi_uk_man,
33
35
36 const std::vector<double>& GetLocalUpwindDataBlock() const;
37
38 const double* GetLocalCellUpwindPsi(const std::vector<double>& psi_data_block,
39 const chi_mesh::Cell& cell);
40
41 const std::vector<double>& GetNonLocalUpwindData(uint64_t cell_global_id,
42 unsigned int face_id) const;
43
44 const double* GetNonLocalUpwindPsi(const std::vector<double>& psi_data,
45 unsigned int face_node_mapped,
46 unsigned int angle_set_index);
47
49 {
51 }
52 void ClearSendPsi() override {}
53 void AllocateInternalLocalPsi(size_t num_grps, size_t num_angles) override {}
54 void AllocateOutgoingPsi(size_t num_grps,
55 size_t num_angles,
56 size_t num_loc_sucs) override
57 {
58 }
59
60 void AllocateDelayedLocalPsi(size_t num_grps, size_t num_angles) override {}
61 void AllocatePrelocIOutgoingPsi(size_t num_grps,
62 size_t num_angles,
63 size_t num_loc_deps) override
64 {
65 }
67 size_t num_angles,
68 size_t num_loc_deps) override
69 {
70 }
71
72 std::vector<double>& DelayedLocalPsi() override { return delayed_local_psi_; }
73 std::vector<double>& DelayedLocalPsiOld() override
74 {
76 }
77
78 std::vector<std::vector<double>>& DeplocIOutgoingPsi() override
79 {
81 }
82
83 std::vector<std::vector<double>>& PrelocIOutgoingPsi() override
84 {
86 }
87
88 std::vector<std::vector<double>>& DelayedPrelocIOutgoingPsi() override
89 {
91 }
92 std::vector<std::vector<double>>& DelayedPrelocIOutgoingPsiOld() override
93 {
95 }
96
97 // cell_global_id
98 // face_id
99 typedef std::pair<uint64_t, unsigned int> CellFaceKey;
100
101 std::map<CellFaceKey, std::vector<double>>& DeplocsOutgoingMessages()
102 {
104 }
105
106private:
108 std::reference_wrapper<std::vector<double>> local_psi_data_;
111
112 std::vector<double> delayed_local_psi_;
113 std::vector<double> delayed_local_psi_old_;
114 std::vector<std::vector<double>> deplocI_outgoing_psi_;
115 std::vector<std::vector<double>> prelocI_outgoing_psi_;
116 std::vector<std::vector<double>> boundryI_incoming_psi_;
117
118 std::vector<std::vector<double>> delayed_prelocI_outgoing_psi_;
119 std::vector<std::vector<double>> delayed_prelocI_outgoing_psi_old_;
120
121 std::map<CellFaceKey, std::vector<double>> deplocs_outgoing_messages_;
122};
123
124} // namespace lbs
125
126#endif // CHITECH_CBC_FLUDS_H
std::vector< std::vector< double > > & DeplocIOutgoingPsi() override
Definition: CBC_FLUDS.h:78
CBC_FLUDS(size_t num_groups, size_t num_angles, const CBC_FLUDSCommonData &common_data, std::vector< double > &local_psi_data, const chi_math::UnknownManager &psi_uk_man, const chi_math::SpatialDiscretization &sdm)
Definition: CBC_FLUDS.cc:10
std::vector< std::vector< double > > delayed_prelocI_outgoing_psi_
Definition: CBC_FLUDS.h:118
const double * GetLocalCellUpwindPsi(const std::vector< double > &psi_data_block, const chi_mesh::Cell &cell)
Definition: CBC_FLUDS.cc:36
const std::vector< double > & GetNonLocalUpwindData(uint64_t cell_global_id, unsigned int face_id) const
Definition: CBC_FLUDS.cc:46
std::pair< uint64_t, unsigned int > CellFaceKey
Definition: CBC_FLUDS.h:99
void ClearSendPsi() override
Definition: CBC_FLUDS.h:52
std::vector< double > & DelayedLocalPsiOld() override
Definition: CBC_FLUDS.h:73
std::vector< std::vector< double > > & DelayedPrelocIOutgoingPsi() override
Definition: CBC_FLUDS.h:88
void AllocatePrelocIOutgoingPsi(size_t num_grps, size_t num_angles, size_t num_loc_deps) override
Definition: CBC_FLUDS.h:61
std::vector< std::vector< double > > & PrelocIOutgoingPsi() override
Definition: CBC_FLUDS.h:83
std::map< CellFaceKey, std::vector< double > > & DeplocsOutgoingMessages()
Definition: CBC_FLUDS.h:101
std::reference_wrapper< std::vector< double > > local_psi_data_
Definition: CBC_FLUDS.h:108
std::vector< double > delayed_local_psi_old_
Definition: CBC_FLUDS.h:113
void AllocateDelayedPrelocIOutgoingPsi(size_t num_grps, size_t num_angles, size_t num_loc_deps) override
Definition: CBC_FLUDS.h:66
std::vector< double > delayed_local_psi_
Definition: CBC_FLUDS.h:112
void AllocateOutgoingPsi(size_t num_grps, size_t num_angles, size_t num_loc_sucs) override
Definition: CBC_FLUDS.h:54
const chi_mesh::sweep_management::FLUDSCommonData & CommonData() const
Definition: CBC_FLUDS.cc:25
const std::vector< double > & GetLocalUpwindDataBlock() const
Definition: CBC_FLUDS.cc:30
const chi_math::SpatialDiscretization & sdm_
Definition: CBC_FLUDS.h:110
std::vector< std::vector< double > > delayed_prelocI_outgoing_psi_old_
Definition: CBC_FLUDS.h:119
void AllocateDelayedLocalPsi(size_t num_grps, size_t num_angles) override
Definition: CBC_FLUDS.h:60
std::map< CellFaceKey, std::vector< double > > deplocs_outgoing_messages_
Definition: CBC_FLUDS.h:121
void AllocateInternalLocalPsi(size_t num_grps, size_t num_angles) override
Definition: CBC_FLUDS.h:53
std::vector< std::vector< double > > prelocI_outgoing_psi_
Definition: CBC_FLUDS.h:115
std::vector< std::vector< double > > deplocI_outgoing_psi_
Definition: CBC_FLUDS.h:114
const chi_math::UnknownManager & psi_uk_man_
Definition: CBC_FLUDS.h:109
const CBC_FLUDSCommonData & common_data_
Definition: CBC_FLUDS.h:107
const double * GetNonLocalUpwindPsi(const std::vector< double > &psi_data, unsigned int face_node_mapped, unsigned int angle_set_index)
Definition: CBC_FLUDS.cc:53
std::vector< std::vector< double > > & DelayedPrelocIOutgoingPsiOld() override
Definition: CBC_FLUDS.h:92
void ClearLocalAndReceivePsi() override
Definition: CBC_FLUDS.h:48
std::vector< std::vector< double > > boundryI_incoming_psi_
Definition: CBC_FLUDS.h:116
std::vector< double > & DelayedLocalPsi() override
Definition: CBC_FLUDS.h:72