Chi-Tech
angleaggregation.h
Go to the documentation of this file.
1#ifndef CHI_ANGLEAGGREGATION_H
2#define CHI_ANGLEAGGREGATION_H
3
7
9
10#include <memory>
11
12//###################################################################
13/**Angle aggregation has to cater for running the 8 corners of a 3D
14 * partitioning, the 4 corners of a 2D partitioning (the latter 2 both being
15 * polar angle aggregation) as well as single angle aggregation.
16 *
17 * At the most fundamental level this manifests as a number of angle indices
18 * that share a SPDS, however SPDS do not have to be unique which allows
19 * the notion of polar angle sets.
20 * For single angle aggregation each SPDS is associated
21 * with a single angle index. For polar angle aggregation a single SPDS can
22 * have multiple indices associated with the same azimuthal angle but
23 * different polar angles. We call this manifestation a "AngleSet".
24 *
25 * The octant based separation is achieved via the notion of "AngleSetGroup"
26 * which will group angle sets for each quadrant or octant
27 * (depending on 2D or 3D).*/
29{
30public:
31 typedef std::shared_ptr<SweepBndry> SweepBndryPtr;
32public:
33 std::vector<AngleSetGroup> angle_set_groups;
34 std::map<uint64_t, SweepBndryPtr> sim_boundaries;
37 std::shared_ptr<chi_math::AngularQuadrature> quadrature=nullptr;
38
39private:
40 bool is_setup=false;
41 std::pair<size_t ,size_t> number_angular_unknowns;
43
44public:
46
47 AngleAggregation(const std::map<uint64_t, SweepBndryPtr>& in_sim_boundaries,
48 size_t in_number_of_groups,
49 size_t in_number_of_group_subsets,
50 std::shared_ptr<chi_math::AngularQuadrature>& in_quadrature,
52
53 bool IsSetup() const {return is_setup;}
54
55public:
58
60
61 std::pair<size_t,size_t> GetNumDelayedAngularDOFs();
62
63 void AppendNewDelayedAngularDOFsToArray(int64_t& index, double* x_ref);
64 void AppendOldDelayedAngularDOFsToArray(int64_t& index, double* x_ref);
65
66 void SetOldDelayedAngularDOFsFromArray(int64_t& index, const double* x_ref);
67 void SetNewDelayedAngularDOFsFromArray(int64_t& index, const double* x_ref);
68
69 std::vector<double> GetNewDelayedAngularDOFsAsSTLVector();
70 void SetNewDelayedAngularDOFsFromSTLVector(const std::vector<double>& stl_vector);
71
72 std::vector<double> GetOldDelayedAngularDOFsAsSTLVector();
73 void SetOldDelayedAngularDOFsFromSTLVector(const std::vector<double>& stl_vector);
74
77};
78
79
80#endif //CHI_ANGLEAGGREGATION_H
std::vector< AngleSetGroup > angle_set_groups
std::vector< double > GetOldDelayedAngularDOFsAsSTLVector()
void SetOldDelayedAngularDOFsFromArray(int64_t &index, const double *x_ref)
void SetOldDelayedAngularDOFsFromSTLVector(const std::vector< double > &stl_vector)
std::shared_ptr< chi_math::AngularQuadrature > quadrature
void AppendOldDelayedAngularDOFsToArray(int64_t &index, double *x_ref)
std::shared_ptr< SweepBndry > SweepBndryPtr
std::pair< size_t,size_t > number_angular_unknowns
std::vector< double > GetNewDelayedAngularDOFsAsSTLVector()
void SetNewDelayedAngularDOFsFromSTLVector(const std::vector< double > &stl_vector)
std::map< uint64_t, SweepBndryPtr > sim_boundaries
void AppendNewDelayedAngularDOFsToArray(int64_t &index, double *x_ref)
void SetNewDelayedAngularDOFsFromArray(int64_t &index, const double *x_ref)
AngleAggregation(const std::map< uint64_t, SweepBndryPtr > &in_sim_boundaries, size_t in_number_of_groups, size_t in_number_of_group_subsets, std::shared_ptr< chi_math::AngularQuadrature > &in_quadrature, chi_mesh::MeshContinuumPtr &in_grid)
std::pair< size_t, size_t > GetNumDelayedAngularDOFs()
std::shared_ptr< MeshContinuum > MeshContinuumPtr
Definition: chi_mesh.h:44