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

openmc-dev / openmc / 32538508027

21 Aug 2026 11:53PM UTC coverage: 81.21% (-0.1%) from 81.333%
32538508027

Pull #3944

github

web-flow
Merge 4178feba5 into 86ceaad3c
Pull Request #3944: DNP drift (regular mesh only)

19038 of 27611 branches covered (68.95%)

Branch coverage included in aggregate %.

684 of 790 new or added lines in 20 files covered. (86.58%)

197 existing lines in 2 files now uncovered.

61023 of 70974 relevant lines covered (85.98%)

50356091.87 hits per line

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

77.11
/src/settings.cpp
1
#include "openmc/settings.h"
2
#include "openmc/random_ray/flat_source_domain.h"
3

4
#include <cmath>  // for ceil, pow
5
#include <limits> // for numeric_limits
6
#include <string>
7

8
#include <fmt/core.h>
9
#ifdef _OPENMP
10
#include <omp.h>
11
#endif
12

13
#include "openmc/capi.h"
14
#include "openmc/collision_track.h"
15
#include "openmc/constants.h"
16
#include "openmc/container_util.h"
17
#include "openmc/distribution.h"
18
#include "openmc/distribution_multi.h"
19
#include "openmc/distribution_spatial.h"
20
#include "openmc/eigenvalue.h"
21
#include "openmc/error.h"
22
#include "openmc/field.h"
23
#include "openmc/file_utils.h"
24
#include "openmc/mcpl_interface.h"
25
#include "openmc/mesh.h"
26
#include "openmc/message_passing.h"
27
#include "openmc/output.h"
28
#include "openmc/plot.h"
29
#include "openmc/random_lcg.h"
30
#include "openmc/random_ray/random_ray.h"
31
#include "openmc/reaction.h"
32
#include "openmc/simulation.h"
33
#include "openmc/source.h"
34
#include "openmc/string_utils.h"
35
#include "openmc/tallies/trigger.h"
36
#include "openmc/volume_calc.h"
37
#include "openmc/weight_windows.h"
38
#include "openmc/xml_interface.h"
39

