Chi-Tech
pi_keigen_01_initialize.cc
Go to the documentation of this file.
1#include "pi_keigen.h"
2
4
6
7namespace lbs
8{
9
10// ##################################################################
11/**Initializer.*/
13{
15
18
19 for (auto& wgs_solver : lbs_solver_.GetWGSSolvers())
20 {
21 auto context = wgs_solver->GetContext();
22 auto wgs_context =
23 std::dynamic_pointer_cast<lbs::WGSContext<Mat, Vec, KSP>>(context);
24
25 ChiLogicalErrorIf(not wgs_context, ": Cast failed");
26
27 wgs_context->lhs_src_scope_ =
28 wgs_context->lhs_src_scope_ & (~APPLY_WGS_FISSION_SOURCES); // lhs_scope
29 wgs_context->rhs_src_scope_ =
30 wgs_context->rhs_src_scope_ & (~APPLY_AGS_FISSION_SOURCES); // rhs_scope
31 }
32
33 primary_ags_solver_->SetVerbosity(
35
38 std::dynamic_pointer_cast<lbs::WGSContext<Mat, Vec, KSP>>(
39 front_wgs_solver_->GetContext());
40
41 ChiLogicalErrorIf(not front_wgs_context_, ": Casting failure");
42
44}
45
46} // namespace lbs
#define ChiLogicalErrorIf(condition, message)
AGSLinSolverPtr GetPrimaryAGSSolver()
std::vector< LinSolvePtr > & GetWGSSolvers()
SetSourceFunction GetActiveSetSourceFunction() const
virtual void SetPhiVectorScalarValues(std::vector< double > &phi_vector, double value)
void Initialize() override
lbs::Options & Options()
std::shared_ptr< lbs::WGSContext< Mat, Vec, KSP > > front_wgs_context_
Definition: pi_keigen.h:26
std::shared_ptr< AGSLinearSolver< Mat, Vec, KSP > > primary_ags_solver_
Definition: pi_keigen.h:22
LBSGroupset & front_gs_
Definition: pi_keigen.h:24
lbs::SetSourceFunction active_set_source_function_
Definition: pi_keigen.h:23
std::shared_ptr< chi_math::LinearSolver< Mat, Vec, KSP > > front_wgs_solver_
Definition: pi_keigen.h:25
bool verbose_ags_iterations
Definition: lbs_structs.h:144