Chi-Tech
sweep_wgs_context.h
Go to the documentation of this file.
1#ifndef CHITECH_SWEEP_WGS_CONTEXT_H
2#define CHITECH_SWEEP_WGS_CONTEXT_H
3
5
8
10
11namespace lbs
12{
13
14template <class MatType, class VecType, class SolverType>
15struct SweepWGSContext : public WGSContext<MatType, VecType, SolverType>
16{
17 std::shared_ptr<chi_mesh::sweep_management::SweepChunk> sweep_chunk_;
19
21
23 DiscreteOrdinatesSolver& lbs_solver,
24 LBSGroupset& groupset,
25 const SetSourceFunction& set_source_function,
26 int lhs_scope,
27 int rhs_scope,
28 bool log_info,
29 std::shared_ptr<chi_mesh::sweep_management::SweepChunk> sweep_chunk)
30 : WGSContext<MatType, VecType, SolverType>(lbs_solver,
31 groupset,
32 set_source_function,
33 lhs_scope,
34 rhs_scope,
35 log_info),
36 sweep_chunk_(std::move(sweep_chunk)),
38 lbs_solver.SweepType() == "AAH"
39 ? chi_mesh::sweep_management::SchedulingAlgorithm::DEPTH_OF_GRAPH
40 : chi_mesh::sweep_management::SchedulingAlgorithm::FIRST_IN_FIRST_OUT,
41 *groupset.angle_agg_,
43 lbs_ss_solver_(lbs_solver)
44 {
45 }
46
47 void PreSetupCallback() override;
48
49 void SetPreconditioner(SolverType& solver) override;
50
51 std::pair<int64_t, int64_t> SystemSize() override;
52
53 void ApplyInverseTransportOperator(int scope) override;
54
55 void PostSolveCallback() override;
56};
57
58} // namespace lbs
59
60#endif // CHITECH_SWEEP_WGS_CONTEXT_H
SolverType
Definition: lbs_structs.h:27
std::function< void(LBSGroupset &groupset, std::vector< double > &destination_q, const std::vector< double > &phi, SourceFlags source_flags)> SetSourceFunction
Definition: lbs_structs.h:110
void ApplyInverseTransportOperator(int scope) override
void SetPreconditioner(SolverType &solver) override
std::pair< int64_t, int64_t > SystemSize() override
DiscreteOrdinatesSolver & lbs_ss_solver_
chi_mesh::sweep_management::SweepScheduler sweep_scheduler_
std::shared_ptr< chi_mesh::sweep_management::SweepChunk > sweep_chunk_
void PreSetupCallback() override
void PostSolveCallback() override
SweepWGSContext(DiscreteOrdinatesSolver &lbs_solver, LBSGroupset &groupset, const SetSourceFunction &set_source_function, int lhs_scope, int rhs_scope, bool log_info, std::shared_ptr< chi_mesh::sweep_management::SweepChunk > sweep_chunk)