From d09a98ca131abd74c05fb6aeca4dacfb85e192d3 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Fri, 27 Sep 2013 16:55:39 -0400 Subject: [PATCH] cmfd shift cant be infinity due to FPE, making it very large and fixed matrix subtraction in solver --- src/cmfd_solver.F90 | 3 ++- src/global.F90 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmfd_solver.F90 b/src/cmfd_solver.F90 index edcbaf8db2..614362e40d 100644 --- a/src/cmfd_solver.F90 +++ b/src/cmfd_solver.F90 @@ -280,7 +280,8 @@ contains jcol = 1 ROWS: do irow = 1, loss % n COLS: do icol = loss % get_row(irow), loss % get_row(irow + 1) - 1 - if (loss % get_col(icol) == prod % get_col(jcol)) then + if (loss % get_col(icol) == prod % get_col(jcol) .and. & + jcol < prod % get_row(irow + 1)) then loss % val(icol) = loss % val(icol) - ONE/k_s*prod % val(jcol) jcol = jcol + 1 end if diff --git a/src/global.F90 b/src/global.F90 index 5f0f4f2e6b..46f7ba562b 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -357,7 +357,7 @@ module global ! Estimate of spectral radius of CMFD matrices and tolerances real(8) :: cmfd_spectral = ZERO - real(8) :: cmfd_shift = INFINITY + real(8) :: cmfd_shift = 1.e6 real(8) :: cmfd_ktol = 1.e-8_8 real(8) :: cmfd_stol = 1.e-8_8 real(8) :: cmfd_atoli = 1.e-10_8