3#include "LinearBoltzmannSolvers/B_DO_Solver/IterativeMethods/sweep_wgs_context.h"
14 chi::log.Log() << TextName() <<
" Stepping with dt " <<
dt_;
18 for (
auto& groupset : groupsets_)
23 q_moments_local_.assign(q_moments_local_.size(), 0.0);
26 auto sweep_wgs_context_ptr =
27 std::make_shared<SweepWGSContext<Mat, Vec, KSP>>(
29 active_set_source_function_,
33 options_.verbose_inner_iterations,
49 if (
method == BackwardEuler) theta = 1.0;
50 else if (
method == CrankNicolson) theta = 0.5;
52 const double inv_theta = 1.0/theta;
54 auto& phi = phi_new_local_;
56 for (
size_t i = 0; i < phi.size(); ++i)
57 phi[i] = inv_theta*(phi[i] + (theta-1.0) * phi_prev[i]);
59 if (options_.use_precursors)
63 const double FR_new = ComputeFissionProduction(phi_new_local_);
69 snprintf(buff, 200,
" dt=%.1e time=%10.4g FR=%12.6g",
dt_,
time_ +
dt_, FR_new);
70 chi::log.Log() << TextName() << buff;
73 UpdateFieldFunctions();
static chi::MPI_Info & mpi
std::vector< double > phi_prev_local_
std::shared_ptr< SweepChunk > SetTransientSweepChunk(LBSGroupset &groupset)
chi_math::SteppingMethod method
struct lbs::DiscOrdTransientSolver::Options transient_options_
@ APPLY_AGS_FISSION_SOURCES
@ APPLY_WGS_FISSION_SOURCES
@ APPLY_WGS_SCATTER_SOURCES
@ APPLY_AGS_SCATTER_SOURCES