Skip to content

Commit ff0e44e

Browse files
committed
update test to use fewer batches to try and avoid indeterminisim on civet
1 parent db23b61 commit ff0e44e

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/criticality/CriticalitySearchBase.C

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ CriticalitySearchBase::searchForCriticality()
7474
<< std::to_string(_minimum) << " - " << std::to_string(_maximum) << " " << units() << " "
7575
<< std::endl;
7676

77+
VariadicTable<int, Real, Real, Real> vt(
78+
{"Iteration", quantity() + " " + units(), " k (mean) ", " k (std dev) "});
79+
vt.setColumnFormat({VariadicTableColumnFormat::AUTO,
80+
VariadicTableColumnFormat::SCIENTIFIC,
81+
VariadicTableColumnFormat::SCIENTIFIC,
82+
VariadicTableColumnFormat::SCIENTIFIC});
83+
7784
std::function<Real(Real)> func;
7885
func = [&](Real x)
7986
{
@@ -92,6 +99,9 @@ CriticalitySearchBase::searchForCriticality()
9299
_k_values.push_back(k);
93100
_k_std_dev_values.push_back(k_std_dev);
94101

102+
vt.addRow(_k_values.size() - 1, x, k, k_std_dev);
103+
vt.print(_console);
104+
95105
if (_tolerance < 3 * k_std_dev)
96106
mooseDoOnce(mooseWarning(
97107
"The 'tolerance' for the criticality search (" + std::to_string(_tolerance) +
@@ -109,16 +119,6 @@ CriticalitySearchBase::searchForCriticality()
109119
mooseError("Failed to converge criticality search! This may happen if your tolerance is too "
110120
"tight given the statistical error in the computation of k.");
111121

112-
VariadicTable<int, Real, Real, Real> vt(
113-
{"Iteration", quantity() + " " + units(), " k (mean) ", " k (std dev) "});
114-
vt.setColumnFormat({VariadicTableColumnFormat::AUTO,
115-
VariadicTableColumnFormat::SCIENTIFIC,
116-
VariadicTableColumnFormat::SCIENTIFIC,
117-
VariadicTableColumnFormat::SCIENTIFIC});
118-
for (int i = 0; i < _inputs.size(); ++i)
119-
vt.addRow(i, _inputs[i], _k_values[i], _k_std_dev_values[i]);
120-
vt.print(_console);
121-
122122
// fill the converged value into a postprocessor
123123
_openmc_problem->setPostprocessorValueByName(_pp_name, _inputs.back());
124124
}

test/tests/criticality/borated_water/make_openmc_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
model.geometry = openmc.Geometry([box1, box2])
5151

5252
# Finally, define some run settings
53-
model.settings.batches = 50
54-
model.settings.inactive = 10
53+
model.settings.batches = 10
54+
model.settings.inactive = 3
5555
model.settings.particles = 1000
5656

5757
lower_left = (0, 0, 0)

test/tests/criticality/borated_water/openmc.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
material_id = 2
3535
minimum = 0
3636
maximum = 1000
37-
tolerance = 5e-2
37+
tolerance = 5e-1
3838
[]
3939
[]
4040

test/tests/criticality/borated_water/settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<settings>
33
<run_mode>eigenvalue</run_mode>
44
<particles>1000</particles>
5-
<batches>50</batches>
6-
<inactive>10</inactive>
5+
<batches>10</batches>
6+
<inactive>3</inactive>
77
<source particle="neutron" strength="1.0" type="independent">
88
<space type="box">
99
<parameters>0 0 0 10.0 10.0 10.0</parameters>

0 commit comments

Comments
 (0)