Chi-Tech
lbts_sweepchunk_pwl.h
Go to the documentation of this file.
1#ifndef LBTS_SWEEPCHUNK_PWL_H
2#define LBTS_SWEEPCHUNK_PWL_H
3
5
7
9
10#include "Ca_DO_SteadyState/lbs_DO_steady_state.h"
12
13
14namespace lbs
15{
16//###################################################################
17/**Sweep chunk for cartesian PWLD discretization Theta-scheme timestepping.*/
19{
20protected:
21 const std::shared_ptr<chi_mesh::MeshContinuum> grid_view_;
23 const std::vector<UnitCellMatrices>& unit_cell_matrices_;
24 std::vector<lbs::CellLBSView>& grid_transport_view_;
25 const std::vector<double>& q_moments_;
27 const std::map<int, XSPtr>& xs_;
28 const int num_moments_;
29 const size_t num_groups_;
32
33 const std::vector<double>& psi_prev_;
34 const double theta_;
35 const double dt_;
36
37 //Runtime params
39 std::vector<std::vector<double>> Amat_;
40 std::vector<std::vector<double>> Atemp_;
41 std::vector<double> source_;
42
43
44public:
45 std::vector<std::vector<double>> b_;
46
48 std::shared_ptr<chi_mesh::MeshContinuum> grid_ptr,
49 chi_math::SpatialDiscretization& discretization,
50 const std::vector<UnitCellMatrices>& unit_cell_matrices,
51 std::vector<lbs::CellLBSView>& cell_transport_views,
52 std::vector<double>& destination_phi,
53 std::vector<double>& destination_psi,
54 const std::vector<double>& psi_prev_ref,
55 double input_theta,
56 double time_step,
57 const std::vector<double>& source_moments,
58 LBSGroupset& groupset,
59 const std::map<int, XSPtr>& xs,
60 int num_moments,
61 int max_num_cell_dofs);
62
63 void Sweep(chi_mesh::sweep_management::AngleSet* angle_set) override;
64
65
66 struct Upwinder
67 {
70 size_t spls_index;
76 uint64_t bndry_id;
78 uint64_t cell_local_id;
79 int f;
80 int gs_gi;
83
84 const double* GetUpwindPsi(int fj, bool local, bool boundary) const;
85 double* GetDownwindPsi(int fi,
86 bool local,
87 bool boundary,
88 bool reflecting_bndry) const;
89 };
90
91};
92}
93
94
95#endif //LBTS_SWEEPCHUNK_PWL_H
std::vector< double > * destination_psi
std::vector< double > * destination_phi
std::vector< std::vector< double > > Amat_
std::vector< std::vector< double > > Atemp_
std::vector< lbs::CellLBSView > & grid_transport_view_
const std::vector< double > & psi_prev_
void Sweep(chi_mesh::sweep_management::AngleSet *angle_set) override
std::vector< std::vector< double > > b_
chi_math::SpatialDiscretization & grid_fe_view_
const std::vector< UnitCellMatrices > & unit_cell_matrices_
const std::map< int, XSPtr > & xs_
const std::vector< double > & q_moments_
SweepChunkPWLTransientTheta(std::shared_ptr< chi_mesh::MeshContinuum > grid_ptr, chi_math::SpatialDiscretization &discretization, const std::vector< UnitCellMatrices > &unit_cell_matrices, std::vector< lbs::CellLBSView > &cell_transport_views, std::vector< double > &destination_phi, std::vector< double > &destination_psi, const std::vector< double > &psi_prev_ref, double input_theta, double time_step, const std::vector< double > &source_moments, LBSGroupset &groupset, const std::map< int, XSPtr > &xs, int num_moments, int max_num_cell_dofs)
const std::shared_ptr< chi_mesh::MeshContinuum > grid_view_
double * GetDownwindPsi(int fi, bool local, bool boundary, bool reflecting_bndry) const
chi_mesh::sweep_management::FLUDS & fluds
const double * GetUpwindPsi(int fj, bool local, bool boundary) const
chi_mesh::sweep_management::AngleSet * angle_set