• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Open-Sn / opensn / 21738357923

06 Feb 2026 02:45AM UTC coverage: 74.553% (+0.6%) from 73.983%
21738357923

push

github

web-flow
Merge pull request #921 from wdhawkins/update_quick_install_doc

Updating quick install instructions.

19363 of 25972 relevant lines covered (74.55%)

59700221.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.27
/modules/linear_boltzmann_solvers/lbs_problem/source_functions/transient_source_function.cc
1
// SPDX-FileCopyrightText: 2024 The OpenSn Authors <https://open-sn.github.io/opensn/>
2
// SPDX-License-Identifier: MIT
3

4
#include "modules/linear_boltzmann_solvers/lbs_problem/source_functions/transient_source_function.h"
5
#include "modules/linear_boltzmann_solvers/lbs_problem/lbs_problem.h"
6

7
namespace opensn
8
{
9

10
TransientSourceFunction::TransientSourceFunction(const LBSProblem& lbs_problem)
120✔
11
  : SourceFunction(lbs_problem), lbs_problem_(lbs_problem)
120✔
12
{
13
}
120✔
14

15
double
16
TransientSourceFunction::DelayedFission(const PrecursorList& precursors,
11,571,708✔
17
                                        const double& rho,
18
                                        const std::vector<double>& nu_delayed_sigma_f,
19
                                        const double* phi) const
20
{
21
  const double eff_dt = lbs_problem_.GetTheta() * lbs_problem_.GetTimeStep();
11,571,708✔
22

23
  double value = 0.0;
11,571,708✔
24
  if (apply_ags_fission_src_)
11,571,708✔
25
    for (size_t gp = first_grp_; gp <= last_grp_; ++gp)
23,188,816✔
26
      if (gp < gs_i_ or gp > gs_f_)
11,682,728✔
27
        for (const auto& precursor : precursors)
×
28
        {
29
          const double coeff = precursor.emission_spectrum[g_] * precursor.decay_constant /
×
30
                               (1.0 + eff_dt * precursor.decay_constant);
×
31

32
          value += coeff * eff_dt * precursor.fractional_yield * rho * nu_delayed_sigma_f[gp] *
×
33
                   phi[gp] / cell_volume_;
×
34
        }
35

36
  if (apply_wgs_fission_src_)
11,571,708✔
37
    for (size_t gp = gs_i_; gp <= gs_f_; ++gp)
23,188,816✔
38
      for (const auto& precursor : precursors)
25,566,544✔
39
      {
40
        const double coeff = precursor.emission_spectrum[g_] * precursor.decay_constant /
13,883,816✔
41
                             (1.0 + eff_dt * precursor.decay_constant);
13,883,816✔
42

43
        value += coeff * eff_dt * precursor.fractional_yield * rho * nu_delayed_sigma_f[gp] *
13,883,816✔
44
                 phi[gp] / cell_volume_;
13,883,816✔
45
      }
46

47
  return value;
11,571,708✔
48
}
49

50
} // namespace opensn
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc