Chi-Tech
lbs_01j_init_solver_schemes.cc
Go to the documentation of this file.
1#include "lbs_solver.h"
2
5
6#include "chi_runtime.h"
7#include "chi_log.h"
8
10{
11 Chi::log.Log() << "Initializing Solver schemes";
12
14
15 /*This default behavior covers the situation when no Across-GroupSet (AGS)
16 * solvers have been created for this solver.*/
17 ags_solvers_.clear();
18 //=========================================== Default AGS scheme
19 if (options_.ags_scheme.empty())
20 {
21 auto ags_context = std::make_shared<AGSContext<Mat,Vec,KSP>>(
22 *this, wgs_solvers_);
23
24 auto ags_solver = std::make_shared<AGSLinearSolver<Mat,Vec,KSP>>(
25 "richardson", ags_context,
26 groupsets_.front().id_, groupsets_.back().id_);
27 ags_solver->ToleranceOptions().maximum_iterations = 1;
28 ags_solver->SetVerbosity(options_.verbose_ags_iterations);
29
30 ags_solvers_.push_back(ags_solver);
31
33 }
34}
static chi::ChiLog & log
Definition: chi_runtime.h:81
LogStream Log(LOG_LVL level=LOG_0)
Definition: chi_log.cc:35
std::vector< AGSLinSolverPtr > ags_solvers_
Definition: lbs_solver.h:101
lbs::Options options_
Definition: lbs_solver.h:61
virtual void InitializeWGSSolvers()
Definition: lbs_solver.h:236
std::vector< LBSGroupset > groupsets_
Definition: lbs_solver.h:68
virtual void InitializeSolverSchemes()
std::vector< LinSolvePtr > wgs_solvers_
Definition: lbs_solver.h:102
AGSLinSolverPtr primary_ags_solver_
Definition: lbs_solver.h:103
bool verbose_ags_iterations
Definition: lbs_structs.h:144
std::vector< AGSSchemeEntry > ags_scheme
Definition: lbs_structs.h:156