Chi-Tech
AngleSet.h
Go to the documentation of this file.
1#ifndef CHI_ANGLESET_H
2#define CHI_ANGLESET_H
3
4#include "mesh/chi_mesh.h"
8
9#include <chi_mpi.h>
10
12
13#include <memory>
14
16{
17
19{
20public:
21 typedef std::shared_ptr<SweepBndry> SweepBndryPtr;
22
23 AngleSet(size_t id, size_t num_groups, const SPDS& spds,
24 std::shared_ptr<FLUDS>& fluds,
25 const std::vector<size_t>& angle_indices,
26 std::map<uint64_t, SweepBndryPtr>& sim_boundaries,
27 size_t in_ref_subset);
28
29
30 size_t GetID() const;
31 const SPDS& GetSPDS() const;
32 FLUDS& GetFLUDS();
33 size_t GetRefGroupSubset() const;
34 const std::vector<size_t>& GetAngleIndices() const;
35 std::map<uint64_t, SweepBndryPtr>& GetBoundaries();
36
37 size_t GetNumGroups() const;
38 size_t GetNumAngles() const;
39
40
41 // Virtual methods
44
45 virtual int GetMaxBufferMessages() const = 0;
46
47 virtual void SetMaxBufferMessages(int new_max) = 0;
48
50 SweepChunk& sweep_chunk,
51 const std::vector<size_t>& timing_tags,
52 ExecutionPermission permission) = 0;
54 virtual void ResetSweepBuffers() = 0;
55 virtual bool ReceiveDelayedData() = 0;
56
57 virtual const double* PsiBndry(uint64_t bndry_map,
58 unsigned int angle_num,
59 uint64_t cell_local_id,
60 unsigned int face_num,
61 unsigned int fi,
62 int g,
63 size_t gs_ss_begin,
64 bool surface_source_active) = 0;
65 virtual double* ReflectingPsiOutBoundBndry(uint64_t bndry_map,
66 unsigned int angle_num,
67 uint64_t cell_local_id,
68 unsigned int face_num,
69 unsigned int fi,
70 size_t gs_ss_begin) = 0;
71
72 virtual ~AngleSet() = default;
73
74protected:
75 const size_t id_;
76 const size_t num_grps;
77 const SPDS& spds_;
78 std::shared_ptr<FLUDS> fluds_;
79 const std::vector<size_t> angles_;
80 std::map<uint64_t, SweepBndryPtr>& ref_boundaries_;
81 const size_t ref_group_subset_;
82
83 bool executed_ = false;
84};
85
86
87
88} // namespace chi_mesh::sweep_management
89
90#endif // CHI_ANGLESET_H
chi_mesh::sweep_management::SweepBoundary SweepBndry
Definition: AngleSet.h:11
std::map< uint64_t, SweepBndryPtr > & ref_boundaries_
Definition: AngleSet.h:80
std::map< uint64_t, SweepBndryPtr > & GetBoundaries()
Definition: AngleSet.cc:50
virtual 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)=0
virtual void SetMaxBufferMessages(int new_max)=0
virtual AngleSetStatus FlushSendBuffers()=0
std::shared_ptr< SweepBndry > SweepBndryPtr
Definition: AngleSet.h:21
std::shared_ptr< FLUDS > fluds_
Definition: AngleSet.h:78
virtual AngleSetStatus AngleSetAdvance(SweepChunk &sweep_chunk, const std::vector< size_t > &timing_tags, ExecutionPermission permission)=0
const std::vector< size_t > & GetAngleIndices() const
Definition: AngleSet.cc:46
virtual AsynchronousCommunicator * GetCommunicator()
Definition: AngleSet.cc:58
virtual void InitializeDelayedUpstreamData()=0
virtual int GetMaxBufferMessages() const =0
AngleSet(size_t id, size_t num_groups, const SPDS &spds, std::shared_ptr< FLUDS > &fluds, const std::vector< size_t > &angle_indices, std::map< uint64_t, SweepBndryPtr > &sim_boundaries, size_t in_ref_subset)
Definition: AngleSet.cc:10
virtual 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)=0
const std::vector< size_t > angles_
Definition: AngleSet.h:79
const SPDS & GetSPDS() const
Definition: AngleSet.cc:34