From cc9bcc577cf9cd686b2a8d9e0e4cb11f5ff0b6d3 Mon Sep 17 00:00:00 2001 From: samuel shaner Date: Sat, 5 Nov 2016 16:40:22 +0000 Subject: [PATCH] added num_delayed_groups attribute to mgxs object --- src/mgxs_header.F90 | 22 ++++++++++++++++++---- tests/1d_mgxs.h5 | Bin 124720 -> 128136 bytes 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/mgxs_header.F90 b/src/mgxs_header.F90 index 7c149d5e1a..fc5e8cb3e1 100644 --- a/src/mgxs_header.F90 +++ b/src/mgxs_header.F90 @@ -64,6 +64,7 @@ module mgxs_header ! Fission information logical :: fissionable ! mgxs object is fissionable? integer :: scatter_format ! either legendre, histogram, or tabular. + integer :: num_delayed_groups ! Num delayed groups ! Caching information integer :: index_temp ! temperature index for nuclide @@ -445,6 +446,9 @@ module mgxs_header call mgxs_from_hdf5(this, xs_id, temperature, method, tolerance, & temps_to_read, order_dim) + ! Set the number of delayed groups + this % num_delayed_groups = delayed_groups + ! Load the more specific data do t = 1, temps_to_read % size() associate(xs => this % xs(t)) @@ -1126,6 +1130,9 @@ module mgxs_header call mgxs_from_hdf5(this, xs_id, temperature, method, tolerance, & temps_to_read, order_dim) + ! Set the number of delayed groups + this % num_delayed_groups = delayed_groups + ! Load the more specific data do t = 1, temps_to_read % size() associate(xs => this % xs(t)) @@ -1556,7 +1563,7 @@ module mgxs_header ! If beta is zeros, raise error if (temp_beta(1,1,1,1) == ZERO) then - call fatal_error("cannot set delayed-nu-fission with a 1D & + call fatal_error("cannot set delayed-nu-fission with a 3D & &array if beta not provided") end if @@ -2030,6 +2037,7 @@ module mgxs_header this % name = trim(mat % name) end if + ! Set whether this material is fissionable this % fissionable = mat % fissionable ! The following info we should initialize, but we dont need it nor @@ -2163,6 +2171,9 @@ module mgxs_header call mgxs_combine(this, temps, mat, nuclides, max_order, scatter_format, & order_dim) + ! Set the number of delayed groups + this % num_delayed_groups = delayed_groups + ! Create the Xs Data for each temperature TEMP_LOOP: do t = 1, temps % size() @@ -2462,6 +2473,9 @@ module mgxs_header call mgxs_combine(this, temps, mat, nuclides, max_order, scatter_format, & order_dim) + ! Set the number of delayed groups + this % num_delayed_groups = delayed_groups + ! Get the number of each polar and azi angles and make sure all the ! NuclideAngle types have the same number of these angles n_pol = -1 @@ -3121,7 +3135,7 @@ module mgxs_header end do ! Adjust dg in case of round off error - dg = min(dg, num_delayed_groups) + dg = min(dg, this % num_delayed_groups) ! Get the outgoing group gout = 1 @@ -3175,7 +3189,7 @@ module mgxs_header ! Get the delayed group dg = 0 - do while (xi_pd < prob_prompt) + do while (xi_pd >= prob_prompt) dg = dg + 1 prob_prompt = prob_prompt + & this % get_xs('delayed-nu-fission', gin, uvw=uvw, dg=dg) / & @@ -3183,7 +3197,7 @@ module mgxs_header end do ! Adjust dg in case of round off error - dg = min(dg, num_delayed_groups) + dg = min(dg, this % num_delayed_groups) ! Get the outgoing group gout = 1 diff --git a/tests/1d_mgxs.h5 b/tests/1d_mgxs.h5 index 5989962ce035ce67a0d1a2fe430b84adee2f2844..e3b85c24163fe4020435db5c5d674575f2b65be0 100644 GIT binary patch delta 1879 zcmc&#Sx}Q#7|kE-5D*lpLRcb+h^7<>OIQU@K$gg&h)Pj#NdXlkg2n|!j4fE%T$0}w zMUg!bTp$ElT|mXEh~k1!1+CZtK@ns`D`Hy|Y#%z)m(H|z=H5Hsde1oz-z~YJn$)ej zpG{4AB{6j%JKS^>u_bzhrSc2?c!E$Rgi4W!Fcq z)><0rZx}=N&xlk8Fj}c(WKFCJzmFgrMMf&^uNh=%vVK-L=n;J#`40#qXb*S!~PZ^#^NN)iai2>sjQs- zGfC`J9;zH+K_hjm|6<|a{Q++}Pn}RB*H?QH{v^wgL)KRFNz2X@Wk=2B2@e1E^#pc9 z1-pUhH<+YF8D+?SHHwf&J~mvhVmTtqdwnC7t8W;jcqTcM{SiGu9nJZ~g*wLRPdk0V zM8b{MH)?B<4>a{ugWocOD3mplI^hUwZ5n^H(Ku4SYAQh`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