Chi-Tech
mgd_02b_solve1g.cc
Go to the documentation of this file.
2#include "chi_runtime.h"
3#include "chi_log.h"
4
5//========================================================== Solve 1g problem
7 const int64_t verbose)
8{
9 if (verbose > 1) Chi::log.Log() << "Solving group: " << g;
10
11 KSPSetOperators(petsc_solver_.ksp, A_[g], A_[g]);
12 KSPSolve(petsc_solver_.ksp, b_, x_[g]);
13
14 // this is required to compute the inscattering RHS correctly in parallel
16
17 if (verbose > 1) Chi::log.Log() << "Done solving group " << g;
18}
19
20// cout << "FLUX ###################################################### FLUX\n";
21// cout << "FLUX ###################################################### FLUX\n";
22// VecView(x[g], PETSC_VIEWER_STDERR_WORLD);
23
static chi::ChiLog & log
Definition: chi_runtime.h:81
LogStream Log(LOG_LVL level=LOG_0)
Definition: chi_log.cc:35
std::vector< Vec > x_
std::vector< Mat > A_
chi_math::PETScUtils::PETScSolverSetup petsc_solver_
void SolveOneGroupProblem(unsigned int g, int64_t iverbose)