40
namespace openmc {
41

42
//==============================================================================
43
// Global variables
44
//==============================================================================
45

46
namespace settings {
47

48
// Default values for boolean flags
49
bool assume_separate {false};
50
bool check_overlaps {false};
51
bool collision_track {false};
52
bool cmfd_run {false};
53
bool confidence_intervals {false};
54
bool create_delayed_neutrons {true};
55
bool create_fission_neutrons {true};
56
bool delayed_photon_scaling {true};
57
bool dnp_drift_on {false};
58
bool entropy_on {false};
59
bool event_based {false};
60
bool ifp_on {false};
61
bool legendre_to_tabular {true};
62
bool material_cell_offsets {true};
63
bool output_summary {true};
64
bool output_tallies {true};
65
bool particle_restart_run {false};
66
bool photon_transport {false};
67
bool atomic_relaxation {true};
68
bool reduce_tallies {true};
69
bool res_scat_on {false};
70
bool restart_run {false};
71
bool run_CE {true};
72
bool source_latest {false};
73
bool source_separate {false};
74
bool source_write {true};
75
bool source_mcpl_write {false};
76
bool surf_source_write {false};
77
bool surf_mcpl_write {false};
78
bool surf_source_read {false};
79
bool survival_biasing {false};
80
bool survival_normalization {false};
81
bool temperature_field_on {false};
82
bool temperature_multipole {false};
83
bool trigger_on {false};
84
bool trigger_predict {false};
85
bool uniform_source_sampling {false};
86
bool ufs_on {false};
87
bool urr_ptables_on {true};
88
bool use_decay_photons {false};
89
bool use_shared_secondary_bank {false};
90
bool weight_windows_on {false};
91
bool weight_window_checkpoint_surface {false};
92
bool weight_window_checkpoint_collision {true};
93
bool write_all_tracks {false};
94
bool write_initial_source {false};
95

96
std::string path_cross_sections;
97
std::string path_input;
98
std::string path_output;
99
std::string path_particle_restart;
100
std::string path_sourcepoint;
101
std::string path_statepoint;
102
const char* path_statepoint_c {path_statepoint.c_str()};
103
std::string weight_windows_file;
104
std::string properties_file;
105

106
int32_t n_inactive {0};
107
int32_t max_lost_particles {10};
108
double rel_max_lost_particles {1.0e-6};
109
int32_t max_write_lost_particles {-1};
110
int32_t gen_per_batch {1};
111
int64_t n_particles {-1};
112

113
int64_t max_particles_in_flight {100000};
114
int max_particle_events {1000000};
115

116
ElectronTreatment electron_treatment {ElectronTreatment::TTB};
117
array<double, 4> energy_cutoff {0.0, 1000.0, 0.0, 0.0};
118
array<double, 4> time_cutoff {INFTY, INFTY, INFTY, INFTY};
119
int ifp_n_generation {-1};
120
IFPParameter ifp_parameter {IFPParameter::None};
121
int legendre_to_tabular_points {C_NONE};
122
int max_order {0};
123
int n_log_bins {8000};
124
int n_batches;
125
int n_max_batches;
126
int max_secondaries {10000};
127
int max_history_splits {10'000'000};
128
int max_tracks {1000};
129
ResScatMethod res_scat_method {ResScatMethod::rvs};
130
double res_scat_energy_min {0.01};
131
double res_scat_energy_max {1000.0};
132
vector<std::string> res_scat_nuclides;
133
RunMode run_mode {RunMode::UNSET};
134
SolverType solver_type {SolverType::MONTE_CARLO};
135
std::unordered_set<int> sourcepoint_batch;
136
std::unordered_set<int> statepoint_batch;
137
double source_rejection_fraction {0.05};
138
double free_gas_threshold {400.0};
139
std::unordered_set<int> source_write_surf_id;
140
CollisionTrackConfig collision_track_config {};
141
int64_t ssw_max_particles;
142
int64_t ssw_max_files;
143
int64_t ssw_cell_id {C_NONE};
144
SSWCellType ssw_cell_type {SSWCellType::None};
145
double surface_grazing_cutoff {0.001};
146
double surface_grazing_ratio {0.5};
147
TemperatureMethod temperature_method {TemperatureMethod::NEAREST};
148
double temperature_tolerance {10.0};
149
double temperature_default {293.6};
150
array<double, 2> temperature_range {0.0, 0.0};
151
int trace_batch;
152
int trace_gen;
153
int64_t trace_particle;
154
vector<array<int, 3>> track_identifiers;
155
int trigger_batch_interval {1};
156
int verbosity {-1};
157
double weight_cutoff {0.25};
158
double weight_survive {1.0};
159

160
double dnp_drift_external_travel_time {0.0};
161
bool dnp_drift_recycling_on {false};
162

163
} // namespace settings
164

165
//==============================================================================
166
// Functions
167
//==============================================================================
168

169
void get_run_parameters(pugi::xml_node node_base)
8,404✔
170
{
171
  using namespace settings;
8,404✔
172
  using namespace pugi;
8,404✔
173

174
  // Check number of particles
175
  if (!check_for_node(node_base, "particles")) {
8,404!
176
    fatal_error("Need to specify number of particles.");
×
177
  }
178

179
  // Get number of particles if it wasn't specified as a command-line argument
180
  if (n_particles == -1) {
8,404✔
181
    n_particles = std::stoll(get_node_value(node_base, "particles"));
8,360✔
182
  }
183

184
  // Get maximum number of in flight particles for event-based mode
185
  if (check_for_node(node_base, "max_particles_in_flight")) {
8,404!
186
    max_particles_in_flight =
×
187
      std::stoll(get_node_value(node_base, "max_particles_in_flight"));
×
188
  }
189

190
  // Get maximum number of events allowed per particle
191
  if (check_for_node(node_base, "max_particle_events")) {
8,404!
192
    max_particle_events =
×
193
      std::stoll(get_node_value(node_base, "max_particle_events"));
×
194
  }
195

196
  // Get number of basic batches
197
  if (check_for_node(node_base, "batches")) {
8,404!
198
    n_batches = std::stoi(get_node_value(node_base, "batches"));
8,404✔
199
  }
200
  if (!trigger_on)
8,404✔
201
    n_max_batches = n_batches;
8,263✔
202

203
  // Get max number of lost particles
204
  if (check_for_node(node_base, "max_lost_particles")) {
8,404✔
205
    max_lost_particles =
92✔
206
      std::stoi(get_node_value(node_base, "max_lost_particles"));
46✔
207
  }
208

209
  // Get relative number of lost particles
210
  if (check_for_node(node_base, "rel_max_lost_particles")) {
8,404!
211
    rel_max_lost_particles =
×
212
      std::stod(get_node_value(node_base, "rel_max_lost_particles"));
×
213
  }
214

215
  // Get relative number of lost particles
216
  if (check_for_node(node_base, "max_write_lost_particles")) {
8,404✔
217
    max_write_lost_particles =
30✔
218
      std::stoi(get_node_value(node_base, "max_write_lost_particles"));
15✔
219
  }
220

221
  // Get number of inactive batches
222
  if (run_mode == RunMode::EIGENVALUE ||
8,404✔
223
      solver_type == SolverType::RANDOM_RAY) {
3,464✔
224
    if (check_for_node(node_base, "inactive")) {
5,398✔
225
      n_inactive = std::stoi(get_node_value(node_base, "inactive"));
4,911✔
226
    }
227
    if (check_for_node(node_base, "generations_per_batch")) {
5,398✔
228
      gen_per_batch =
30✔
229
        std::stoi(get_node_value(node_base, "generations_per_batch"));
15✔
230
    }
231

232
    // Preallocate space for keff and entropy by generation
233
    int m = settings::n_max_batches * settings::gen_per_batch;
5,398✔
234
    simulation::k_generation.reserve(m);
5,398✔
235
    simulation::entropy.reserve(m);
5,398✔
236

237
    // Get the trigger information for keff
238
    if (check_for_node(node_base, "keff_trigger")) {
5,398✔
239
      xml_node node_keff_trigger = node_base.child("keff_trigger");
101✔
240

241
      if (check_for_node(node_keff_trigger, "type")) {
101!
242
        auto temp = get_node_value(node_keff_trigger, "type", true, true);
101✔
243
        if (temp == "std_dev") {
101!
244
          keff_trigger.metric = TriggerMetric::standard_deviation;
101✔
245
        } else if (temp == "variance") {
×
246
          keff_trigger.metric = TriggerMetric::variance;
×
247
        } else if (temp == "rel_err") {
×
248
          keff_trigger.metric = TriggerMetric::relative_error;
×
249
        } else {
250
          fatal_error("Unrecognized keff trigger type " + temp);
×
251
        }
252
      } else {
×
253
        fatal_error("Specify keff trigger type in settings XML");
×
254
      }
255

256
      if (check_for_node(node_keff_trigger, "threshold")) {
101!
257
        keff_trigger.threshold =
202✔
258
          std::stod(get_node_value(node_keff_trigger, "threshold"));
202✔
259
        if (keff_trigger.threshold <= 0) {
101!
260
          fatal_error("keff trigger threshold must be positive");
×
261
        }
262
      } else {
263
        fatal_error("Specify keff trigger threshold in settings XML");
×
264
      }
265
    }
266
  }
267

268
  // Random ray variables
269
  if (solver_type == SolverType::RANDOM_RAY) {
8,404✔
270
    xml_node random_ray_node = node_base.child("random_ray");
814✔
271
    if (check_for_node(random_ray_node, "distance_active")) {
814!
272
      RandomRay::distance_active_ =
1,628✔
273
        std::stod(get_node_value(random_ray_node, "distance_active"));
1,628✔
274
      if (RandomRay::distance_active_ <= 0.0) {
814!
275
        fatal_error("Random ray active distance must be greater than 0");
×
276
      }
277
    } else {
278
      fatal_error("Specify random ray active distance in settings XML");
×
279
    }
280
    if (check_for_node(random_ray_node, "distance_inactive")) {
814!
281
      RandomRay::distance_inactive_ =
1,628✔
282
        std::stod(get_node_value(random_ray_node, "distance_inactive"));
1,628✔
283
      if (RandomRay::distance_inactive_ < 0) {
814!
284
        fatal_error(
×
285
          "Random ray inactive distance must be greater than or equal to 0");
286
      }
287
    } else {
288
      fatal_error("Specify random ray inactive distance in settings XML");
×
289
    }
290
    if (check_for_node(random_ray_node, "ray_source")) {
814!
291
      xml_node ray_source_node = random_ray_node.child("ray_source");
814✔
292
      xml_node source_node = ray_source_node.child("source");
814✔
293
      // Get point to list of <source> elements and make sure there is at least
294
      // one
295
      RandomRay::ray_source_ = Source::create(source_node);
1,628✔
296
    } else {
297
      fatal_error("Specify random ray source in settings XML");
×
298
    }
299
    if (check_for_node(random_ray_node, "volume_estimator")) {
814✔
300
      std::string temp_str =
173✔
301
        get_node_value(random_ray_node, "volume_estimator", true, true);
173✔
302
      if (temp_str == "simulation_averaged") {
173✔
303
        FlatSourceDomain::volume_estimator_ =
30✔
304
          RandomRayVolumeEstimator::SIMULATION_AVERAGED;
305
      } else if (temp_str == "naive") {
143✔
306
        FlatSourceDomain::volume_estimator_ = RandomRayVolumeEstimator::NAIVE;
91✔
307
      } else if (temp_str == "hybrid") {
52!
308
        FlatSourceDomain::volume_estimator_ = RandomRayVolumeEstimator::HYBRID;
52✔
309
      } else {
310
        fatal_error("Unrecognized volume estimator: " + temp_str);
×
311
      }
312
    }
173✔
313
    if (check_for_node(random_ray_node, "source_shape")) {
814✔
314
      std::string temp_str =
472✔
315
        get_node_value(random_ray_node, "source_shape", true, true);
472✔
316
      if (temp_str == "flat") {
472✔
317
        RandomRay::source_shape_ = RandomRaySourceShape::FLAT;
97✔
318
      } else if (temp_str == "linear") {
375✔
319
        RandomRay::source_shape_ = RandomRaySourceShape::LINEAR;
330✔
320
      } else if (temp_str == "linear_xy") {
45!
321
        RandomRay::source_shape_ = RandomRaySourceShape::LINEAR_XY;
45✔
322
      } else {
323
        fatal_error("Unrecognized source shape: " + temp_str);
×
324
      }
325
    }
472✔
326
    if (check_for_node(random_ray_node, "volume_normalized_flux_tallies")) {
814✔
327
      FlatSourceDomain::volume_normalized_flux_tallies_ =
551✔
328
        get_node_value_bool(random_ray_node, "volume_normalized_flux_tallies");
551✔
329
    }
330
    if (check_for_node(random_ray_node, "adjoint")) {
814✔
331
      FlatSourceDomain::adjoint_requested_ =
45✔
332
        get_node_value_bool(random_ray_node, "adjoint");
45✔
333
    }
334
    if (check_for_node(random_ray_node, "sample_method")) {
814✔
335
      std::string temp_str =
52✔
336
        get_node_value(random_ray_node, "sample_method", true, true);
52✔
337
      if (temp_str == "prng") {
52!
338
        RandomRay::sample_method_ = RandomRaySampleMethod::PRNG;
×
339
      } else if (temp_str == "halton") {
52✔
340
        RandomRay::sample_method_ = RandomRaySampleMethod::HALTON;
37✔
341
      } else if (temp_str == "s2") {
15!
342
        RandomRay::sample_method_ = RandomRaySampleMethod::S2;
15✔
343
      } else {
344
        fatal_error("Unrecognized sample method: " + temp_str);
×
345
      }
346
    }
52✔
347
    if (check_for_node(random_ray_node, "source_region_meshes")) {
814✔
348
      pugi::xml_node node_source_region_meshes =
368✔
349
        random_ray_node.child("source_region_meshes");
368✔
350
      for (pugi::xml_node node_mesh :
796✔
351
        node_source_region_meshes.children("mesh")) {
796✔
352
        int mesh_id = std::stoi(node_mesh.attribute("id").value());
856✔
353
        for (pugi::xml_node node_domain : node_mesh.children("domain")) {
856✔
354
          int domain_id = std::stoi(node_domain.attribute("id").value());
856✔
355
          std::string domain_type = node_domain.attribute("type").value();
428✔
356
          Source::DomainType type;
428✔
357
          if (domain_type == "material") {
428✔
358
            type = Source::DomainType::MATERIAL;
30✔
359
          } else if (domain_type == "cell") {
398✔
360
            type = Source::DomainType::CELL;
30✔
361
          } else if (domain_type == "universe") {
368!
362
            type = Source::DomainType::UNIVERSE;
368✔
363
          } else {
364
            throw std::runtime_error("Unknown domain type: " + domain_type);
×
365
          }
366
          FlatSourceDomain::mesh_domain_map_[mesh_id].emplace_back(
428✔
367
            type, domain_id);
368
        }
428✔
369
      }
370
    }
371
    if (check_for_node(random_ray_node, "diagonal_stabilization_rho")) {
814✔
372
      FlatSourceDomain::diagonal_stabilization_rho_ = std::stod(
15✔
373
        get_node_value(random_ray_node, "diagonal_stabilization_rho"));
15✔
374
      if (FlatSourceDomain::diagonal_stabilization_rho_ < 0.0 ||
15!
375
          FlatSourceDomain::diagonal_stabilization_rho_ > 1.0) {
376
        fatal_error("Random ray diagonal stabilization rho factor must be "
×
377
                    "between 0 and 1");
378
      }
379
    }
380
    if (check_for_node(random_ray_node, "adjoint_source")) {
814✔
381
      pugi::xml_node adj_source_node = random_ray_node.child("adjoint_source");
15✔
382
      for (pugi::xml_node source_node : adj_source_node.children("source")) {
30✔
383
        // Find any local adjoint sources
384
        model::adjoint_sources.push_back(Source::create(source_node));
30✔
385
      }
386
    }
387
  }
388
}
8,404✔
389

390
void read_settings_xml()
1,423✔
391
{
392
  using namespace settings;
1,423✔
393
  using namespace pugi;
1,423✔
394
  // Check if settings.xml exists
395
  std::string filename = settings::path_input + "settings.xml";
1,423✔
396
  if (!file_exists(filename)) {
1,423✔
397
    if (run_mode != RunMode::PLOTTING) {
22!
398
      fatal_error("Could not find any XML input files! In order to run OpenMC, "
×
399
                  "you first need a set of input files; at a minimum, this "
400
                  "includes settings.xml, geometry.xml, and materials.xml or a "
401
                  "single model XML file. Please consult the user's guide at "
402
                  "https://docs.openmc.org for further information.");
403
    } else {
404
      // The settings.xml file is optional if we just want to make a plot.
405
      return;
22✔
406
    }
407
  }
408

409
  // Parse settings.xml file
410
  xml_document doc;
1,401✔
411
  auto result = doc.load_file(filename.c_str());
1,401✔
412
  if (!result) {
1,401!
413
    fatal_error("Error processing settings.xml file.");
×
414
  }
415

416
  // Get root element
417
  xml_node root = doc.document_element();
1,401✔
418

419
  // Verbosity
420
  if (check_for_node(root, "verbosity") && verbosity == -1) {
1,401!
421
    verbosity = std::stoi(get_node_value(root, "verbosity"));
428✔
422
  } else if (verbosity == -1) {
1,187!
423
    verbosity = 7;
1,187✔
424
  }
425

426
  // To this point, we haven't displayed any output since we didn't know what
427
  // the verbosity is. Now that we checked for it, show the title if necessary
428
  if (mpi::master) {
1,401✔
429
    if (verbosity >= 2)
1,213✔
430
      title();
1,007✔
431
  }
432

433
  write_message("Reading settings XML file...", 5);
1,401✔
434

435
  read_settings_xml(root);
1,401✔
436
}
1,413✔
437

438
void read_settings_xml(pugi::xml_node root)
9,399✔
439
{
440
  using namespace settings;
9,399✔
441
  using namespace pugi;
9,399✔
442

443
  // Find if a multi-group or continuous-energy simulation is desired
444
  if (check_for_node(root, "energy_mode")) {
9,399✔
445
    std::string temp_str = get_node_value(root, "energy_mode", true, true);
1,379✔
446
    if (temp_str == "mg" || temp_str == "multi-group") {
2,758!
447
      run_CE = false;
1,379✔
448
    } else if (temp_str == "ce" || temp_str == "continuous-energy") {
×
449
      run_CE = true;
×
450
    }
451
  }
1,379✔
452

453
  // Check for user meshes and allocate
454
  read_meshes(root);
9,399✔
455

456
  // Look for deprecated cross_sections.xml file in settings.xml
457
  if (check_for_node(root, "cross_sections")) {
9,399!
458
    warning(
×
459
      "Setting cross_sections in settings.xml has been deprecated."
460
      " The cross_sections are now set in materials.xml and the "
461
      "cross_sections input to materials.xml and the OPENMC_CROSS_SECTIONS"
462
      " environment variable will take precendent over setting "
463
      "cross_sections in settings.xml.");
464
    path_cross_sections = get_node_value(root, "cross_sections");
×
465
  }
466

467
  if (!run_CE) {
9,399✔
468
    // Scattering Treatments
469
    if (check_for_node(root, "max_order")) {
1,379✔
470
      max_order = std::stoi(get_node_value(root, "max_order"));
30✔
471
    } else {
472
      // Set to default of largest int - 1, which means to use whatever is
473
      // contained in library. This is largest int - 1 because for legendre
474
      // scattering, a value of 1 is added to the order; adding 1 to the largest
475
      // int gets you the largest negative integer, which is not what we want.
476
      max_order = std::numeric_limits<int>::max() - 1;
1,364✔
477
    }
478
  }
479

480
  // Check for a trigger node and get trigger information
481
  if (check_for_node(root, "trigger")) {
9,399✔
482
    xml_node node_trigger = root.child("trigger");
156✔
483

484
    // Check if trigger(s) are to be turned on
485
    trigger_on = get_node_value_bool(node_trigger, "active");
156✔
486

487
    if (trigger_on) {
156✔
488
      if (check_for_node(node_trigger, "max_batches")) {
141!
489
        n_max_batches = std::stoi(get_node_value(node_trigger, "max_batches"));
282✔
490
      } else {
491
        fatal_error("<max_batches> must be specified with triggers");
×
492
      }
493

494
      // Get the batch interval to check triggers
495
      if (!check_for_node(node_trigger, "batch_interval")) {
141✔
496
        trigger_predict = true;
15✔
497
      } else {
498
        trigger_batch_interval =
252✔
499
          std::stoi(get_node_value(node_trigger, "batch_interval"));
252✔
500
        if (trigger_batch_interval <= 0) {
126!
501
          fatal_error("Trigger batch interval must be greater than zero");
×
502
        }
503
      }
504
    }
505
  }
506

507
  // Check run mode if it hasn't been set from the command line
508
  xml_node node_mode;
9,399✔
509
  if (run_mode == RunMode::UNSET) {
9,399✔
510
    if (check_for_node(root, "run_mode")) {
8,436✔
511
      std::string temp_str = get_node_value(root, "run_mode", true, true);
8,406✔
512
      if (temp_str == "eigenvalue") {
8,406✔
513
        run_mode = RunMode::EIGENVALUE;
4,910✔
514
      } else if (temp_str == "fixed source") {
3,496✔
515
        run_mode = RunMode::FIXED_SOURCE;
3,464✔
516
      } else if (temp_str == "plot") {
32!
517
        run_mode = RunMode::PLOTTING;
×
518
      } else if (temp_str == "particle restart") {
32!
519
        run_mode = RunMode::PARTICLE;
×
520
      } else if (temp_str == "volume") {
32!
521
        run_mode = RunMode::VOLUME;
32✔
522
      } else {
523
        fatal_error("Unrecognized run mode: " + temp_str);
×
524
      }
525

526
      // Assume XML specifies <particles>, <batches>, etc. directly
527
      node_mode = root;
8,406✔
528
    } else {
8,406✔
529
      warning("<run_mode> should be specified.");
30✔
530

531
      // Make sure that either eigenvalue or fixed source was specified
532
      node_mode = root.child("eigenvalue");
30✔
533
      if (node_mode) {
30!
534
        run_mode = RunMode::EIGENVALUE;
30✔
535
      } else {
536
        node_mode = root.child("fixed_source");
×
537
        if (node_mode) {
×
538
          run_mode = RunMode::FIXED_SOURCE;
×
539
        } else {
540
          fatal_error("<eigenvalue> or <fixed_source> not specified.");
×
541
        }
542
      }
543
    }
544
  }
545

546
  // Check solver type
547
  if (check_for_node(root, "random_ray")) {
9,399✔
548
    solver_type = SolverType::RANDOM_RAY;
814✔
549
    if (run_CE)
814!
550
      fatal_error("multi-group energy mode must be specified in settings XML "
×
551
                  "when using the random ray solver.");
552
  }
553

554
  if (run_mode == RunMode::EIGENVALUE || run_mode == RunMode::FIXED_SOURCE) {
9,399✔
555
    // Read run parameters
556
    get_run_parameters(node_mode);
8,404✔
557

558
    // Check number of active batches, inactive batches, max lost particles and
559
    // particles
560
    if (n_batches <= n_inactive) {
8,404!
561
      fatal_error("Number of active batches must be greater than zero.");
×
562
    } else if (n_inactive < 0) {
8,404!
563
      fatal_error("Number of inactive batches must be non-negative.");
×
564
    } else if (n_particles <= 0) {
8,404!
565
      fatal_error("Number of particles must be greater than zero.");
×
566
    } else if (max_lost_particles <= 0) {
8,404!
567
      fatal_error("Number of max lost particles must be greater than zero.");
×
568
    } else if (rel_max_lost_particles <= 0.0 || rel_max_lost_particles >= 1.0) {
8,404!
569
      fatal_error("Relative max lost particles must be between zero and one.");
×
570
    }
571

572
    // Check for user value for the number of generation of the Iterated Fission
573
    // Probability (IFP) method
574
    if (check_for_node(root, "ifp_n_generation")) {
8,404✔
575
      ifp_n_generation = std::stoi(get_node_value(root, "ifp_n_generation"));
166✔
576
      if (ifp_n_generation <= 0) {
83!
577
        fatal_error("'ifp_n_generation' must be greater than 0.");
×
578
      }
579
      // Avoid tallying 0 if IFP logs are not complete when active cycles start
580
      if (ifp_n_generation > n_inactive) {
83✔
581
        fatal_error("'ifp_n_generation' must be lower than or equal to the "
9✔
582
                    "number of inactive cycles.");
583
      }
584
    }
585
  }
586

587
  // Copy plotting random number seed if specified
588
  if (check_for_node(root, "plot_seed")) {
9,390!
589
    auto seed = std::stoll(get_node_value(root, "plot_seed"));
×
590
    model::plotter_seed = seed;
×
591
  }
592

593
  // Copy random number seed if specified
594
  if (check_for_node(root, "seed")) {
9,390✔
595
    auto seed = std::stoll(get_node_value(root, "seed"));
1,200✔
596
    openmc_set_seed(seed);
600✔
597
  }
598

599
  // Copy random number stride if specified
600
  if (check_for_node(root, "stride")) {
9,390✔
601
    auto stride = std::stoull(get_node_value(root, "stride"));
30✔
602
    openmc_set_stride(stride);
15✔
603
  }
604

605
  // Check for electron treatment
606
  if (check_for_node(root, "electron_treatment")) {
9,390✔
607
    auto temp_str = get_node_value(root, "electron_treatment", true, true);
108✔
608
    if (temp_str == "led") {
108✔
609
      electron_treatment = ElectronTreatment::LED;
41✔
610
    } else if (temp_str == "ttb") {
67!
611
      electron_treatment = ElectronTreatment::TTB;
67✔
612
    } else {
613
      fatal_error("Unrecognized electron treatment: " + temp_str + ".");
×
614
    }
615
  }
108✔
616

617
  // Check for photon transport
618
  if (check_for_node(root, "photon_transport")) {
9,390✔
619
    photon_transport = get_node_value_bool(root, "photon_transport");
442✔
620

621
    if (!run_CE && photon_transport) {
442!
622
      fatal_error("Photon transport is not currently supported in "
×
623
                  "multigroup mode");
624
    }
625
  }
626

627
  // Check for atomic relaxation
628
  if (check_for_node(root, "atomic_relaxation")) {
9,390✔
629
    atomic_relaxation = get_node_value_bool(root, "atomic_relaxation");
30✔
630
  }
631

632
  // Number of bins for logarithmic grid
633
  if (check_for_node(root, "log_grid_bins")) {
9,390✔
634
    n_log_bins = std::stoi(get_node_value(root, "log_grid_bins"));
30✔
635
    if (n_log_bins < 1) {
15!
636
      fatal_error("Number of bins for logarithmic grid must be greater "
×
637
                  "than zero.");
638
    }
639
  }
640

641
  // Number of OpenMP threads
642
  if (check_for_node(root, "threads")) {
9,390!
643
    if (mpi::master)
×
644
      warning("The <threads> element has been deprecated. Use "
×
645
              "the OMP_NUM_THREADS environment variable to set the number of "
646
              "threads.");
647
  }
648

649
  // ==========================================================================
650
  // EXTERNAL SOURCE
651

652
  // Get point to list of <source> elements and make sure there is at least one
653
  for (pugi::xml_node node : root.children("source")) {
18,120✔
654
    model::external_sources.push_back(Source::create(node));
17,470✔
655
  }
656

657
  // Check if the user has specified to read surface source
658
  if (check_for_node(root, "surf_source_read")) {
9,380✔
659
    surf_source_read = true;
30✔
660
    // Get surface source read node
661
    xml_node node_ssr = root.child("surf_source_read");
30✔
662

663
    std::string path = "surface_source.h5";
30✔
664
    // Check if the user has specified different file for surface source reading
665
    if (check_for_node(node_ssr, "path")) {
30!
666
      path = get_node_value(node_ssr, "path", false, true);
30✔
667
    }
668
    model::external_sources.push_back(make_unique<FileSource>(path));
30✔
669
  }
30✔
670

671
  // If no source specified, default to isotropic point source at origin with
672
  // Watt spectrum. No default source is needed in random ray mode.
673
  if (model::external_sources.empty() &&
9,380✔
674
      settings::solver_type != SolverType::RANDOM_RAY) {
2,376✔
675
    double T[] {0.0};
2,230✔
676
    double p[] {1.0};
2,230✔
677
    model::external_sources.push_back(make_unique<IndependentSource>(
2,230✔
678
      UPtrSpace {new SpatialPoint({0.0, 0.0, 0.0})},
4,460✔
679
      UPtrAngle {new Isotropic()}, UPtrDist {new Watt(0.988e6, 2.249e-6)},
4,460✔
680
      UPtrDist {new Discrete(T, p, 1)}));
4,460✔
681
  }
682

683
  // Build probability mass function for sampling external sources
684
  vector<double> source_strengths;
9,380✔
685
  for (auto& s : model::external_sources) {
20,403✔
686
    source_strengths.push_back(s->strength());
11,023✔
687
  }
688
  model::external_sources_probability.assign(source_strengths);
9,380✔
689

690
  // Check if we want to write out source
691
  if (check_for_node(root, "write_initial_source")) {
9,380!
692
    write_initial_source = get_node_value_bool(root, "write_initial_source");
×
693
  }
694

695
  // Get relative number of lost particles
696
  if (check_for_node(root, "source_rejection_fraction")) {
9,380✔
697
    source_rejection_fraction =
14✔
698
      std::stod(get_node_value(root, "source_rejection_fraction"));
14!
699
  }
700

701
  if (check_for_node(root, "free_gas_threshold")) {
9,380!
702
    free_gas_threshold = std::stod(get_node_value(root, "free_gas_threshold"));
×
703
  }
704

705
  // Surface grazing
706
  if (check_for_node(root, "surface_grazing_cutoff"))
9,380!
707
    surface_grazing_cutoff =
×
708
      std::stod(get_node_value(root, "surface_grazing_cutoff"));
×
709
  if (check_for_node(root, "surface_grazing_ratio"))
9,380!
710
    surface_grazing_ratio =
×
711
      std::stod(get_node_value(root, "surface_grazing_ratio"));
×
712

713
  // Survival biasing
714
  if (check_for_node(root, "survival_biasing")) {
9,380✔
715
    survival_biasing = get_node_value_bool(root, "survival_biasing");
227✔
716
  }
717

718
  // Probability tables
719
  if (check_for_node(root, "ptables")) {
9,380✔
720
    urr_ptables_on = get_node_value_bool(root, "ptables");
15✔
721
  }
722

723
  // Cutoffs
724
  if (check_for_node(root, "cutoff")) {
9,380✔
725
    xml_node node_cutoff = root.child("cutoff");
138✔
726
    if (check_for_node(node_cutoff, "weight")) {
138✔
727
      weight_cutoff = std::stod(get_node_value(node_cutoff, "weight"));
30✔
728
    }
729
    if (check_for_node(node_cutoff, "weight_avg")) {
138✔
730
      weight_survive = std::stod(get_node_value(node_cutoff, "weight_avg"));
30✔
731
    }
732
    if (check_for_node(node_cutoff, "survival_normalization")) {
138!
733
      survival_normalization =
×
734
        get_node_value_bool(node_cutoff, "survival_normalization");
×
735
    }
736
    if (check_for_node(node_cutoff, "energy_neutron")) {
138✔
737
      energy_cutoff[0] =
15✔
738
        std::stod(get_node_value(node_cutoff, "energy_neutron"));
30✔
739
    } else if (check_for_node(node_cutoff, "energy")) {
123!
740
      warning("The use of an <energy> cutoff is deprecated and should "
×
741
              "be replaced by <energy_neutron>.");
742
      energy_cutoff[0] = std::stod(get_node_value(node_cutoff, "energy"));
×
743
    }
744
    if (check_for_node(node_cutoff, "energy_photon")) {
138✔
745
      energy_cutoff[1] =
82✔
746
        std::stod(get_node_value(node_cutoff, "energy_photon"));
164✔
747
    }
748
    if (check_for_node(node_cutoff, "energy_electron")) {
138!
749
      energy_cutoff[2] =
×
750
        std::stof(get_node_value(node_cutoff, "energy_electron"));
×
751
    }
752
    if (check_for_node(node_cutoff, "energy_positron")) {
138!
753
      energy_cutoff[3] =
×
754
        std::stod(get_node_value(node_cutoff, "energy_positron"));
×
755
    }
756
    if (check_for_node(node_cutoff, "time_neutron")) {
138✔
757
      time_cutoff[0] = std::stod(get_node_value(node_cutoff, "time_neutron"));
26✔
758
    }
759
    if (check_for_node(node_cutoff, "time_photon")) {
138!
760
      time_cutoff[1] = std::stod(get_node_value(node_cutoff, "time_photon"));
×
761
    }
762
    if (check_for_node(node_cutoff, "time_electron")) {
138!
763
      time_cutoff[2] = std::stod(get_node_value(node_cutoff, "time_electron"));
×
764
    }
765
    if (check_for_node(node_cutoff, "time_positron")) {
138!
766
      time_cutoff[3] = std::stod(get_node_value(node_cutoff, "time_positron"));
×
767
    }
768
  }
769

770
  // read properties from file
771
  if (check_for_node(root, "properties_file")) {
9,380✔
772
    properties_file = get_node_value(root, "properties_file");
11✔
773
    if (!file_exists(properties_file)) {
11!
774
      fatal_error(fmt::format("File '{}' does not exist.", properties_file));
×
775
    }
776
  }
777

778
  // Particle trace
779
  if (check_for_node(root, "trace")) {
9,380✔
780
    auto temp = get_node_array<int64_t>(root, "trace");
15✔
781
    if (temp.size() != 3) {
15!
782
      fatal_error("Must provide 3 integers for <trace> that specify the "
×
783
                  "batch, generation, and particle number.");
784
    }
785
    trace_batch = temp.at(0);
15✔
786
    trace_gen = temp.at(1);
15✔
787
    trace_particle = temp.at(2);
15✔
788
  }
15✔
789

790
  // Particle tracks
791
  if (check_for_node(root, "track")) {
9,380✔
792
    // Get values and make sure there are three per particle
793
    auto temp = get_node_array<int>(root, "track");
45✔
794
    if (temp.size() % 3 != 0) {
45!
795
      fatal_error(
×
796
        "Number of integers specified in 'track' is not "
797
        "divisible by 3.  Please provide 3 integers per particle to be "
798
        "tracked.");
799
    }
800

801
    // Reshape into track_identifiers
802
    int n_tracks = temp.size() / 3;
45✔
803
    for (int i = 0; i < n_tracks; ++i) {
180✔
804
      track_identifiers.push_back(
135✔
805
        {temp[3 * i], temp[3 * i + 1], temp[3 * i + 2]});
135✔
806
    }
807
  }
45✔
808

809
  // Shannon entropy
810
  if (solver_type == SolverType::RANDOM_RAY) {
9,380✔
811
    if (check_for_node(root, "entropy_mesh")) {
814!
812
      fatal_error("Random ray uses FSRs to compute the Shannon entropy. "
×
813
                  "No user-defined entropy mesh is supported.");
814
    }
815
    entropy_on = true;
814✔
816
  } else if (solver_type == SolverType::MONTE_CARLO) {
8,566!
817
    if (check_for_node(root, "entropy_mesh")) {
8,566✔
818
      int temp = std::stoi(get_node_value(root, "entropy_mesh"));
668✔
819
      if (model::mesh_map.find(temp) == model::mesh_map.end()) {
334!
820
        fatal_error(fmt::format(
×
821
          "Mesh {} specified for Shannon entropy does not exist.", temp));
822
      }
823

824
      auto* m = dynamic_cast<RegularMesh*>(
334!
825
        model::meshes[model::mesh_map.at(temp)].get());
334!
826
      if (!m)
334!
827
        fatal_error("Only regular meshes can be used as an entropy mesh");
×
828
      simulation::entropy_mesh = m;
334✔
829

830
      // Turn on Shannon entropy calculation
831
      entropy_on = true;
334✔
832

833
    } else if (check_for_node(root, "entropy")) {
8,232!
834
      fatal_error(
×
835
        "Specifying a Shannon entropy mesh via the <entropy> element "
836
        "is deprecated. Please create a mesh using <mesh> and then reference "
837
        "it by specifying its ID in an <entropy_mesh> element.");
838
    }
839
  }
840

841
  // Temperature field
842
  if (check_for_node(root, "temperature_field")) {
9,380✔
843
    temperature_field_on = true;
232✔
844

845
    // Get pointer to temperature_field node
846
    auto node_tf = root.child("temperature_field");
232✔
847

848
    // Mesh parameter
849
    Mesh* tf_mesh_ptr;
232✔
850
    if (check_for_node(node_tf, "mesh")) {
232✔
851
      int temp = std::stoi(get_node_value(node_tf, "mesh"));
442✔
852
      if (model::mesh_map.find(temp) == model::mesh_map.end()) {
221✔
853
        throw std::runtime_error(fmt::format(
11✔
854
          "Mesh {} specified for the temperature field does not exist.", temp));
22✔
855
      }
856
      tf_mesh_ptr = model::meshes[model::mesh_map.at(temp)].get();
210✔
857
    } else {
858
      throw std::runtime_error(
11✔
859
        "A mesh must be given for the temperature field.");
22✔
860
    }
861

862
    // Values parameter
863
    vector<double> tf_values;
210✔
864
    if (check_for_node(node_tf, "values")) {
210✔
865
      auto temp = get_node_array<double>(node_tf, "values");
199✔
866
      if (temp.size() != tf_mesh_ptr->n_bins()) {
199✔
867
        throw std::runtime_error(
11✔
868
          "Inconsistency in the temperature field: the number of "
869
          "values must be equal to the number of bins in the mesh.");
22✔
870
      }
871
      for (const auto& b : temp) {
1,692✔
872
        tf_values.push_back(b);
1,504✔
873
      }
874
    } else {
11✔
875
      throw std::runtime_error(
11✔
876
        "Temperature values must be given for the temperature field.");
22✔
877
    }
878

879
    // Mapping representation
880
    std::string mapping;
188✔
881
    if (check_for_node(node_tf, "mapping")) {
188!
NEW
882
      mapping = get_node_value(node_tf, "mapping");
×
883
    } else {
884
      mapping = "cell";
188✔
885
    }
886

887
    // Instantiate the temperature field
888
    simulation::temperature_field =
188✔
889
      TemperatureField(tf_mesh_ptr, tf_values, mapping);
376✔
890
  }
210✔
891

892
  // Uniform fission source weighting mesh
893
  if (check_for_node(root, "ufs_mesh")) {
9,336✔
894
    auto temp = std::stoi(get_node_value(root, "ufs_mesh"));
30✔
895
    if (model::mesh_map.find(temp) == model::mesh_map.end()) {
15!
896
      fatal_error(fmt::format("Mesh {} specified for uniform fission site "
×
897
                              "method does not exist.",
898
        temp));
899
    }
900

901
    auto* m =
15✔
902
      dynamic_cast<RegularMesh*>(model::meshes[model::mesh_map.at(temp)].get());
15!
903
    if (!m)
15!
904
      fatal_error("Only regular meshes can be used as a UFS mesh");
×
905
    simulation::ufs_mesh = m;
15✔
906

907
    // Turn on uniform fission source weighting
908
    ufs_on = true;
15✔
909

910
  } else if (check_for_node(root, "uniform_fs")) {
9,321!
911
    fatal_error(
×
912
      "Specifying a UFS mesh via the <uniform_fs> element "
913
      "is deprecated. Please create a mesh using <mesh> and then reference "
914
      "it by specifying its ID in a <ufs_mesh> element.");
915
  }
916

917
  // Check if the user has specified to write state points
918
  if (check_for_node(root, "state_point")) {
9,336✔
919

920
    // Get pointer to state_point node
921
    auto node_sp = root.child("state_point");
160✔
922

923
    // Determine number of batches at which to store state points
924
    if (check_for_node(node_sp, "batches")) {
160!
925
      // User gave specific batches to write state points
926
      auto temp = get_node_array<int>(node_sp, "batches");
160✔
927
      for (const auto& b : temp) {
491✔
928
        statepoint_batch.insert(b);
331✔
929
      }
930
    } else {
160✔
931
      // If neither were specified, write state point at last batch
932
      statepoint_batch.insert(n_batches);
×
933
    }
934
  } else {
935
    // If no <state_point> tag was present, by default write state point at
936
    // last batch only
937
    statepoint_batch.insert(n_batches);
9,176✔
938
  }
939

940
  // Check if the user has specified to write source points
941
  if (check_for_node(root, "source_point")) {
9,336✔
942
    // Get source_point node
943
    xml_node node_sp = root.child("source_point");
101✔
944

945
    // Determine batches at which to store source points
946
    if (check_for_node(node_sp, "batches")) {
101✔
947
      // User gave specific batches to write source points
948
      auto temp = get_node_array<int>(node_sp, "batches");
45✔
949
      for (const auto& b : temp) {
120✔
950
        sourcepoint_batch.insert(b);
75✔
951
      }
952
    } else {
45✔
953
      // If neither were specified, write source points with state points
954
      sourcepoint_batch = statepoint_batch;
56!
955
    }
956

957
    // Check if the user has specified to write binary source file
958
    if (check_for_node(node_sp, "separate")) {
101✔
959
      source_separate = get_node_value_bool(node_sp, "separate");
71✔
960
    }
961
    if (check_for_node(node_sp, "write")) {
101!
962
      source_write = get_node_value_bool(node_sp, "write");
×
963
    }
964
    if (check_for_node(node_sp, "mcpl")) {
101✔
965
      source_mcpl_write = get_node_value_bool(node_sp, "mcpl");
26✔
966
    }
967
    if (check_for_node(node_sp, "overwrite_latest")) {
101✔
968
      source_latest = get_node_value_bool(node_sp, "overwrite_latest");
15✔
969
      source_separate = source_latest;
15✔
970
    }
971
  } else {
972
    // If no <source_point> tag was present, by default we keep source bank in
973
    // statepoint file and write it out at statepoints intervals
974
    source_separate = false;
9,235✔
975
    sourcepoint_batch = statepoint_batch;
9,235!
976
  }
977

978
  // Check is the user specified to convert strength to statistical weight
979
  if (check_for_node(root, "uniform_source_sampling")) {
9,336✔
980
    uniform_source_sampling =
55✔
981
      get_node_value_bool(root, "uniform_source_sampling");
55✔
982
  }
983

984
  // Check if the user has specified to write surface source
985
  if (check_for_node(root, "surf_source_write")) {
9,336✔
986
    surf_source_write = true;
412✔
987
    // Get surface source write node
988
    xml_node node_ssw = root.child("surf_source_write");
412✔
989

990
    // Determine surface ids at which crossing particles are to be banked.
991
    // If no surfaces are specified, all surfaces in the model will be used
992
    // to bank source points.
993
    if (check_for_node(node_ssw, "surface_ids")) {
412✔
994
      auto temp = get_node_array<int>(node_ssw, "surface_ids");
202✔
995
      for (const auto& b : temp) {
994✔
996
        source_write_surf_id.insert(b);
792✔
997
      }
998
    }
202✔
999

1000
    // Get maximum number of particles to be banked per surface
1001
    if (check_for_node(node_ssw, "max_particles")) {
412✔
1002
      ssw_max_particles = std::stoll(get_node_value(node_ssw, "max_particles"));
806✔
1003
    } else {
1004
      fatal_error("A maximum number of particles needs to be specified "
9✔
1005
                  "using the 'max_particles' parameter to store surface "
1006
                  "source points.");
1007
    }
1008

1009
    // Get maximum number of surface source files to be created
1010
    if (check_for_node(node_ssw, "max_source_files")) {
403✔
1011
      ssw_max_files = std::stoll(get_node_value(node_ssw, "max_source_files"));
66✔
1012
    } else {
1013
      ssw_max_files = 1;
370✔
1014
    }
1015

1016
    if (check_for_node(node_ssw, "mcpl")) {
403✔
1017
      surf_mcpl_write = get_node_value_bool(node_ssw, "mcpl");
11✔
1018
    }
1019
    // Get cell information
1020
    if (check_for_node(node_ssw, "cell")) {
403✔
1021
      ssw_cell_id = std::stoll(get_node_value(node_ssw, "cell"));
208✔
1022
      ssw_cell_type = SSWCellType::Both;
104✔
1023
    }
1024
    if (check_for_node(node_ssw, "cellfrom")) {
403✔
1025
      if (ssw_cell_id != C_NONE) {
90✔
1026
        fatal_error(
18✔
1027
          "'cell', 'cellfrom' and 'cellto' cannot be used at the same time.");
1028
      }
1029
      ssw_cell_id = std::stoll(get_node_value(node_ssw, "cellfrom"));
144✔
1030
      ssw_cell_type = SSWCellType::From;
72✔
1031
    }
1032
    if (check_for_node(node_ssw, "cellto")) {
385✔
1033
      if (ssw_cell_id != C_NONE) {
71✔
1034
        fatal_error(
18✔
1035
          "'cell', 'cellfrom' and 'cellto' cannot be used at the same time.");
1036
      }
1037
      ssw_cell_id = std::stoll(get_node_value(node_ssw, "cellto"));
106✔
1038
      ssw_cell_type = SSWCellType::To;
53✔
1039
    }
1040
  }
1041

1042
  // Check if the user has specified to write specific collisions
1043
  if (check_for_node(root, "collision_track")) {
9,291✔
1044
    settings::collision_track = true;
160✔
1045
    // Get collision track node
1046
    xml_node node_ct = root.child("collision_track");
160✔
1047
    collision_track_config = CollisionTrackConfig {};
160✔
1048

1049
    // Determine cell ids at which crossing particles are to be banked
1050
    if (check_for_node(node_ct, "cell_ids")) {
160✔
1051
      auto temp = get_node_array<int>(node_ct, "cell_ids");
89✔
1052
      for (const auto& b : temp) {
237✔
1053
        collision_track_config.cell_ids.insert(b);
148✔
1054
      }
1055
    }
89✔
1056
    if (check_for_node(node_ct, "reactions")) {
160✔
1057
      auto temp = get_node_array<std::string>(node_ct, "reactions");
63✔
1058
      for (const auto& b : temp) {
171✔
1059
        int reaction_int = reaction_mt(b);
108✔
1060
        if (reaction_int > 0) {
108!
1061
          collision_track_config.mt_numbers.insert(reaction_int);
108✔
1062
        }
1063
      }
1064
    }
63✔
1065
    if (check_for_node(node_ct, "universe_ids")) {
160✔
1066
      auto temp = get_node_array<int>(node_ct, "universe_ids");
30✔
1067
      for (const auto& b : temp) {
60✔
1068
        collision_track_config.universe_ids.insert(b);
30✔
1069
      }
1070
    }
30✔
1071
    if (check_for_node(node_ct, "material_ids")) {
160✔
1072
      auto temp = get_node_array<int>(node_ct, "material_ids");
30✔
1073
      for (const auto& b : temp) {
75✔
1074
        collision_track_config.material_ids.insert(b);
45✔
1075
      }
1076
    }
30✔
1077
    if (check_for_node(node_ct, "nuclides")) {
160✔
1078
      auto temp = get_node_array<std::string>(node_ct, "nuclides");
30✔
1079
      for (const auto& b : temp) {
120✔
1080
        collision_track_config.nuclides.insert(b);
90✔
1081
      }
1082
    }
30✔
1083
    if (check_for_node(node_ct, "deposited_E_threshold")) {
160✔
1084
      collision_track_config.deposited_energy_threshold =
60✔
1085
        std::stod(get_node_value(node_ct, "deposited_E_threshold"));
60✔
1086
    }
1087
    // Get maximum number of particles to be banked per collision
1088
    if (check_for_node(node_ct, "max_collisions")) {
160!
1089
      collision_track_config.max_collisions =
320✔
1090
        std::stoll(get_node_value(node_ct, "max_collisions"));
320✔
1091
    } else {
1092
      warning("A maximum number of collisions needs to be specified. "
×
1093
              "By default the code sets 'max_collisions' parameter equals to "
1094
              "1000.");
1095
    }
1096
    // Get maximum number of collision_track files to be created
1097
    if (check_for_node(node_ct, "max_collision_track_files")) {
160!
1098
      collision_track_config.max_files =
×
1099
        std::stoll(get_node_value(node_ct, "max_collision_track_files"));
×
1100
    }
1101
    if (check_for_node(node_ct, "mcpl")) {
160✔
1102
      collision_track_config.mcpl_write = get_node_value_bool(node_ct, "mcpl");
22✔
1103
    }
1104
  }
1105

1106
  // If source is not separate and is to be written out in the statepoint
1107
  // file, make sure that the sourcepoint batch numbers are contained in the
1108
  // statepoint list
1109
  if (!source_separate) {
9,291✔
1110
    for (const auto& b : sourcepoint_batch) {
18,536✔
1111
      if (!contains(statepoint_batch, b)) {
18,662!
1112
        fatal_error(
×
1113
          "Sourcepoint batches are not a subset of statepoint batches.");
1114
      }
1115
    }
1116
  }
1117

1118
  // Check if the user has specified to not reduce tallies at the end of every
1119
  // batch
1120
  if (check_for_node(root, "no_reduce")) {
9,291✔
1121
    reduce_tallies = !get_node_value_bool(root, "no_reduce");
30✔
1122
  }
1123

1124
  // Check if the user has specified to use confidence intervals for
1125
  // uncertainties rather than standard deviations
1126
  if (check_for_node(root, "confidence_intervals")) {
9,291✔
1127
    confidence_intervals = get_node_value_bool(root, "confidence_intervals");
15✔
1128
  }
1129

1130
  // Check for output options
1131
  if (check_for_node(root, "output")) {
9,291✔
1132
    // Get pointer to output node
1133
    pugi::xml_node node_output = root.child("output");
845✔
1134

1135
    // Check for summary option
1136
    if (check_for_node(node_output, "summary")) {
845✔
1137
      output_summary = get_node_value_bool(node_output, "summary");
819✔
1138
    }
1139

1140
    // Check for ASCII tallies output option
1141
    if (check_for_node(node_output, "tallies")) {
845✔
1142
      output_tallies = get_node_value_bool(node_output, "tallies");
371✔
1143
    }
1144

1145
    // Set output directory if a path has been specified
1146
    if (check_for_node(node_output, "path")) {
845!
1147
      path_output = get_node_value(node_output, "path");
×
1148
      if (!ends_with(path_output, "/")) {
×
1149
        path_output += "/";
845!
1150
      }
1151
    }
1152
  }
1153

1154
  // Resonance scattering parameters
1155
  if (check_for_node(root, "resonance_scattering")) {
9,291✔
1156
    xml_node node_res_scat = root.child("resonance_scattering");
15✔
1157

1158
    // See if resonance scattering is enabled
1159
    if (check_for_node(node_res_scat, "enable")) {
15!
1160
      res_scat_on = get_node_value_bool(node_res_scat, "enable");
15✔
1161
    } else {
1162
      res_scat_on = true;
×
1163
    }
1164

1165
    // Determine what method is used
1166
    if (check_for_node(node_res_scat, "method")) {
15!
1167
      auto temp = get_node_value(node_res_scat, "method", true, true);
15✔
1168
      if (temp == "rvs") {
15!
1169
        res_scat_method = ResScatMethod::rvs;
15✔
1170
      } else if (temp == "dbrc") {
×
1171
        res_scat_method = ResScatMethod::dbrc;
×
1172
      } else {
1173
        fatal_error(
×
1174
          "Unrecognized resonance elastic scattering method: " + temp + ".");
×
1175
      }
1176
    }
15✔
1177

1178
    // Minimum energy for resonance scattering
1179
    if (check_for_node(node_res_scat, "energy_min")) {
15!
1180
      res_scat_energy_min =
30✔
1181
        std::stod(get_node_value(node_res_scat, "energy_min"));
30✔
1182
    }
1183
    if (res_scat_energy_min < 0.0) {
15!
1184
      fatal_error("Lower resonance scattering energy bound is negative");
×
1185
    }
1186

1187
    // Maximum energy for resonance scattering
1188
    if (check_for_node(node_res_scat, "energy_max")) {
15!
1189
      res_scat_energy_max =
30✔
1190
        std::stod(get_node_value(node_res_scat, "energy_max"));
30✔
1191
    }
1192
    if (res_scat_energy_max < res_scat_energy_min) {
15!
1193
      fatal_error("Upper resonance scattering energy bound is below the "
×
1194
                  "lower resonance scattering energy bound.");
1195
    }
1196

1197
    // Get resonance scattering nuclides
1198
    if (check_for_node(node_res_scat, "nuclides")) {
15!
1199
      res_scat_nuclides =
15✔
1200
        get_node_array<std::string>(node_res_scat, "nuclides");
30✔
1201
    }
1202
  }
1203

1204
  // Get volume calculations
1205
  for (pugi::xml_node node_vol : root.children("volume_calc")) {
9,601✔
1206
    model::volume_calcs.emplace_back(node_vol);
310✔
1207
  }
1208

1209
  // Get temperature settings
1210
  if (check_for_node(root, "temperature_default")) {
9,291✔
1211
    temperature_default =
342✔
1212
      std::stod(get_node_value(root, "temperature_default"));
342✔
1213
  }
1214
  if (check_for_node(root, "temperature_method")) {
9,291✔
1215
    auto temp = get_node_value(root, "temperature_method", true, true);
515✔
1216
    if (temp == "nearest") {
515✔
1217
      temperature_method = TemperatureMethod::NEAREST;
304✔
1218
    } else if (temp == "interpolation") {
211!
1219
      temperature_method = TemperatureMethod::INTERPOLATION;
211✔
1220
    } else {
1221
      fatal_error("Unknown temperature method: " + temp);
×
1222
    }
1223
  }
515✔
1224
  if (check_for_node(root, "temperature_tolerance")) {
9,291✔
1225
    temperature_tolerance =
1,056✔
1226
      std::stod(get_node_value(root, "temperature_tolerance"));
1,056✔
1227
  }
1228
  if (check_for_node(root, "temperature_multipole")) {
9,291✔
1229
    temperature_multipole = get_node_value_bool(root, "temperature_multipole");
373✔
1230

1231
    // Multipole currently doesn't work with photon transport
1232
    if (temperature_multipole && photon_transport) {
373!
1233
      fatal_error("Multipole data cannot currently be used in conjunction with "
×
1234
                  "photon transport.");
1235
    }
1236
  }
1237
  if (check_for_node(root, "temperature_range")) {
9,291✔
1238
    auto range = get_node_array<double>(root, "temperature_range");
170✔
1239
    temperature_range[0] = range.at(0);
170✔
1240
    temperature_range[1] = range.at(1);
170✔
1241
  }
170✔
1242

1243
  // Explicit transport of Delayed Neutron Precursor (DNP)
1244
  if (check_for_node(root, "dnp_drift")) {
9,291✔
1245
    dnp_drift_on = true;
30✔
1246
    auto node_dnp_drift = root.child("dnp_drift");
30✔
1247

1248
    // Mesh
1249
    Mesh* mesh_ptr;
30✔
1250
    if (check_for_node(node_dnp_drift, "field_mesh")) {
30!
1251
      int temp = std::stoi(get_node_value(node_dnp_drift, "field_mesh"));
60✔
1252
      if (model::mesh_map.find(temp) == model::mesh_map.end()) {
30!
NEW
1253
        fatal_error(fmt::format(
×
1254
          "Mesh {} specified for the velocity field does not exist.", temp));
1255
      }
1256
      mesh_ptr = model::meshes[model::mesh_map.at(temp)].get();
30✔
1257
    } else {
NEW
1258
      fatal_error("A mesh must be given for the velocity field.");
×
1259
    }
1260

1261
    // Values
1262
    vector<Direction> vf_values;
30✔
1263
    if (check_for_node(node_dnp_drift, "field_values")) {
30!
1264
      auto temp = get_node_array<double>(node_dnp_drift, "field_values");
30✔
1265
      if (temp.size() % 3 != 0) {
30!
NEW
1266
        fatal_error("The number of values must be a multiple of 3.");
×
1267
      }
1268
      for (size_t i = 0; i + 2 < temp.size(); i += 3) {
555✔
1269
        Direction d = Direction(temp[i], temp[i + 1], temp[i + 2]);
525✔
1270
        vf_values.push_back(d);
525✔
1271
      }
NEW
1272
    } else {
×
NEW
1273
      fatal_error("Values must be given for the velocity field.");
×
1274
    }
1275

1276
    // Mapping representation
1277
    std::string field_mapping;
30✔
1278
    if (check_for_node(node_dnp_drift, "field_mapping")) {
30!
1279
      field_mapping = get_node_value(node_dnp_drift, "field_mapping");
30✔
1280
    } else {
NEW
1281
      fatal_error(
×
1282
        "A mapping representation must be given for the velocity field.");
1283
    }
1284

1285
    // Velocity field
1286
    simulation::velocity_field =
30✔
1287
      VelocityField(mesh_ptr, vf_values, field_mapping);
30✔
1288

1289
    // Boundary conditions map
1290
    if (check_for_node(node_dnp_drift, "boundary_map")) {
30!
1291
      BCMap bc_map;
30✔
1292
      auto node_boundary = node_dnp_drift.child("boundary_map");
30✔
1293

1294
      if (check_for_node(node_boundary, "inlet")) {
30!
1295
        bc_map[BCType::INLET] = get_node_array<int>(node_boundary, "inlet");
30✔
1296
      } else {
NEW
1297
        fatal_error("Inlet boundary conditions must be declared.");
×
1298
      }
1299

1300
      if (check_for_node(node_boundary, "outlet")) {
30!
1301
        bc_map[BCType::OUTLET] = get_node_array<int>(node_boundary, "outlet");
30✔
1302
      } else {
NEW
1303
        fatal_error("Outlet boundary conditions must be declared.");
×
1304
      }
1305

1306
      if (check_for_node(node_boundary, "wall")) {
30!
1307
        bc_map[BCType::WALL] = get_node_array<int>(node_boundary, "wall");
30✔
1308
      } else {
NEW
1309
        fatal_error("Wall boundary conditions must be declared.");
×
1310
      }
1311

1312
      simulation::velocity_field.bc_map() = bc_map;
60✔
1313

NEW
1314
    } else {
×
NEW
1315
      fatal_error("Boundary conditions must be declared.");
×
1316
    }
1317

1318
    // Integrator
1319
    if (check_for_node(node_dnp_drift, "integrator")) {
30!
1320
      std::string integration_method =
30✔
1321
        get_node_value(node_dnp_drift, "integrator");
30✔
1322

1323
      // Runge Kutta 4
1324
      if (integration_method == "RK4") {
30!
1325

1326
        // Time step
1327
        double dt;
30✔
1328
        if (!check_for_node(node_dnp_drift, "integrator_dt")) {
30!
NEW
1329
          fatal_error("The attribute 'integrator_dt' is not declared in the "
×
1330
                      "DNP drift settings.");
1331
        } else {
1332
          dt = std::stod(get_node_value(node_dnp_drift, "integrator_dt"));
60✔
1333
        }
1334

1335
        // Instantiate integrator
1336
        simulation::streamline_integrator = new RK4StreamlineIntegrator(dt);
30✔
1337

1338
        // Undefined integration method
1339
      } else {
NEW
1340
        fatal_error(
×
NEW
1341
          fmt::format("Integrator '{}' not implemented", integration_method));
×
1342
      }
NEW
1343
    } else {
×
NEW
1344
      fatal_error("An integrator should be defined in the DNP drift settings.");
×
1345
    }
1346

1347
    // Recycle precursor when reaching an outlet?
1348
    if (check_for_node(node_dnp_drift, "recycling")) {
30!
1349
      dnp_drift_recycling_on = get_node_value_bool(node_dnp_drift, "recycling");
30✔
1350
      if (dnp_drift_recycling_on) {
30!
1351
        if (!check_for_node(node_dnp_drift, "external_travel_time")) {
30!
NEW
1352
          fatal_error("The external travel time is not declared in "
×
1353
                      "the DNP drift settings.");
1354
        } else {
1355
          dnp_drift_external_travel_time =
60✔
1356
            std::stod(get_node_value(node_dnp_drift, "external_travel_time"));
60✔
1357
        }
1358
      }
1359
    }
1360
  }
30✔
1361

1362
  // Add physical group information to mesh
1363
  if (check_for_node(root, "mesh_physical_group")) {
9,291✔
1364

1365
    auto node_physical_group = root.child("mesh_physical_group");
30✔
1366

1367
    // Mesh pointer
1368
    Mesh* mesh_ptr;
30✔
1369
    if (check_for_node(node_physical_group, "mesh")) {
30!
1370
      int temp = std::stoi(get_node_value(node_physical_group, "mesh"));
60✔
1371
      if (model::mesh_map.find(temp) == model::mesh_map.end()) {
30!
NEW
1372
        fatal_error(fmt::format(
×
1373
          "Mesh {} specified for the physical groups does not exist.", temp));
1374
      }
1375
      mesh_ptr = model::meshes[model::mesh_map.at(temp)].get();
30✔
1376
    } else {
NEW
1377
      fatal_error("A mesh must be given for the velocity field.");
×
1378
    }
1379

1380
    // Face IDs
1381
    vector<int> face_ids;
30✔
1382
    if (check_for_node(node_physical_group, "face_ids")) {
30!
1383
      face_ids = get_node_array<int>(node_physical_group, "face_ids");
60✔
1384
    } else {
NEW
1385
      fatal_error("Surface IDs must be declared.");
×
1386
    }
1387

1388
    // Physical groups
1389
    vector<int> physical_groups;
30✔
1390
    if (check_for_node(node_physical_group, "physical_groups")) {
30!
1391
      physical_groups =
30✔
1392
        get_node_array<int>(node_physical_group, "physical_groups");
60✔
1393
    } else {
NEW
1394
      fatal_error("Physical_groups must be declared.");
×
1395
    }
1396

1397
    // Check for consistency
1398
    if (face_ids.size() != physical_groups.size()) {
30!
NEW
1399
      fatal_error(
×
1400
        "The lists of face IDs and physical groups must have the same size!");
1401
    }
1402

1403
    // Create the physical group map
1404
    PGMap pg_map;
30✔
1405
    for (size_t i = 0; i < face_ids.size(); i++) {
750✔
1406
      pg_map[physical_groups[i]].push_back(face_ids[i]);
720✔
1407
    }
1408

1409
    // Save the map in the mesh
1410
    mesh_ptr->pg_map() = pg_map;
60!
1411
  }
30✔
1412

1413
  // Check for tabular_legendre options
1414
  if (check_for_node(root, "tabular_legendre")) {
9,291✔
1415
    // Get pointer to tabular_legendre node
1416
    xml_node node_tab_leg = root.child("tabular_legendre");
105✔
1417

1418
    // Check for enable option
1419
    if (check_for_node(node_tab_leg, "enable")) {
105!
1420
      legendre_to_tabular = get_node_value_bool(node_tab_leg, "enable");
105✔
1421
    }
1422

1423
    // Check for the number of points
1424
    if (check_for_node(node_tab_leg, "num_points")) {
105!
1425
      legendre_to_tabular_points =
×
1426
        std::stoi(get_node_value(node_tab_leg, "num_points"));
×
1427
      if (legendre_to_tabular_points <= 1 && !run_CE) {
×
1428
        fatal_error(
×
1429
          "The 'num_points' subelement/attribute of the "
1430
          "<tabular_legendre> element must contain a value greater than 1");
1431
      }
1432
    }
1433
  }
1434

1435
  // Check whether create delayed neutrons in fission
1436
  if (check_for_node(root, "create_delayed_neutrons")) {
9,291!
1437
    create_delayed_neutrons =
×
1438
      get_node_value_bool(root, "create_delayed_neutrons");
×
1439
  }
1440

1441
  // Check whether create fission sites
1442
  if (run_mode == RunMode::FIXED_SOURCE) {
9,291✔
1443
    if (check_for_node(root, "create_fission_neutrons")) {
3,418✔
1444
      create_fission_neutrons =
336✔
1445
        get_node_value_bool(root, "create_fission_neutrons");
336✔
1446
    }
1447
  }
1448

1449
  // Check whether to scale fission photon yields
1450
  if (check_for_node(root, "delayed_photon_scaling")) {
9,291!
1451
    delayed_photon_scaling =
×
1452
      get_node_value_bool(root, "delayed_photon_scaling");
×
1453
  }
1454

1455
  // Check whether to use event-based parallelism
1456
  if (check_for_node(root, "event_based")) {
9,291!
1457
    event_based = get_node_value_bool(root, "event_based");
×
1458
  }
1459

1460
  // Check whether material cell offsets should be generated
1461
  if (check_for_node(root, "material_cell_offsets")) {
9,291!
1462
    material_cell_offsets = get_node_value_bool(root, "material_cell_offsets");
×
1463
  }
1464

1465
  // Weight window information
1466
  for (pugi::xml_node node_ww : root.children("weight_windows")) {
9,607✔
1467
    variance_reduction::weight_windows.emplace_back(
316✔
1468
      std::make_unique<WeightWindows>(node_ww));
632✔
1469
  }
1470

1471
  // Enable weight windows by default if one or more are present
1472
  if (variance_reduction::weight_windows.size() > 0)
9,291✔
1473
    settings::weight_windows_on = true;
220✔
1474

1475
  // read weight windows from file
1476
  if (check_for_node(root, "weight_windows_file")) {
9,291✔
1477
    weight_windows_file = get_node_value(root, "weight_windows_file");
26✔
1478
    weight_windows_on = true;
26✔
1479
  }
1480

1481
  // read settings for weight windows value, this will override
1482
  // the automatic setting even if weight windows are present
1483
  if (check_for_node(root, "weight_windows_on")) {
9,291✔
1484
    weight_windows_on = get_node_value_bool(root, "weight_windows_on");
93✔
1485
  }
1486

1487
  if (check_for_node(root, "max_secondaries")) {
9,291!
1488
    settings::max_secondaries =
×
1489
      std::stoi(get_node_value(root, "max_secondaries"));
×
1490
  }
1491

1492
  if (check_for_node(root, "max_history_splits")) {
9,291✔
1493
    settings::max_history_splits =
798✔
1494
      std::stoi(get_node_value(root, "max_history_splits"));
798✔
1495
  }
1496

1497
  if (check_for_node(root, "max_tracks")) {
9,291✔
1498
    settings::max_tracks = std::stoi(get_node_value(root, "max_tracks"));
90✔
1499
  }
1500

1501
  // Create weight window generator objects
1502
  if (check_for_node(root, "weight_window_generators")) {
9,291✔
1503
    auto wwgs_node = root.child("weight_window_generators");
127✔
1504
    for (pugi::xml_node node_wwg :
254✔
1505
      wwgs_node.children("weight_windows_generator")) {
254✔
1506
      variance_reduction::weight_windows_generators.emplace_back(
127✔
1507
        std::make_unique<WeightWindowsGenerator>(node_wwg));
254✔
1508
    }
1509
    // if any of the weight windows are intended to be generated otf, make
1510
    // sure they're applied
1511
    for (const auto& wwg : variance_reduction::weight_windows_generators) {
127!
1512
      if (wwg->on_the_fly_) {
127!
1513
        settings::weight_windows_on = true;
127✔
1514
        break;
127✔
1515
      }
1516
    }
1517
    // If any weight window generators have local FW-CADIS target tallies,
1518
    // user-defined adjoint sources cannot be used at the same time.
1519
    if (!model::adjoint_sources.empty()) {
127!
1520
      for (const auto& wwg : variance_reduction::weight_windows_generators) {
×
1521
        if (!wwg->targets_.empty()) {
×
1522
          fatal_error("Cannot use both user-defined adjoint sources and "
×
1523
                      "FW-CADIS target tallies at the same time.");
1524
        }
1525
      }
1526
    }
1527
  }
1528

1529
  // Set up weight window checkpoints
1530
  if (check_for_node(root, "weight_window_checkpoints")) {
9,291✔
1531
    xml_node ww_checkpoints = root.child("weight_window_checkpoints");
184✔
1532
    if (check_for_node(ww_checkpoints, "collision")) {
184!
1533
      weight_window_checkpoint_collision =
184✔
1534
        get_node_value_bool(ww_checkpoints, "collision");
184✔
1535
    }
1536
    if (check_for_node(ww_checkpoints, "surface")) {
184!
1537
      weight_window_checkpoint_surface =
184✔
1538
        get_node_value_bool(ww_checkpoints, "surface");
184✔
1539
    }
1540
  }
1541

1542
  if (weight_windows_on) {
9,291✔
1543
    if (!weight_window_checkpoint_surface &&
362✔
1544
        !weight_window_checkpoint_collision)
189!
1545
      fatal_error(
×
1546
        "Weight Windows are enabled but there are no valid checkpoints.");
1547
  }
1548

1549
  if (check_for_node(root, "use_decay_photons")) {
9,291✔
1550
    settings::use_decay_photons =
11✔
1551
      get_node_value_bool(root, "use_decay_photons");
11✔
1552
  }
1553

1554
  // If weight windows are on, also enable shared secondary bank (unless
1555
  // explicitly disabled by user).
1556
  if (check_for_node(root, "shared_secondary_bank")) {
9,291✔
1557
    bool val = get_node_value_bool(root, "shared_secondary_bank");
335✔
1558
    if (val && run_mode == RunMode::EIGENVALUE) {
335!
1559
      warning(
×
1560
        "Shared secondary bank is not supported in eigenvalue calculations. "
1561
        "Setting will be ignored.");
1562
    } else {
1563
      settings::use_shared_secondary_bank = val;
335✔
1564
    }
1565
  } else if (settings::weight_windows_on) {
8,956✔
1566
    if (run_mode == RunMode::EIGENVALUE) {
180✔
1567
      warning(
66✔
1568
        "Shared secondary bank is not supported in eigenvalue calculations. "
1569
        "Particle local secondary banks will be used instead.");
1570
    } else if (run_mode == RunMode::FIXED_SOURCE) {
169!
1571
      settings::use_shared_secondary_bank = true;
169✔
1572
    }
1573
  }
1574
}
9,291✔
1575

1576
void free_memory_settings()
9,486✔
1577
{
1578
  settings::statepoint_batch.clear();
9,486✔
1579
  settings::sourcepoint_batch.clear();
9,486✔
1580
  settings::source_write_surf_id.clear();
9,486✔
1581
  settings::res_scat_nuclides.clear();
9,486✔
1582
}
9,486✔
1583

1584
//==============================================================================
1585
// C API functions
1586
//==============================================================================
1587

1588
extern "C" int openmc_set_n_batches(
220✔
1589
  int32_t n_batches, bool set_max_batches, bool add_statepoint_batch)
1590
{
1591
  if (settings::n_inactive >= n_batches) {
220✔
1592
    set_errmsg("Number of active batches must be greater than zero.");
11✔
1593
    return OPENMC_E_INVALID_ARGUMENT;
11✔
1594
  }
1595

1596
  if (!settings::trigger_on) {
209✔
1597
    // Set n_batches and n_max_batches to same value
1598
    settings::n_batches = n_batches;
187✔
1599
    settings::n_max_batches = n_batches;
187✔
1600
  } else {
1601
    // Set n_batches and n_max_batches based on value of set_max_batches
1602
    if (set_max_batches) {
22✔
1603
      settings::n_max_batches = n_batches;
11✔
1604
    } else {
1605
      settings::n_batches = n_batches;
11✔
1606
    }
1607
  }
1608

1609
  // Update size of k_generation and entropy
1610
  int m = settings::n_max_batches * settings::gen_per_batch;
209✔
1611
  simulation::k_generation.reserve(m);
209✔
1612
  simulation::entropy.reserve(m);
209✔
1613

1614
  // Add value of n_batches to statepoint_batch
1615
  if (add_statepoint_batch &&
209✔
1616
      !(contains(settings::statepoint_batch, n_batches)))
198✔
1617
    settings::statepoint_batch.insert(n_batches);
33✔
1618

1619
  return 0;
1620
}
1621

1622
extern "C" int openmc_get_n_batches(int* n_batches, bool get_max_batches)
2,530✔
1623
{
1624
  *n_batches = get_max_batches ? settings::n_max_batches : settings::n_batches;
2,530✔
1625

1626
  return 0;
2,530✔
1627
}
1628

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

© 2026 Coveralls, Inc