Chi-Tech
pi_keigen_00_constrdestr.cc
Go to the documentation of this file.
1#include "pi_keigen.h"
2
3#include "ChiObjectFactory.h"
4
5#include "chi_runtime.h"
6
7namespace lbs
8{
9
11
13{
16
18 "Generalized implementation of a k-Eigenvalue solver using Power "
19 "Iteration.");
20 params.SetDocGroup("LBSExecutors");
21
22 params.ChangeExistingParamToOptional("name", "XXPowerIterationKEigen");
23
24 params.AddRequiredParameter<size_t>("lbs_solver_handle",
25 "Handle to an existing lbs solver");
27 "max_iters", 1000, "Maximum power iterations allowed");
29 "k_tol", 1.0e-10, "Tolerance on the k-eigenvalue");
31 "reset_solution",
32 true,
33 "Flag, if set to true will initialize the phi-solution to all 1's before "
34 "executing");
35
37 "reinit_phi_1", true, "If true, reinitializes scalar phi fluxes to 1");
38
39 return params;
40}
41
43 const chi::InputParameters& params)
44 : chi_physics::Solver(params),
45 lbs_solver_(Chi::GetStackItem<LBSSolver>(
46 Chi::object_stack, params.GetParamValue<size_t>("lbs_solver_handle"))),
47 max_iters_(params.GetParamValue<size_t>("max_iters")),
48 k_tolerance_(params.GetParamValue<double>("k_tol")),
49 reinit_phi_1_(params.GetParamValue<bool>("reinit_phi_1")),
50
51 q_moments_local_(lbs_solver_.QMomentsLocal()),
52 phi_old_local_(lbs_solver_.PhiOldLocal()),
53 phi_new_local_(lbs_solver_.PhiNewLocal()),
54 groupsets_(lbs_solver_.Groupsets()),
55 front_gs_(groupsets_.front())
56{
57}
58
59} // namespace lbs
void SetDocGroup(const std::string &doc_group)
void AddRequiredParameter(const std::string &name, const std::string &doc_string)
void AddOptionalParameter(const std::string &name, T value, const std::string &doc_string)
void SetGeneralDescription(const std::string &description)
void ChangeExistingParamToOptional(const std::string &name, T value, const std::string &doc_string="")
static chi::InputParameters GetInputParameters()
Definition: chi_solver.cc:16
XXPowerIterationKEigen(const chi::InputParameters &params)
static chi::InputParameters GetInputParameters()
RegisterChiObject(lbs, DiffusionDFEMSolver)