From 2a8973ec424b059c02584d872227583e3a4f4723 Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Mon, 1 Jun 2020 21:33:23 -0400 Subject: [PATCH] Update batches accessor call in cmfd.py --- openmc/cmfd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmc/cmfd.py b/openmc/cmfd.py index 09e1486d09..78901b03b9 100644 --- a/openmc/cmfd.py +++ b/openmc/cmfd.py @@ -830,7 +830,7 @@ class CMFDRun: """ if filename is None: - batch_str_len = len(str(openmc.lib.settings.batches)) + batch_str_len = len(str(openmc.lib.settings.get_batches())) batch_str = str(openmc.lib.current_batch()).zfill(batch_str_len) filename = 'statepoint.{}.h5'.format(batch_str) @@ -1164,8 +1164,8 @@ class CMFDRun: self._k_cmfd.append(self._keff) # Check to perform adjoint on last batch - if (openmc.lib.current_batch() == openmc.lib.settings.batches - and self._run_adjoint): + batches = openmc.lib.settings.get_batches() + if openmc.lib.current_batch() == batches and self._run_adjoint: self._cmfd_solver_execute(adjoint=True) # Calculate fission source