MAVRIC.html 348 KB
Newer Older
Batson Iii's avatar
Batson Iii committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901


<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>MAVRIC: Monaco with Automated Variance Reduction using Importance Calculations &mdash; SCALE Manual 0.0.1 documentation</title>
  

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />

  
  
  
  

  
  <!--[if lt IE 9]>
    <script src="_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script src="_static/jquery.js"></script>
        <script src="_static/underscore.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="MAVRIC Appendix A: CAAS Capability" href="CAAScapability.html" />
    <link rel="prev" title="Monaco: A Fixed-Source Monte Carlo Transport Code for Shielding Applications" href="Monaco.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home" alt="Documentation Home"> SCALE Manual
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">Reactor Physics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Polaris.html">Polaris: 2D Light Water Reactor Lattice Physics Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="PolarisA.html">SCALE 6.3 Polaris Input Format</a></li>
</ul>
<p class="caption"><span class="caption-text">Criticality Safety</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Criticality%20Safety%20Overview.html">Criticality Safety Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="CSAS5.html">CSAS5:  Control Module For Enhanced Criticality Safety Analysis Sequences With KENO V.a</a></li>
<li class="toctree-l1"><a class="reference internal" href="CSAS5App.html">Additional Example Applications of CSAS5</a></li>
<li class="toctree-l1"><a class="reference internal" href="CSAS6.html">CSAS6:  Control Module for Enhanced Criticality Safety Analysis with KENO-VI</a></li>
<li class="toctree-l1"><a class="reference internal" href="CSAS6App.html">Additional Example Applications of CSAS6</a></li>
<li class="toctree-l1"><a class="reference internal" href="STARBUCS.html">STARBUCS: A Scale Control Module for Automated Criticality Safety Analyses Using Burnup Credit</a></li>
<li class="toctree-l1"><a class="reference internal" href="Sourcerer.html">Sourcerer: Deterministic Starting Source for Criticality Calculations</a></li>
<li class="toctree-l1"><a class="reference internal" href="DEVC.html">DEVC: Denovo EigenValue Calculation</a></li>
<li class="toctree-l1"><a class="reference internal" href="KMART.html">KMART5 and KMART6: Postprocessors for KENO V.A and KENO-VI</a></li>
<li class="toctree-l1"><a class="reference internal" href="K5C5.html">K5toK6 and C5toC6: Input File Conversion Programs for KENO and CSAS</a></li>
</ul>
<p class="caption"><span class="caption-text">Material Specification and Cross Section Processing</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Material%20Specification%20and%20Cross%20Section%20Processing%20Overview.html">Material Specification and Cross Section Processing Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="XSProc.html">XSPROC: The Material and Cross Section Processing Module for SCALE</a></li>
<li class="toctree-l1"><a class="reference internal" href="XSProcAppA.html">XSProc: Standard Composition Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="XSProcAppB.html">XSProc Standard Composition Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="XSProcAppC.html">Examples of Complete XSProc Input Data</a></li>
<li class="toctree-l1"><a class="reference internal" href="stdcmp.html">Standard Composition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="BONAMI.html">BONAMI: Resonance Self-Shielding by the Bondarenko Method</a></li>
<li class="toctree-l1"><a class="reference internal" href="CENTRM.html">CENTRM: A Neutron Transport Code for Computing Continuous-Energy Spectra in General One-Dimensional Geometries and Two-Dimensional Lattice Cells</a></li>
<li class="toctree-l1"><a class="reference internal" href="PMC.html">PMC: A Program to Produce Multigroup Cross Sections Using Pointwise Energy Spectra from CENTRM</a></li>
<li class="toctree-l1"><a class="reference internal" href="PMCAppAB.html">PMC Appendices A and B</a></li>
<li class="toctree-l1"><a class="reference internal" href="CHOPS.html">CHOPS: Module to Compute Pointwise Disadvantage Factors and Produce a Cell-Homogenized CENTRM Library</a></li>
</ul>
<p class="caption"><span class="caption-text">Monte Carlo Transport</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Monte%20Carlo%20Transport%20Overview.html">Monte Carlo Transport Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="Keno.html">Keno: A Monte Carlo Criticality Program</a></li>
<li class="toctree-l1"><a class="reference internal" href="KenoA.html">Keno Appendix A: KENO V.a Shape Descriptions</a></li>
<li class="toctree-l1"><a class="reference internal" href="KenoB.html">Keno Appendix B: KENO VI Shape Descriptions</a></li>
<li class="toctree-l1"><a class="reference internal" href="KenoC.html">Keno Appendix C: Sample problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Monaco.html">Monaco: A Fixed-Source Monte Carlo Transport Code for Shielding Applications</a></li>
</ul>
<p class="caption"><span class="caption-text">Radiation Shielding</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">MAVRIC: Monaco with Automated Variance Reduction using Importance Calculations</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#introduction">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="#cadis-methodology">CADIS Methodology</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#overview-of-cadis">Overview of CADIS</a></li>
<li class="toctree-l3"><a class="reference internal" href="#multiple-sources-with-cadis">Multiple sources with CADIS</a></li>
<li class="toctree-l3"><a class="reference internal" href="#multiple-tallies-with-cadis">Multiple tallies with CADIS</a></li>
<li class="toctree-l3"><a class="reference internal" href="#forward-weighted-cadis">Forward-weighted CADIS</a></li>
<li class="toctree-l3"><a class="reference internal" href="#mavric-implementation-of-cadis">MAVRIC Implementation of CADIS</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#denovo">Denovo</a></li>
<li class="toctree-l4"><a class="reference internal" href="#monaco">Monaco</a></li>
<li class="toctree-l4"><a class="reference internal" href="#running-mavric">Running MAVRIC</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#mavric-input">MAVRIC input</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#composition-block">Composition block</a></li>
<li class="toctree-l3"><a class="reference internal" href="#sggp-geometry-blocks">SGGP geometry blocks</a></li>
<li class="toctree-l3"><a class="reference internal" href="#other-blocks-shared-with-monaco">Other blocks shared with Monaco</a></li>
<li class="toctree-l3"><a class="reference internal" href="#importance-map-block">Importance map block</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#constructing-a-mesh-for-the-sn-calculation">Constructing a mesh for the S<sub>N</sub> calculation</a></li>
<li class="toctree-l4"><a class="reference internal" href="#macromaterials-for-sn-geometries">Macromaterials for S<sub>N</sub> geometries</a></li>
<li class="toctree-l4"><a class="reference internal" href="#optimizing-source-detector-problems">Optimizing source/detector problems</a></li>
<li class="toctree-l4"><a class="reference internal" href="#multiple-adjoint-sources">Multiple adjoint sources</a></li>
<li class="toctree-l4"><a class="reference internal" href="#options-for-denovo-s-n-calculations">Options for Denovo <span class="math notranslate nohighlight">\(S_n\)</span> calculations</a></li>
<li class="toctree-l4"><a class="reference internal" href="#starting-with-an-existing-adjoint-flux-file">Starting with an existing adjoint flux file</a></li>
<li class="toctree-l4"><a class="reference internal" href="#forward-weighting-the-adjoint-source">Forward-weighting the adjoint source</a></li>
<li class="toctree-l4"><a class="reference internal" href="#forward-weighting-with-an-existing-forward-flux-file">Forward weighting with an existing forward flux file</a></li>
<li class="toctree-l4"><a class="reference internal" href="#using-the-importance-map">Using the importance map</a></li>
<li class="toctree-l4"><a class="reference internal" href="#other-notes-on-importance-map-calculations">Other notes on importance map calculations</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#mavric-output">MAVRIC output</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#main-text-output-file">Main text output file</a></li>
<li class="toctree-l3"><a class="reference internal" href="#additional-output-files">Additional output files</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#sample-problems">Sample problems</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#graphite-shielding-measurements-with-cadis">Graphite shielding measurements with CADIS</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#input-file">Input file</a></li>
<li class="toctree-l4"><a class="reference internal" href="#output">Output</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#dose-rates-outside-of-a-simple-cask">Dose rates outside of a simple cask</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#geometry-and-materials">Geometry and materials</a></li>
<li class="toctree-l4"><a class="reference internal" href="#sources-and-responses">Sources and responses</a></li>
<li class="toctree-l4"><a class="reference internal" href="#analog-calculation">Analog calculation</a></li>
<li class="toctree-l4"><a class="reference internal" href="#sas4-calculations">SAS4 calculations</a></li>
<li class="toctree-l4"><a class="reference internal" href="#calculations-using-cadis">Calculations using CADIS</a></li>
<li class="toctree-l4"><a class="reference internal" href="#mavric-input-files">MAVRIC input files</a></li>
<li class="toctree-l4"><a class="reference internal" href="#neutron-source-neutron-response-results">Neutron source/neutron response results</a></li>
<li class="toctree-l4"><a class="reference internal" href="#photon-source-photon-response-results">Photon source/photon response results</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#gamma-ray-litho-density-logging-tool-using-fw-cadis">Gamma-ray litho-density logging tool using FW-CADIS</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id19">Input file</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id20">Output</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#aos-100-using-fw-cadis-and-continuous-energy-transport">AOS-100 using FW-CADIS and continuous-energy transport</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id21">Input file</a></li>
<li class="toctree-l4"><a class="reference internal" href="#output-file">Output file</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#independent-spent-fuel-storage-installation">Independent spent fuel storage installation</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#source-term">Source term</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id22">Input file</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id23">Output</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#tn24-p-spent-fuel-cask">TN24-P spent fuel cask</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id25">Input file</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id26">Output</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="CAAScapability.html">MAVRIC Appendix A: CAAS Capability</a></li>
<li class="toctree-l1"><a class="reference internal" href="appendixb.html">MAVRIC Appendix B: MAVRIC Utilities</a></li>
<li class="toctree-l1"><a class="reference internal" href="appendixc.html">MAVRIC Appendix C: Advanced Features</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">SCALE Manual</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
        
      <li>MAVRIC: Monaco with Automated Variance Reduction using Importance Calculations</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/MAVRIC.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="mavric-monaco-with-automated-variance-reduction-using-importance-calculations">
<span id="mavric"></span><h1>MAVRIC: Monaco with Automated Variance Reduction using Importance Calculations<a class="headerlink" href="#mavric-monaco-with-automated-variance-reduction-using-importance-calculations" title="Permalink to this headline"></a></h1>
<p><em>D. E. Peplow and C. Celik</em></p>
<div class="section" id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h2>
<p>Monte Carlo particle transport calculations for deep penetration problems can require very long run
times in order to achieve an acceptable level of statistical uncertainty in the final answers.
Discrete-ordinates codes can be faster but have limitations relative to the discretization of space, energy,
and direction. Monte Carlo calculations can be modified (biased) to produce results with the same variance in
less time if an approximate answer or some other additional information is already known about the problem.
If importances can be assigned to different particles based on how much they will contribute to the final answer,
then more time can be spent on important particles, with less time devoted to unimportant particles. One of the best
ways to bias a Monte Carlo code for a particular tally is to form an importance map from the adjoint flux based on
that tally. Unfortunately, determining the exact adjoint flux could be just as difficult as computing the original
problem itself.  However, an approximate adjoint can still be very useful in biasing the Monte Carlo
solution <a class="bibtex reference internal" href="#wagner-acceleration-1997" id="id1">[Wag97]</a>. Discrete ordinates can be used to quickly compute that approximate adjoint. Together, Monte Carlo and discrete ordinates can be used to find solutions to thick shielding problems in reasonable times.</p>
<p>The MAVRIC (Monaco with Automated Variance Reduction using Importance Calculations) sequence is based on the
CADIS (Consistent Adjoint Driven Importance Sampling) and FW-CADIS (Forward-Weighted CADIS)
methodologies <a class="bibtex reference internal" href="#wagner-automated-1998" id="id2">[WH98]</a> <a class="bibtex reference internal" href="#wagner-automated-2002" id="id3">[Wag02]</a> <a class="bibtex reference internal" href="#haghighat-monte-2003" id="id4">[HW03]</a>
<a class="bibtex reference internal" href="#wagner-forward-weighted-2007" id="id5">[WBP07]</a> MAVRIC automatically performs a three-dimensional, discrete-ordinates
calculation using Denovo to compute the adjoint flux as a function of position and energy. This adjoint flux
information is then used to construct an importance map (i.e., target weights for weight windows) and a biased
source distribution that work together—particles are born with a weight matching the target weight of the cell
into which they are born. The fixed-source Monte Carlo radiation transport Monaco <a class="bibtex reference internal" href="Monte%20Carlo%20Transport%20Overview.html#peplow-monte-2011" id="id6">[Pep11]</a>
then uses the importance map for biasing during particle transport, and it uses the biased source distribution
as its source. During transport, the particle weight is compared with the importance map after each particle
interaction and whenever a particle crosses into a new importance cell in the map.</p>
<p>For problems that do not require variance reduction to complete in a reasonable time,
execution of MAVRIC without the importance map calculation provides an easy way to run Monaco.
For problems that do require variance reduction to complete in a reasonable time, MAVRIC removes the burden of setting weight windows from the user and performs it automatically with a minimal amount of additional input. Note that the MAVRIC sequence can be used with the final Monaco calculation as either a multigroup (MG) or a continuous-energy (CE) calculation.</p>
<p>Monaco has a wide variety of tally options: it can calculate fluxes (by group) at a point in space,
over any geometrical region, or for a user-defined, three-dimensional, rectangular grid.
These tallies can also integrate the fluxes with either standard response functions from the cross
section library or user-defined response functions. All of these tallies are available in the MAVRIC sequence.</p>
<p>Although it was originally designed for CADIS, the MAVRIC sequence is also capable of
creating importance maps using both forward and adjoint deterministic estimates.
The FW-CADIS method <a class="bibtex reference internal" href="#wagner-fw-cadis-2014" id="id7">[WPM14]</a> can be used for optimizing several tallies at once,
a mesh tally over a large region, or a mesh tally over the entire problem. Several other methods for
producing importance maps are also available in MAVRIC and are explored in <a class="reference internal" href="appendixc.html#appendixc"><span class="std std-ref">MAVRIC Appendix C: Advanced Features</span></a>.</p>
</div>
<div class="section" id="cadis-methodology">
<h2>CADIS Methodology<a class="headerlink" href="#cadis-methodology" title="Permalink to this headline"></a></h2>
<p>MAVRIC is an implementation of CADIS (Consistent Adjoint Driven Importance Sampling) using the Denovo
SN and Monaco Monte Carlo functional modules. Source biasing and a mesh-based importance map, overlaying
the physical geometry, are the basic methods of variance reduction. To make the best use of an
importance map, the map must be made consistent with the source biasing. If the source biasing is inconsistent
with the weight windows that will be used during the transport process, then source particles will undergo Russian
roulette or splitting immediately, wasting computational time and negating the intent of the biasing.</p>
<div class="section" id="overview-of-cadis">
<h3>Overview of CADIS<a class="headerlink" href="#overview-of-cadis" title="Permalink to this headline"></a></h3>
<p>CADIS is well described in the literature, so only a
brief overview is given here. Consider a class source-detector problem
described by a unit source with emission probability distribution
function <span class="math notranslate nohighlight">\(q\left(\overrightarrow{r},E \right)\)</span> and a detector
response function <span class="math notranslate nohighlight">\(\sigma_{d}\left(\overrightarrow{r},E \right)\)</span>.
To determine the total detector response, <em>R</em>, the forward scalar flux
<span class="math notranslate nohighlight">\(\phi\left(\overrightarrow{r},E \right)\)</span> must be known. The
response is found by integrating the product of the detector response
function and the flux over the detector volume <span class="math notranslate nohighlight">\(V_{d}\)</span>:</p>
<div class="math notranslate nohighlight" id="equation-mavric-1">
<span class="eqno">(237)<a class="headerlink" href="#equation-mavric-1" title="Permalink to this equation"></a></span>\[R = \int_{V_{d}}^{}{\int_{E}^{}{\sigma_{d}\left( \overrightarrow{r},E \right)}}\phi\left(\overrightarrow{r},E \right)\textit{dE dV.}\]</div>
<p>Alternatively, if the adjoint scalar flux,
<span class="math notranslate nohighlight">\(\phi^{+}\left(\overrightarrow{r},E \right)\)</span>, is known from the
corresponding adjoint problem with adjoint source
<span class="math notranslate nohighlight">\(q^{+}\left(\overrightarrow{r},E \right) = \sigma_{d}\left(\overrightarrow{r},E \right)\)</span>,
then the total detector response could be found by integrating the
product of the forward source and the adjoint flux over the source
volume, <span class="math notranslate nohighlight">\(V_{s}\)</span>:</p>
<div class="math notranslate nohighlight" id="equation-mavric-2">
<span class="eqno">(238)<a class="headerlink" href="#equation-mavric-2" title="Permalink to this equation"></a></span>\[R = \int_{V_{s}}^{}{\int_{E}^{}{q\left(\overrightarrow{r},E \right)}}\phi^{+}\left( \overrightarrow{r},E \right)\textit{dE dV.}\]</div>
<p>Unfortunately, the exact adjoint flux may be just as difficult to
determine as the forward flux, but an approximation of the adjoint flux
can still be used to form an importance map and a biased source
distribution for use in the forward Monte Carlo calculation.</p>
<p>Wagner <a class="bibtex reference internal" href="#wagner-acceleration-1997" id="id8">[Wag97]</a> showed that if an estimate of the adjoint scalar flux
for the corresponding adjoint problem can be found, then an estimate
of the response <em>R</em> can be made using <a class="reference internal" href="#equation-mavric-2">(238)</a>. The adjoint source for the
adjoint problem is typically separable and corresponds to the detector
response and spatial area of the tally to be optimized:
<span class="math notranslate nohighlight">\(q^{+}\left(\overrightarrow{r},E \right) = \sigma_{d}\left(E \right)g\left( \overrightarrow{r} \right)\)</span>,
where <span class="math notranslate nohighlight">\(\sigma_{d}\left( E \right)\)</span> is a flux-to-dose conversion
factor and <span class="math notranslate nohighlight">\(g\left( \overrightarrow{r} \right)\)</span> is 1 in the tally
volume and is 0 otherwise. Then, from the adjoint flux
<span class="math notranslate nohighlight">\(\phi^{+}\left( \overrightarrow{r},E \right)\)</span> and response
estimate <em>R</em>, a biased source distribution,
<span class="math notranslate nohighlight">\(\widehat{q}\left( \overrightarrow{r},E \right)\)</span>, for source
sampling of the form</p>
<div class="math notranslate nohighlight" id="equation-mavric-3">
<span class="eqno">(239)<a class="headerlink" href="#equation-mavric-3" title="Permalink to this equation"></a></span>\[\widehat{q}\left(\overrightarrow{r},E \right) = \frac{1}{R}q\left(\overrightarrow{r},E\right)\phi^{+}\left( \overrightarrow{r},E \right)\]</div>
<p>and weight window target values,
<span class="math notranslate nohighlight">\(\overline{w}\left( \overrightarrow{r},E \right)\)</span>, for particle
transport of the form</p>
<div class="math notranslate nohighlight" id="equation-mavric-4">
<span class="eqno">(240)<a class="headerlink" href="#equation-mavric-4" title="Permalink to this equation"></a></span>\[\overline{w}\left( \overrightarrow{r},E \right) = \frac{R}{\phi^{+}\left( \overrightarrow{r},E \right)}\]</div>
<p>can be constructed, which minimizes the variance in the forward Monte
Carlo calculation of <em>R</em>.</p>
<p>When a particle is sampled from the biased source distribution
<span class="math notranslate nohighlight">\(\widehat{q}\left( \overrightarrow{r},E \right)\)</span>, to preserve a
fair game, its initial weight is set to</p>
<div class="math notranslate nohighlight" id="equation-mavric-5">
<span class="eqno">(241)<a class="headerlink" href="#equation-mavric-5" title="Permalink to this equation"></a></span>\[w_{0}\left(\overrightarrow{r},E \right) = \frac{q\left(\overrightarrow{r},E \right)}{\widehat{q}\left( \overrightarrow{r},E \right)} = \frac{R}{\phi^{+}\left( \overrightarrow{r},E \right)}\,\]</div>
<p>which exactly matches the target weight for that particle’s position and
energy. This is the “consistent” part of CADIS—source particles are born
with a weight matching the weight window of the region/energy into which they are
born. The source biasing and the weight windows work together.</p>
<p>CADIS has been applied to many problems—including reactor ex-core
detectors, well-logging instruments, cask shielding studies, and
independent spent fuel storage facility models—and has demonstrated very
significant speed-ups in calculation time compared to analog
simulations.</p>
</div>
<div class="section" id="multiple-sources-with-cadis">
<h3>Multiple sources with CADIS<a class="headerlink" href="#multiple-sources-with-cadis" title="Permalink to this headline"></a></h3>
<p>For a typical Monte Carlo calculation with multiple sources—each with a
probability distribution function
<span class="math notranslate nohighlight">\(q_{i}\left( \overrightarrow{r},E \right)\)</span> and a strength
<span class="math notranslate nohighlight">\(S_{i}\)</span>, giving a total source strength of
<span class="math notranslate nohighlight">\(S = \sum_{}^{}S_{i}\)</span>—the source is sampled in two steps. First,
the specific source <em>i</em> is sampled with probability
<span class="math notranslate nohighlight">\(p\left( i \right) = \ S_{i}/S\)</span>, and then the particle is sampled
from the specific source distribution
<span class="math notranslate nohighlight">\(q_{i}\left( \overrightarrow{r},E \right)\)</span>.</p>
<p>The source sampling can be biased at both levels: from which source to sample
and how to sample each source. For example, the specific source can
be sampled using some arbitrary distribution,
<span class="math notranslate nohighlight">\(\widehat{p}\left( i \right)\)</span>, and then the individual sources can
be sampled using distributions
<span class="math notranslate nohighlight">\({\widehat{q}}_{i}\left( \overrightarrow{r},E \right)\)</span>. Particles
would then have a birth weight of</p>
<div class="math notranslate nohighlight" id="equation-mavric-6">
<span class="eqno">(242)<a class="headerlink" href="#equation-mavric-6" title="Permalink to this equation"></a></span>\[w_{0} \equiv \ \left(\frac{p\left( i \right)}{\widehat{p}\left( i \right)} \right)\left(\frac{q_{i}\left( \overrightarrow{r},E \right)}{{\widehat{q}}_{i}\left( \overrightarrow{r},E \right)} \right)\text{.}\]</div>
<p>For CADIS, a biased multiple source needs to be developed so that the
birth weights of sampled particles still match the target weights of the
importance map. For a problem with multiple sources—each with a
distribution <span class="math notranslate nohighlight">\(q_{i}\left( \overrightarrow{r},E \right)\)</span> and a
strength <span class="math notranslate nohighlight">\(S_{i}\)</span>—the goal of the Monte Carlo calculation is to
compute some response <span class="math notranslate nohighlight">\(R\)</span> for a response function
<span class="math notranslate nohighlight">\(\sigma_{d}\left( \overrightarrow{r},E \right)\)</span> at a given
detector,</p>
<div class="math notranslate nohighlight" id="equation-mavric-7">
<span class="eqno">(243)<a class="headerlink" href="#equation-mavric-7" title="Permalink to this equation"></a></span>\[R = \ \int_{V}^{}{\int_{E}^{}{\sigma_{d}\left( \overrightarrow{r},E \right)\phi \left( \overrightarrow{r},E \right)\textit{dE dV.}}}\]</div>
<p>Note that the flux <span class="math notranslate nohighlight">\(\phi\left( \overrightarrow{r},E \right)\)</span> has
contributions from each source. The response, <span class="math notranslate nohighlight">\(R_{i}\)</span>, from each
specific source (<span class="math notranslate nohighlight">\(S_{i}\)</span> with
<span class="math notranslate nohighlight">\(q_{i}\left( \overrightarrow{r},E \right)\)</span>) can be expressed using
just the flux from that source,
<span class="math notranslate nohighlight">\(\phi_{i}\left( \overrightarrow{r},E \right)\)</span>, as</p>
<div class="math notranslate nohighlight" id="equation-mavric-8">
<span class="eqno">(244)<a class="headerlink" href="#equation-mavric-8" title="Permalink to this equation"></a></span>\[R_{i} = \ \int_{V}^{}{\int_{E}^{}{\sigma_{d}\left(\overrightarrow{r},E \right)\ \phi_{i}\left(\overrightarrow{r},E \right)\textit{dE dV .}}}\]</div>
<p>The total response is then found as <span class="math notranslate nohighlight">\(R = \sum_{i}^{}R_{i}\)</span>.</p>
<p>For the adjoint problem, using the adjoint source of
<span class="math notranslate nohighlight">\(q^{+}\left( \overrightarrow{r},E \right) = \sigma_{d}\left( \overrightarrow{r},E \right)\)</span>,
the response <span class="math notranslate nohighlight">\(R\)</span> can also be calculated as</p>
<div class="math notranslate nohighlight" id="equation-mavric-9">
<span class="eqno">(245)<a class="headerlink" href="#equation-mavric-9" title="Permalink to this equation"></a></span>\[R = \ \int_{V}^{}{\int_{E}^{}{\left\lbrack \sum_{i}^{}{S_{i}q_{i}\left( \overrightarrow{r},E \right)} \right\rbrack\ \phi^{+}\left( \overrightarrow{r},E \right)\textit{dE dV}}},\]</div>
<p>with the response contribution from each specific source being</p>
<div class="math notranslate nohighlight" id="equation-mavric-10">
<span class="eqno">(246)<a class="headerlink" href="#equation-mavric-10" title="Permalink to this equation"></a></span>\[R_{i} = \ \int_{V}^{}{\int_{E}^{}{\ {S_{i}q_{i}\left( \overrightarrow{r},E \right)\phi^{+}}\left( \overrightarrow{r}, E \right)\textit{dE dV.}}}\]</div>
<p>The target weights
<span class="math notranslate nohighlight">\(\overline{w}\left( \overrightarrow{r},E \right)\)</span> of the
importance map are found using</p>
<div class="math notranslate nohighlight" id="equation-mavric-11">
<span class="eqno">(247)<a class="headerlink" href="#equation-mavric-11" title="Permalink to this equation"></a></span>\[\overline{w}\left( \overrightarrow{r},E \right) = \frac{R/S}{\phi^{+}\left( \overrightarrow{r},E \right)\ }.\]</div>
<p>Each biased source
<span class="math notranslate nohighlight">\({\widehat{q}}_{i}\left( \overrightarrow{r},E \right)\)</span> pdf is
found using</p>
<div class="math notranslate nohighlight" id="equation-mavric-12">
<span class="eqno">(248)<a class="headerlink" href="#equation-mavric-12" title="Permalink to this equation"></a></span>\[{\widehat{q}}_{i}\left(\overrightarrow{r},E \right) = \frac{S_{i}}{R_{i}}{q_{i}\left( \overrightarrow{r},E \right)\phi}^{+}\left( \overrightarrow{r},E \right)\ ,\]</div>
<p>and the biased distribution used to select an individual source is
<span class="math notranslate nohighlight">\(\widehat{p}\left( i \right) = \ R_{i}/\sum_{}^{}{R_{i} = R_{i}/R}\)</span>.</p>
<p>When using the biased distribution used to select an individual source,
<span class="math notranslate nohighlight">\(\widehat{p}\left( i \right)\)</span>, and the biased source distribution,
<span class="math notranslate nohighlight">\({\widehat{q}}_{i}\left( \overrightarrow{r},E \right)\)</span>, the birth
weight of the sampled particle will be</p>
<div class="math notranslate nohighlight" id="equation-mavric-13">
<span class="eqno">(249)<a class="headerlink" href="#equation-mavric-13" title="Permalink to this equation"></a></span>\[\begin{split} \begin{matrix}
    w_{0} &amp; \equiv &amp; \left( \frac{p\left( i \right)}{\widehat{p}\left( i \right)} \right)\left( \frac{q_{i}\left( \overrightarrow{r}, E \right)}{{\widehat{q}}_{i}\left(\overrightarrow{r},E \right)} \right) \\ &amp; = &amp; \ \left( \frac{\frac{S_{i}}{S}}{\frac{R_{i}}{R}} \right) \left( \frac{q_{i}\left( \overrightarrow{r},E \right)}{\frac{S_{i}}{R_{i}}{q_{i}\left( \overrightarrow{r},E \right)\phi^{+}}\left( \overrightarrow{r},E \right)} \right) \\
    &amp; = &amp; \frac{R/S}{{\phi}^{+}\left( \overrightarrow{r},E \right)\ }, \\
\end{matrix}\end{split}\]</div>
<p>which matches the target weight,
<span class="math notranslate nohighlight">\(\overline{w}\left( \overrightarrow{r},E \right)\)</span>.</p>
</div>
<div class="section" id="multiple-tallies-with-cadis">
<h3>Multiple tallies with CADIS<a class="headerlink" href="#multiple-tallies-with-cadis" title="Permalink to this headline"></a></h3>
<p>The CADIS methodology works quite well for classic source/detector problems.
The statistical uncertainty of the tally that serves as the adjoint source is greatly reduced since the
Monte Carlo transport is optimized to spend more simulation time on those particles that contribute to the
tally, at the expense of tracking particles in other parts of phase space. However, more recently,
Monte Carlo has been applied to problems in which multiple tallies need to all be found with low statistical
uncertainties. The extension of this idea is the mesh tally—where each voxel is a tally for which the user desires
low statistical uncertainties. For these problems, the user must accept a total simulation time that is controlled
by the tally with the slowest convergence and simulation results where the tallies have a wide range of relative
uncertainties.</p>
<p>The obvious way around this problem is to create a separate problem for each tally and use CADIS to optimize each.
Each simulation can then be run until the tally reaches the level of acceptable uncertainty.
For more than a few tallies, this approach becomes complicated and time-consuming for the user.
For large mesh tallies, this approach is not reasonable.</p>
<p>Another approach to treat several tallies, if they are in close proximity to each other,
or a mesh tally covering a small portion of the physical problem, is to use the CADIS methodology
with the adjoint source near the middle of the tallies to be optimized. Since particles in the
forward Monte Carlo simulation are optimized to reach the location of the adjoint source, all the
tallies surrounding that adjoint source should converge quickly. This approach requires the
difficult question of “how close.” If the tallies are too far apart, then certain energies or regions that are
needed for one tally may be of low importance for getting particles to the central adjoint source. This may
under-predict the flux or dose at the tally sites far from the adjoint source.</p>
<p>MAVRIC has the capability to have multiple adjoint sources with this problem in mind.
For several tallies that are far from each other, multiple adjoint sources could be used.
In the forward Monte Carlo, particles would be drawn to one of those adjoint sources.
The difficulty with this approach is that typically the tally that is closest to the true
physical source converges faster than the other tallies—–showing that the closest adjoint source
seems to attract more particles than the others. Assigning more strength to the adjoint
source further from the true physical source helps to address this issue, but finding the correct strengths so
that all of the tallies converge to the same relative uncertainty in one simulation is an iterative process for the user.</p>
</div>
<div class="section" id="forward-weighted-cadis">
<h3>Forward-weighted CADIS<a class="headerlink" href="#forward-weighted-cadis" title="Permalink to this headline"></a></h3>
<p>To converge several tallies to the same relative uncertainty in
one simulation, the adjoint source corresponding to each of those
tallies must be weighted inversely by the expected tally value. To calculate the
dose rate at two points—–say one near a reactor
and one far from a reactor—–in one simulation, then the total adjoint
source used to develop the weight windows and biased source must
have two parts. The adjoint source far from the reactor must have
more strength than the adjoint source near the reactor by a factor equal
to the ratio of the expected near dose rate to the expected far dose
rate.</p>
<p>This concept can be extended to mesh tallies, as well. Instead of using a
uniform adjoint source strength over the entire mesh tally volume, each
voxel of the adjoint source should be weighted inversely by the expected
forward tally value for that voxel. Areas of low flux or low dose rate
would have more adjoint source strength than areas of high flux or high
dose rate.</p>
<p>An estimate of the expected tally results can be found by using a quick
discrete-ordinates calculation. This leads to an extension of the CADIS
method: forward-weighted CADIS (FW-CADIS). First, a forward S<sub>N</sub> calculation is performed to
estimate the expected tally results. A total adjoint source is
constructed so that the adjoint source corresponding to each tally is
weighted inversely by those forward tally estimates. Then the standard
CADIS approach is used—an importance map (target weight windows) and a
biased source are made using the adjoint flux computed from the adjoint
S<sub>N</sub> calculation.</p>
<p>For example, if the goal is to calculate a detector response function
<span class="math notranslate nohighlight">\(\sigma_{d}\left( E \right)\)</span> (such as dose rate using
flux-to-dose-rate conversion factors) over a volume (defined by
<span class="math notranslate nohighlight">\(g\left( \overrightarrow{r} \right)\)</span>) corresponding to mesh tally,
then instead of simply using
<span class="math notranslate nohighlight">\(q^{+}\left( \overrightarrow{r},E \right) = \sigma_{d}\left( E \right)\ g(\overrightarrow{r})\)</span>,
the adjoint source would be</p>
<div class="math notranslate nohighlight" id="equation-mavric-14">
<span class="eqno">(250)<a class="headerlink" href="#equation-mavric-14" title="Permalink to this equation"></a></span>\[ q^{+}\left( \overrightarrow{r},E \right) = \frac{\sigma_{d}\left( E \right)\text{g}\left( \overrightarrow{r} \right)}{\int_{}^{}{\sigma_{d}\left( E \right)\phi\left( \overrightarrow{r},E \right)}\textit{dE}}\ ,\]</div>
<p>where <span class="math notranslate nohighlight">\(\phi\left( \overrightarrow{r},E \right)\)</span> is an estimate of
the forward flux, and the energy integral is over the voxel at <span class="math notranslate nohighlight">\(\overrightarrow{r}\)</span>.
The adjoint source is nonzero only where the mesh tally is defined
(<span class="math notranslate nohighlight">\(g\left( \overrightarrow{r} \right)\)</span>), and its strength is
inversely proportional to the forward estimate of dose rate.</p>
<p>The relative uncertainty of a tally is controlled by two components:
(1) the number of tracks contributing to the tally and (2) the
shape of the distribution of scores contributing to that tally. In the
Monte Carlo game, the number of simulated particles,
<span class="math notranslate nohighlight">\(m\left( \overrightarrow{r},E \right)\)</span>, can be related to the true
physical particle density, <span class="math notranslate nohighlight">\(n\left( \overrightarrow{r},E \right),\)</span>
by the average Monte Carlo weight of scoring particles,
<span class="math notranslate nohighlight">\(\overline{w}\left( \overrightarrow{r},E \right)\)</span>, by</p>
<div class="math notranslate nohighlight" id="equation-mavric-15">
<span class="eqno">(251)<a class="headerlink" href="#equation-mavric-15" title="Permalink to this equation"></a></span>\[n\left( \overrightarrow{r},E \right) = \ \overline{w}\left( \overrightarrow{r},E \right)\text{m}\left( \overrightarrow{r},E \right).\]</div>
<p>In a typical Monte Carlo calculation, tallies are made by adding some
score, multiplied by the current particle weight, to an accumulator. To
calculate a similar quantity related to the Monte Carlo particle density
would be very close to calculating any other quantity but without
including the particle weight. The goal of FW-CADIS is to make the Monte
Carlo particle density, <span class="math notranslate nohighlight">\(m\left( \overrightarrow{r},E \right)\)</span>,
uniform over the tally areas, so an importance map must be developed
that represents the importance of achieving uniform Monte Carlo particle
density. By attempting to keep the Monte Carlo particle density more
uniform, more uniform relative errors for the tallies should be
realized.</p>
<p>Two options for forward weighting are possible. For tallies over some
area where the entire group-wise flux is needed with low relative
uncertainties, the adjoint source should be weighted inversely by the
forward flux, <span class="math notranslate nohighlight">\(\phi\left( \overrightarrow{r},E \right)\)</span>. The other
option, for a tally in which only an energy-integrated quantity is desired,
is to weight the adjoint inversely by that energy-integrated
quantity,<span class="math notranslate nohighlight">\(\int_{}^{}{\sigma_{d}\left( E \right)\phi\left( \overrightarrow{r},E \right)}\text{\ dE}\)</span>.
For a tally in which the total flux is desired, then the response in the
adjoint source is simply <span class="math notranslate nohighlight">\(\sigma_{d}\left( E \right) = 1\)</span>.</p>
<p>To optimize the forward Monte Carlo simulation for the calculation of
some quantity at multiple tally locations or across a mesh tally, the
adjoint source must be weighted by the estimate of that quantity.
For a tally defined by its spatial location
<span class="math notranslate nohighlight">\(g\left( \overrightarrow{r} \right)\)</span> and its optional response
<span class="math notranslate nohighlight">\(\sigma_{d}\left( E \right)\)</span>, the standard adjoint source would be
<span class="math notranslate nohighlight">\(q^{+}\left( \overrightarrow{r},E \right) = \sigma_{d}\left( E \right)\text{g}\left( \overrightarrow{r} \right)\)</span>.
The forward-weighted adjoint source,
<span class="math notranslate nohighlight">\(q^{+}\left( \overrightarrow{r},E \right)\)</span>, depending on what
quantity is to be optimized, is listed below.</p>
<table class="colwidths-given docutils align-default">
<colgroup>
<col style="width: 14%" />
<col style="width: 29%" />
<col style="width: 57%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>For the calculation of</p></th>
<th class="head"></th>
<th class="head"><p>Adjoint source</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Energy and spatially dependent flux</p></td>
<td><p><span class="math notranslate nohighlight">\(\phi\left(\overrightarrow{r},E \right)\)</span></p></td>
<td><div class="math notranslate nohighlight">
\[\frac{g\left( \overrightarrow{r}\right)}{\phi\left(\overrightarrow{r},E \right)}\]</div>
</td>
</tr>
<tr class="row-odd"><td><p>Spatially dependent total flux</p></td>
<td><p><span class="math notranslate nohighlight">\(\int_{}^{}{\phi\left( \overrightarrow{r},E \right)}\textit{dE}\)</span></p></td>
<td><div class="math notranslate nohighlight">
\[\frac{g\left( \overrightarrow{r}\right)}{\int_{}^{}{\phi\left( \overrightarrow{r},E \right)}\textit{dE}}\]</div>
</td>
</tr>
<tr class="row-even"><td><p>Spatially dependent total response</p></td>
<td><p><span class="math notranslate nohighlight">\(\int_{}^{}{\sigma_{d}\left( E \right)\phi    \left(\overrightarrow{r},E\right)}\textit{dE}\)</span></p></td>
<td><div class="math notranslate nohighlight">
\[\frac{\sigma_{d}\left( E \right)\text{g}\left( \overrightarrow{r} \right)}{\int_{}^{}{\sigma_{d}\left( E \right)\phi    \left( \overrightarrow{r},E \right)}\textit{dE}}\]</div>
</td>
</tr>
</tbody>
</table>
<p>The bottom line of FW-CADIS is that in order to calculate a quantity at
multiple tally locations (or across a mesh tally) with more uniform
relative uncertainties, an adjoint source must be developed for an
objective function that keeps some non-physical quantity—related to the
Monte Carlo particle density and similar in form to the desired
quantity—constant. FW-CADIS uses the solution of a forward
discrete-ordinates calculation to properly weight the adjoint source.
After that, the standard CADIS approach is used.</p>
</div>
<div class="section" id="mavric-implementation-of-cadis">
<h3>MAVRIC Implementation of CADIS<a class="headerlink" href="#mavric-implementation-of-cadis" title="Permalink to this headline"></a></h3>
<p>With MAVRIC, as with other shielding codes, the user defines the problem as a set of
physical models—the material compositions, the geometry, the source, and the detectors
(locations and response functions)—as well as some mathematical parameters on how to solve
the problem (number of histories, etc.). For the variance reduction portion of MAVRIC, the
only additional inputs required are (1) the mesh planes to use in the discrete-ordinates
calculation(s) and (2) the adjoint source description—–basically the location and the response
of each tally to optimize in the forward Monte Carlo calculation. MAVRIC uses this information
to construct a Denovo adjoint problem. (The adjoint source is weighted by a Denovo forward flux
or response estimate for FW-CADIS applications.)  MAVRIC then uses the CADIS methodology: it combines
the adjoint flux from the Denovo calculation with the source description and creates the importance map
(weight window targets) and the mesh-based biased source. Monaco is then run using the CADIS biased source
distribution and the weight window targets.</p>
<div class="section" id="denovo">
<h4>Denovo<a class="headerlink" href="#denovo" title="Permalink to this headline"></a></h4>
<p>Denovo is a parallel three-dimensional SN code that is used to generate adjoint (and, for FW-CADIS, forward)
scalar fluxes for the CADIS methods in MAVRIC. For use in MAVRIC/CADIS, it is highly desirable that the SN code be fast,
positive, and robust. The phase-space shape of the forward and adjoint fluxes, as opposed to a highly accurate solution,
is the most important quality for Monte Carlo weight-window generation. Accordingly,
Denovo provides a step-characteristics spatial differencing option that produces positive scalar fluxes as
long as the source (volume plus in-scatter) is positive. Denovo uses an orthogonal, nonuniform mesh that is
ideal for CADIS applications because of the speed and robustness of calculations on this mesh type.</p>
<p>Denovo uses the highly robust GMRES (Generalized Minimum Residual) Krylov method to solve the SN equations in each group. GMRES has been shown to be more robust and efficient than traditional source (fixed-point) iteration. The in-group discrete SN equations are defined as</p>
<div class="math notranslate nohighlight" id="equation-mavric-16">
<span class="eqno">(252)<a class="headerlink" href="#equation-mavric-16" title="Permalink to this equation"></a></span>\[\mathbf{L}\psi = \mathbf{\text{MS}}\phi + q\]</div>
<p>where <strong>L</strong> is the differential transport operator, <strong>M</strong> is the
moment-to-discrete operator, <strong>S</strong> is the matrix of scattering
cross section moments, <em>q</em> is the external and in-scatter source,
<span class="math notranslate nohighlight">\(\phi\)</span> is the vector of angular flux moments, and <span class="math notranslate nohighlight">\(\psi\)</span> is
the vector of angular fluxes at discrete angles. Applying the operator
<strong>D</strong>, where <span class="math notranslate nohighlight">\(\phi = \mathbf{D}\psi\)</span>, and rearranging terms, casts
the in-group equations in the form of a traditional linear system,
<span class="math notranslate nohighlight">\(\mathbf{A}x = b\)</span>,</p>
<blockquote>
<div><div class="math notranslate nohighlight" id="equation-mavric-17">
<span class="eqno">(253)<a class="headerlink" href="#equation-mavric-17" title="Permalink to this equation"></a></span>\[\left( \mathbf{I} - \mathbf{D}\mathbf{L}^{- 1}\mathbf{\text{MS}} \right) = \mathbf{D}\mathbf{L}^{- 1}q .\]</div>
</div></blockquote>
<p>The operation <span class="math notranslate nohighlight">\(\mathbf{L}^{- 1}\nu\)</span>, where <span class="math notranslate nohighlight">\(\nu\)</span> is an
iteration vector, is performed using a traditional wave-front solve
(transport sweep). The parallel implementation of the Denovo wave-front
solver uses the well-known Koch-Baker-Alcouffe (KBA) algorithm, which is
a two-dimensional block‑spatial decomposition of a three-dimensional
orthogonal mesh <a class="bibtex reference internal" href="#baker-sn-1998" id="id9">[BK98]</a>. The Trilinos package is used for the GMRES
implementation <a class="bibtex reference internal" href="#willenbring-trilinos-2003" id="id10">[WH03]</a> Denovo stores the mesh-based scalar fluxes in a
double precision binary file (*.dff) called a <em>Denovo flux file</em>. Past
versions of SCALE/Denovo used the TORT <a class="bibtex reference internal" href="#rhoades-tort-1997" id="id11">[RS97]</a> *.varscl file format
(DOORS package <a class="bibtex reference internal" href="#rhoades-doors-1998" id="id12">[RC98]</a>), but this was limited to single precision. Since
the rest of the MAVRIC sequence has not yet been parallelized, Denovo is
currently used only in serial mode within MAVRIC.</p>
</div>
<div class="section" id="monaco">
<h4>Monaco<a class="headerlink" href="#monaco" title="Permalink to this headline"></a></h4>
<p>The forward Monte Carlo transport is performed using Monaco, a
fixed-source shielding code that uses the SCALE General Geometry
Package (SGGP, the same as used by the criticality code KENO-VI) and the
standard SCALE material information processor. Monaco can use either MG
or CE cross section libraries. Monaco was originally based on the MORSE
Monte Carlo code but has been extensively modified to modernize the
coding, incorporate more flexibility in terms of sources/tallies, and
read a user-friendly block/keyword style input.</p>
<p>Much of the input to MAVRIC is the same as Monaco. More details can be
found in the Monaco chapter of the SCALE manual (SECTIONREFERENCE).</p>
</div>
<div class="section" id="running-mavric">
<h4>Running MAVRIC<a class="headerlink" href="#running-mavric" title="Permalink to this headline"></a></h4>
<p>The objective of a SCALE sequence is to execute several codes, passing
the output from one to the input of the next, in order to perform some
analysis—–tasks that users typically had to do in the past. MAVRIC does
this for difficult shielding problems by running approximate
discrete-ordinates calculations, constructing an importance map and
biased source for one or more tallies that the user wants to optimize in
the Monte Carlo calculation, and then using those in a forward Monaco
Monte Carlo calculation. MAVRIC also prepares the forward and adjoint
cross sections when needed. The steps of a MAVRIC sequence are listed in
<a class="reference internal" href="#mavric-sequence"><span class="std std-numref">Table 192</span></a>. The user can instruct MAVRIC to run this whole sequence of
steps or just some subset of the steps to verify the
intermediate steps or to reuse previously calculated quantities in a new
analyses.</p>
<p>The MAVRIC sequence can be stopped after key points by using the
“parm= <em>parameter</em> ” operator on the “=mavric” command line, which is
the first line of the input file. The various parameters are listed in
Table <a class="reference internal" href="#mavric-param"><span class="std std-numref">Table 193</span></a>. These parameters allow the user to perform checks and make
changes to the importance map calculation before the actual Monte Carlo
calculation in Monaco.</p>
<p>MAVRIC also allows the sequence to start at several different points. If
an importance map and biased source have already been computed, they can then
be used directly. If the adjoint scalar fluxes are known, they can
quickly be used to create the importance map and biased source and then
begin the forward Monte Carlo calculation. All of the different combinations of
starting MAVRIC with some previously calculated quantities are listed in
the following section detailing the input options.</p>
<p>When using MG cross section libraries that do not have flux-to-dose-rate
conversion factors, use “parm=nodose” to prevent the cross section
processing codes from trying to move these values into the working
library.</p>
<p>MAVRIC creates many files that use the base problem name from the output
file. For an output file called “c:path1path2\<em>outputName</em>.out” or
“/home/path1/path2/ <em>outputName</em>.inp”, spaces in the output name will
cause trouble and should not be used.</p>
<table class="colwidths-given docutils align-center" id="mavric-sequence">
<caption><span class="caption-number">Table 192 </span><span class="caption-text">Steps in the MAVRIC sequence</span><a class="headerlink" href="#mavric-sequence" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><strong>Cross section calculation</strong></p></td>
<td><p>XSProc is used to calculate the forward cross sections for Monaco</p></td>
</tr>
<tr class="row-even"><td><p><strong>Forward Denovo (optional)</strong></p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>Cross section calculation</p></td>
<td><p>XSProc is used to calculate the forward cross sections for Denovo</p></td>
</tr>
<tr class="row-even"><td><p>Forward flux calculation</p></td>
<td><p>Denovo calculates the estimate of the forward flux</p></td>
</tr>
<tr class="row-odd"><td><p><strong>Adjoint Denovo (optional)</strong></p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>Cross section calculation</p></td>
<td><p>XSProc is used to calculate the adjoint cross sections for Denovo</p></td>
</tr>
<tr class="row-odd"><td><p>Adjoint flux calculation</p></td>
<td><p>Denovo calculates the estimate of the adjoint flux</p></td>
</tr>
<tr class="row-even"><td><p><strong>CADIS (optional)</strong></p></td>
<td><p>The scalar flux file from Denovo is then used to create the biased source distribution and transport weight windows</p></td>
</tr>
<tr class="row-odd"><td><p><strong>Monte Carlo calculation</strong></p></td>
<td><p>Monaco uses the biased source distribution and transport weight windows to calculate the various tallies</p></td>
</tr>
</tbody>
</table>
<table class="colwidths-given docutils align-center" id="mavric-param">
<caption><span class="caption-number">Table 193 </span><span class="caption-text">Parameters for the MAVRIC command line (“parm=…”)</span><a class="headerlink" href="#mavric-param" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Parameter</p></th>
<th class="head"><p>MAVRIC will stop after</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>check</p></td>
<td><p>input checking</p></td>
</tr>
<tr class="row-odd"><td><p>forinp</p></td>
<td><p>Forward Denovo input construction (makes <code class="docutils literal notranslate"><span class="pre">xkba_b.inp</span></code> in the tmp area)</p></td>
</tr>
<tr class="row-even"><td><p>forward</p></td>
<td><p>The forward Denovo calculation</p></td>
</tr>
<tr class="row-odd"><td><p>adjinp</p></td>
<td><p>Adjoint Denovo input construction (makes <code class="docutils literal notranslate"><span class="pre">xkba_b.inp</span></code> in the tmp area)</p></td>
</tr>
<tr class="row-even"><td><p>adjoint</p></td>
<td><p>The adjoint Denovo calculation</p></td>
</tr>
<tr class="row-odd"><td><p>impmap</p></td>
<td><p>Calculation of importance map and biased source</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="mavric-input">
<h2>MAVRIC input<a class="headerlink" href="#mavric-input" title="Permalink to this headline"></a></h2>
<p>The input file for MAVRIC consists of three lines of text (“=mavric”
command line with optional parameters, the problem title, and SCALE
cross section library name) and then several blocks, with each block
starting with “read xxxx” and ending with “end xxxx”. There are three
required blocks and nine optional blocks. Material and geometry blocks
must be listed first and in the specified order. Other blocks may be
listed in any order.</p>
<p>Blocks (must be in this order):</p>
<ul class="simple">
<li><p>Composition – (required) SCALE standard composition, list of materials used in the problem</p></li>
<li><p>Celldata – SCALE resonance self-shielding</p></li>
<li><p>Geometry – (required) SCALE general geometry description</p></li>
<li><p>Array – optional addition to the above geometry description</p></li>
<li><p>Volume – optional calculation or listing of region volumes</p></li>
<li><p>Plot – create 2D slices of the SGGP geometry</p></li>
</ul>
<p>Other Blocks (in any order, following the blocks listed above):</p>
<ul class="simple">
<li><p>Definitions – defines locations, response functions, and grid geometries used by other blocks</p></li>
<li><p>Sources – (required) description of the particle source spatial, energy, and directional distributions</p></li>
<li><p>Tallies – description of what to calculate: point detector tallies, region tallies, or mesh tallies</p></li>
<li><p>Parameters – how to perform the simulation (random number seed, how many histories, etc.)</p></li>
<li><p>Biasing – data for reducing the variance of the simulation</p></li>
<li><p>ImportanceMap – instructions for creating an importance map based on a discrete-ordinates calculation</p></li>
</ul>
<p>The material blocks (Composition and Celldata) and the physical model
blocks (Geometry, Array, Volume, and Plot) follow the standard SCALE
format. See the other SCALE references as noted in the following
sections for details. The Biasing block and ImportanceMap block cannot
both be used.</p>
<p>For the other six blocks, scalar variables are set by “keyword=value”,
fixed-length arrays are set with “keyword value<sub>1</sub>
value<sub>N</sub>”, variable-length arrays are set with “keyword
value<sub>1</sub> … value<sub>N</sub> end”, and some text and filenames
are read in as quoted strings. Single keywords to set options are also
used in some instances. The indention, comment lines, and
upper/lowercase shown in this document are not required— they are used
in the examples only for clarity. Except for strings in quotes (like
filenames), SCALE is case insensitive.</p>
<p>After all input blocks are listed, a single line with “end data” should be listed.
A final “end” should also be listed, to signify the end of all MAVRIC input.
Nine of the blocks are the same input blocks as those used by the functional module Monaco,
with a few extra keywords only for use with MAVRIC. These extra keywords are highlighted here, but
without relisting all of the standard Monaco keywords for those blocks.
See <a class="reference internal" href="#input-format"><span class="std std-numref">Table 194</span></a> for an overview of MAVRIC input file structure.</p>
<div class="section" id="composition-block">
<h3>Composition block<a class="headerlink" href="#composition-block" title="Permalink to this headline"></a></h3>
<p>Material information input follows the standard SCALE format for
material input. Basic materials known to the SCALE library may be used
as well as completely user-defined materials (using isotopes with known
cross sections). Input instructions are located in the XSProc chapter (SECTIONREFERENCE) in
the SCALE manual. The Standard Composition Library chapter (SECTIONREFERENCE) lists the
different cross section libraries and the names of standard materials.
An example is as follows:</p>
<div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">composition</span>

    <span class="err">uo</span><span class="m">2</span> <span class="m">1</span> <span class="m">0</span><span class="err">.</span><span class="m">2</span> <span class="m">293</span><span class="err">.</span><span class="m">0</span> <span class="m">92234</span> <span class="m">0</span><span class="err">.</span><span class="m">0055</span> <span class="m">92235</span> <span class="m">3</span><span class="err">.</span><span class="m">5</span> <span class="m">92238</span> <span class="m">96</span><span class="err">.</span><span class="m">4945</span> <span class="n">end</span>

    <span class="err">orconcrete</span> <span class="m">2</span> <span class="m">1</span><span class="err">.</span><span class="m">0</span> <span class="m">293</span><span class="err">.</span><span class="m">0</span> <span class="n">end</span>

    <span class="err">ss</span><span class="m">304</span> <span class="m">3</span> <span class="m">1</span><span class="err">.</span><span class="m">0</span> <span class="m">293</span><span class="err">.</span><span class="m">0</span> <span class="n">end</span>

<span class="n">end</span><span class="err"> </span><span class="n">composition</span>
</pre></div>
</div>
<p>Details on the cell data block are also included in the XSProc chapter (SECTIONREFERENCE).
When using different libraries for the importance map production (listed
at the top of the input) and the final Monte Carlo calculation (listed
in the parameters block, if different), make sure that the materials are
present in both libraries.</p>
<table class="colwidths-given docutils align-center" id="input-format">
<caption><span class="caption-number">Table 194 </span><span class="caption-text">Overall input format</span><a class="headerlink" href="#input-format" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>input file</p></th>
<th class="head"><p>Comment</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="nf">=mavric</span>
<span class="err">Some</span> <span class="err">title</span> <span class="err">for</span> <span class="err">this</span> <span class="err">problem</span>
<span class="err">v</span><span class="m">7</span><span class="err">-</span><span class="m">27</span><span class="err">n</span><span class="m">19</span><span class="err">g</span>
<span class="n">read</span><span class="err"> </span><span class="n">composition</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">composition</span>
<span class="n">read</span><span class="err"> </span><span class="n">celldata</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">celldata</span>
<span class="n">read</span><span class="err"> </span><span class="n">geometry</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">geometry</span>
<span class="n">read</span><span class="err"> </span><span class="n">array</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">array</span>
<span class="n">read</span><span class="err"> </span><span class="n">volume</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">volume</span>
<span class="n">read</span><span class="err"> </span><span class="n">plot</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">plot</span>
<span class="n">read</span><span class="err"> </span><span class="n">definitions</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">definitions</span>
<span class="n">read</span><span class="err"> </span><span class="n">sources</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">sources</span>
<span class="n">read</span><span class="err"> </span><span class="n">tallies</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">tallies</span>
<span class="n">read</span><span class="err"> </span><span class="n">parameters</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">parameters</span>
<span class="n">read</span><span class="err"> </span><span class="n">biasing</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">biasing</span>
<span class="n">read</span><span class="err"> </span><span class="n">importanceMap</span>
   <span class="err">...</span>
<span class="n">end</span><span class="err"> </span><span class="n">importanceMap</span>
<span class="n">end</span><span class="err"> </span><span class="n">data</span>
<span class="n">end</span>
</pre></div>
</div>
</td>
<td><div class="highlight-rest notranslate"><div class="highlight"><pre><span></span>name of sequence
title
cross section library name
SCALE material compositions
    [required block]

SCALE resonance self-shielding
    [optional block]

SCALE SGGP geometry
    [required block]

SCALE SGGP arrays
    [optional block]

SCALE SGGP volume calc
    [optional block]

SGGP Plots
    [optional block]

Definitions
    [possibly required]

Sources definition
    [required block]

Tally specifications
    [optional block]

Monte Carlo parameters
    [optional block]

Biasing information
    [optional block]

Importance map
    [optional block]

end of all blocks
end of MAVRIC input
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="sggp-geometry-blocks">
<h3>SGGP geometry blocks<a class="headerlink" href="#sggp-geometry-blocks" title="Permalink to this headline"></a></h3>
<p>MAVRIC uses the functional module Monaco for the forward Monte Carlo calculation.
Monaco tracks particles through the physical geometry described by the SGGP input
blocks, as well as through the mesh importance map and any mesh tallies, which are
defined in the global coordinates and overlay the physical geometry. Because Monaco
must track through all of these geometries at the same time, users should not use the
reflective boundary capability in the SGGP geometry.</p>
<p>For more details on each SGGP geometry block, see the following sections of the KENO-VI chapter (SECTIONREFERENCE) of the SCALE Manual.</p>
<blockquote>
<div><p>Geometry – <em>Geometry Data</em></p>
<p>Array – <em>Array Data</em></p>
<p>Volume – <em>Volume Data</em></p>
<p>Plot – <em>Plot Data</em></p>
</div></blockquote>
</div>
<div class="section" id="other-blocks-shared-with-monaco">
<h3>Other blocks shared with Monaco<a class="headerlink" href="#other-blocks-shared-with-monaco" title="Permalink to this headline"></a></h3>
<p>The definitions, sources, tallies, and biasing blocks are all the same
as Monaco. They are all fully described in the Monaco chapter (SECTIONREFERENCE) of the
SCALE Manual.</p>
<blockquote>
<div><p>Definitions – <em>Definitions Block</em></p>
<p>Sources – <em>Sources Block</em></p>
<p>Tallies – <em>Tallies Block</em></p>
<p>Biasing – <em>Biasing Block</em></p>
</div></blockquote>
<p>The parameters block includes several keywords that are not included in
Monaco (see the <em>Parameter Block</em> section of the Monaco chapter (SECTIONREFERENCE)) which
are used when the cross section library used in the importance
calculations differs from the library used in the final forward
Monaco Monte Carlo calculation. The library listed at the beginning of
the MAVRIC input file will be used for the importance calculations
(forward and adjoint Denovo calculation, formation of the importance
map, and biased sources). To use a different MG library in the final
Monaco simulation, use the keyword “library=” with the cross section
library name in quotes. A cross section library for Monaco will be made
using csas-mg. If there are any extra parameters to use (“parm=” in the
“=csas-mg” line of the csas-mg input), they can be passed along using
the keyword “parmString=” with the extra information in quotes. For
example, the following input file would use a coarse-group library for
the importance calculations and a fine-group library for the final
Monaco, each with CENTRM processing.</p>
<div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="nf">=mavric parm=centrm</span>
<span class="err">v</span><span class="m">7</span><span class="err">-</span><span class="m">27</span><span class="err">n</span><span class="m">19</span><span class="err">g</span>
<span class="err"></span>

<span class="n">read</span><span class="err"> </span><span class="n">parameters</span>

    <span class="err">library=”v</span><span class="m">7</span><span class="err">-</span><span class="m">200</span><span class="err">n</span><span class="m">47</span><span class="err">g”</span> <span class="err">parmString=”centrm”</span>

    <span class="err"></span>

<span class="n">end</span><span class="err"> </span><span class="n">parameters</span>

<span class="err"></span>

<span class="n">end</span><span class="err"> </span><span class="n">data</span>

<span class="n">end</span>
</pre></div>
</div>
<p>To use a CE cross section in the final Monaco step, use the keyword “ceLibrary=” with the cross section
library name in quotes. When the “library=” or “ceLibrary=” keywords are used, they should precede the “neutron”, “photon”,
“noNeutron”, and “noPhoton” keywords. <a class="reference internal" href="#extra-keywords"><span class="std std-numref">Table 195</span></a> summarizes all of the keywords in the MAVRIC parameter block.</p>
<p>When using two different cross section libraries, be sure that the responses and distributions are
defined in ways that do not depend on the cross section library. For example, any response that is
just a list of n values (corresponding to a cross section library of n groups) needs to have the
group energies specifically listed so that it can be evaluated properly on the other group structure.</p>
<table class="docutils align-center" id="extra-keywords">
<caption><span class="caption-number">Table 195 </span><span class="caption-text">Extra keywords for the parameters block</span><a class="headerlink" href="#extra-keywords" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 100%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><img alt="_images/table4.4.png" src="_images/table4.4.png" />
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="importance-map-block">
<h3>Importance map block<a class="headerlink" href="#importance-map-block" title="Permalink to this headline"></a></h3>
<p>The importance map block is the “heart and soul” of MAVRIC. This block lists the parameters for creating an
importance map and biased source from one (adjoint) or two (forward, followed by adjoint) Denovo
discrete-ordinates calculations. Without an importance map block, MAVRIC can be used to run Monaco
and use its conventional types of variance reduction. If both the importance map and biasing blocks
are specified, then only the importance map block will be used. The various ways to use the importance map block
are explained in the subsections below. Keywords for this block are summarized at the end of this section, in
<a class="reference internal" href="#keywords-importance"><span class="std std-numref">Table 196</span></a>.</p>
<div class="section" id="constructing-a-mesh-for-the-sn-calculation">
<h4>Constructing a mesh for the S<sub>N</sub> calculation<a class="headerlink" href="#constructing-a-mesh-for-the-sn-calculation" title="Permalink to this headline"></a></h4>
<p>All uses of the importance map block that run the
discrete-ordinates code require the use of a grid geometry that overlays
the physical geometry. Grid geometries are defined in the definitions
block of the MAVRIC input. The extent and level of detail needed in a
grid geometry are discussed in the following paragraphs.</p>
<p>When using S<sub>N</sub> methods alone for solving radiation transport in
shielding problems, a good rule of thumb is to use mesh cell sizes on
the order of a meanfree path of the particle. In complex shielding
problems, this could lead to an extremely large number of mesh cells,
especially when considering the size of the meanfree path of the lowest
energy neutrons and photons in common shielding materials.</p>
<p>In MAVRIC, the goal is to use the S<sub>N</sub> calculation for a quick
approximate solution. Accuracy is not paramount—just getting an idea of
the overall shape of the true importance map will help accelerate the
convergence of the forward Monte Carlo calculation. The more accurate
the importance map, the better the forward Monte Carlo acceleration will
be. At some point there is a time trade-off when the computational time
for calculating the importance map followed by the time to perform the Monte Carlo
calculation exceeds that of a standard analog Monte Carlo calculation.
Large numbers of mesh cells that result from using very small mesh sizes
for S<sub>N</sub> calculations also use a great deal of computer memory.</p>
<p>Because the deterministic solution(s) for CADIS and FW-CADIS can have
moderate fidelity and still provide variance reduction parameters that
substantially accelerate the Monte Carlo solution, mesh cell sizes in
MAVRIC applications can be larger than what most S<sub>N</sub> practioners
would typically use. The use of relatively coarse mesh reduces memory
requirements and the run time of the deterministic solution(s). Some
general guidelines to keep in mind when creating a mesh for the
importance map/biased source are as follows:</p>
<ul class="simple">
<li><p>The true source regions should be included in the mesh with mesh
planes at their boundaries.</p></li>
<li><p>Place point or very small sources in the center of a mesh cell, not on the mesh planes.</p></li>
<li><p>Any region of the geometry where particles could eventually
contribute to the tallies (the “important” areas) should be included
in the mesh.</p></li>
<li><p>Point adjoint sources (corresponding to point detector locations) in
standard CADIS calculations do not have to be included inside the
mesh. For FW-CADIS, they must be in the mesh and should be located at
a mesh cell center, not on any of the mesh planes.</p></li>
<li><p>Volumetric adjoint sources should be included in the mesh with mesh
planes at their boundaries.</p></li>
<li><p>Mesh planes should be placed at significant material boundaries.</p></li>
<li><p>Neighboring cell sizes should not be drastically different.</p></li>
<li><p>Smaller cell sizes should be used where the adjoint flux is changing
rapidly, such as toward the surfaces of adjoint sources and
shields (rather than in their interiors).</p></li>
</ul>
<p>Another aspect to keep in mind is that the source in the forward Monaco
Monte Carlo calculation will be a biased mesh-based source. Source
particles will be selected by first sampling which mesh cell to use and
then sampling a position uniformly within that mesh cell that meets the
user criteria of “unit=”, “region=”, or “mixture=” if specified. The
mesh should have enough resolution that the mesh source will be an
accurate representation of the true source.</p>
<p>The geometry for the Denovo calculation is specified using the keyword
“gridGeometryID=” and the identification number of a grid geometry that
was defined in the definitions block. The material assigned to each voxel of the mesh is determined by
testing the center point in the SGGP geometry (unless the macro-material option is used—see below).</p>
</div>
<div class="section" id="macromaterials-for-sn-geometries">
<span id="macromaterials"></span><h4>Macromaterials for S<sub>N</sub> geometries<a class="headerlink" href="#macromaterials-for-sn-geometries" title="Permalink to this headline"></a></h4>
<p>Part of the advantage of the CADIS method is that the adjoint
discrete-ordinates calculation only needs to be approximate in order to
form a reasonable importance map and biased source. This usually means
that the mesh used is much coarser than the mesh that would be used if
the problem were to be solved only with a discrete-ordinates code. This
coarse mesh may miss significant details (especially curves) in the
geometry and produce a less-than-optimal importance map.</p>
<p>To get more accurate solutions from a coarse-mesh
discrete-ordinates calculation, Denovo can represent the material in
each voxel of the mesh as a volume-weighted mixture of the real
materials, called <em>macromaterials</em>, in the problem. When constructing the
Denovo input, the Denovo EigenValue Calculation (DEVC, see section SECTIONREFERENCE)
sequence can estimate the volume fraction occupied by using each real
material in each voxel by a sampling method. The user can specify
parameters for how to sample the geometry. Note that finer sampling
makes more accurate estimates of the material fraction but requires more
setup time to create the Denovo input. Users should understand how the
macromaterials are sampled and should consider this when constructing a mesh
grid. This is especially important for geometries that contain arrays.
Careful consideration should be given when overlaying a mesh on a
geometry that contains arrays of arrays.</p>
<p>Because the list of macromaterials could become large, the user can also
specify a tolerance for how close two different macromaterials can be in order to
be considered the same, thereby reducing the total number of
macromaterials. The macromaterial tolerance, “<code class="docutils literal notranslate"><span class="pre">mmTolerance=</span></code>”, is used for
creating a different macromaterial from the those already created by
looking at the infinity norm between two macromaterials.
The number of macromaterials does not appreciably impact Denovo run time
or memory requirements.</p>
<p>Two different sampling methods are available—point testing <a class="bibtex reference internal" href="#ibrahim-improving-2009" id="id13">[IPE+09]</a> with
the keyword <code class="docutils literal notranslate"><span class="pre">mmPointTest</span></code> and ray tracing <a class="bibtex reference internal" href="#johnson-fast-2013" id="id14">[Joh13]</a> with the keyword
<code class="docutils literal notranslate"><span class="pre">mmRayTest</span></code>.</p>
<div class="section" id="ray-tracing">
<h5>Ray Tracing<a class="headerlink" href="#ray-tracing" title="Permalink to this headline"></a></h5>
<p>This method estimates the volume of different materials in the Denovo mesh grid elements by
tracing rays through the SGGP geometry and computing the average track lengths through each material.
Rays are traced in all three dimensions to better estimate the volume fractions of materials within each voxel.
The mmSubCell parameter controls how many rays will be traced in each voxel in each dimension. For example, if mmSubCell= n,
then when tracing rays in the z dimension, each column of voxels uses a set of n×n rays
starting uniformly spaced in the x  and y  dimensions. With rays being cast from all three orthogonal directions,
a total of 3n2 rays are used to sample each voxel. One can think of subcells as an equally spaced sub-mesh with a
single ray positioned at each center. The number of subcells in each direction, and hence the number of rays, can
be explicitly given with mmSubCells ny nz nx nz nx ny end keyword for rays parallel to the x axis, y axis, and z axis.
<a class="reference internal" href="#ray-positions"><span class="std std-numref">Fig. 309</span></a> shows different subcell configurations (in two dimensions) for a given voxel.</p>
<div class="figure align-center" id="id27">
<span id="ray-positions"></span><a class="reference internal image-reference" href="_images/fig4.1.01_rayTrace6.png"><img alt="_images/fig4.1.01_rayTrace6.png" src="_images/fig4.1.01_rayTrace6.png" style="width: 500px;" /></a>
<p class="caption"><span class="caption-number">Fig. 309 </span><span class="caption-text">Ray positions within a voxel with different mmSubCells parameters.</span><a class="headerlink" href="#id27" title="Permalink to this image"></a></p>
</div>
<p>Ray tracing is a more robust method compared to the simple point testing
method used in previous versions of SCALE/MAVRIC; however, it requires
more memory than point testing. Ray tracing gives more accurate
estimates of volume fractions because track lengths across a voxel give
more information than a series of test points. Ray tracing is also much
faster than point testing because the particle tracking routines are
optimized to quickly determine lists of materials and distance along
a given ray.</p>
<p>Ray tracing operates on the grid geometry supplied by the user and
shoots rays in all three directions, starting from the lower bounds of
the mesh grid. An example of an arbitrary assembly geometry is shown in
<a class="reference internal" href="#geom-model"><span class="std std-numref">Fig. 310</span></a>. A ray consists of a number of steps that each correspond
to crossing a material boundary along the path of the ray. Ratios of
each step’s length to the voxel length in the ray’s direction determine
the material volume fraction of that step in that voxel, and summation
of the same material volume fractions gives the material volume fraction
of that material in that voxel. Ray tracing through a single voxel that
contains a fuel pin is illustrated in <a class="reference internal" href="#ray-vox"><span class="std std-numref">Fig. 311</span></a>.</p>
<div class="figure align-center" id="id28">
<span id="geom-model"></span><a class="reference internal image-reference" href="_images/fig4.1.02_kenoDenovo.png"><img alt="_images/fig4.1.02_kenoDenovo.png" src="_images/fig4.1.02_kenoDenovo.png" style="width: 600px;" /></a>
<p class="caption"><span class="caption-number">Fig. 310 </span><span class="caption-text">Geometry model (left) and the Denovo representation (right) of an assembly using macromaterials determined by ray tracing.</span><a class="headerlink" href="#id28" title="Permalink to this image"></a></p>
</div>
<div class="figure align-center" id="id29">
<span id="ray-vox"></span><a class="reference internal image-reference" href="_images/fig4.1.03_rayTrace.png"><img alt="_images/fig4.1.03_rayTrace.png" src="_images/fig4.1.03_rayTrace.png" style="width: 300px;" /></a>
<p class="caption"><span class="caption-number">Fig. 311 </span><span class="caption-text">Ray tracing (in two dimensions) through a voxel.</span><a class="headerlink" href="#id29" title="Permalink to this image"></a></p>
</div>
<p>The final constructed macromaterials for this model are also shown in
<a class="reference internal" href="#geom-model"><span class="std std-numref">Fig. 310</span></a>. Voxels that contain only a single material are assigned
the original material number in the constructed macromaterials. For the
voxels that contain a fuel pin with three different materials, the
result is a new macromaterial consisting of the volume weighted
fractions of each original material.</p>
<p>After the rays are shot in all three directions, the material volume
fractions are updated, and macromaterials are created by using these
material volume fractions. Material volume fraction calculations for a
single voxel, as shown in <a class="reference internal" href="#ray-vox"><span class="std std-numref">Fig. 311</span></a>, are given by</p>
<div class="math notranslate nohighlight" id="equation-mavric-18">
<span class="eqno">(254)<a class="headerlink" href="#equation-mavric-18" title="Permalink to this equation"></a></span>\[\begin{split} F_{m} = \ \sum_{d = x,y,z}^{}{\sum_{r = 1}^{N_{r}}{\sum_{s = 1}^{N_{s}}\left\{ \begin{matrix}
 \frac{L_{d,r,s}}{L_{d}},\ \ \ &amp; m_{s} = m \\
 0,\ \ \ &amp; \mathrm{\text{otherwise}} \\
 \end{matrix} \right.\ }} \ \ \ \ \ \ \ and \ \ \ \ \ \ \ \ \ V_{m} = \frac{F_{m}}{\sum_{n = 1}^{N_{m}}F_{n}}\ ,\end{split}\]</div>
<p>where <em>Fm</em> = sampled fraction of material <em>m</em> in the voxel,</p>
<p><em>d</em> = direction of the rays (<em>x, y, z</em>),</p>
<p><em>r</em> = ray number,</p>
<p><span class="math notranslate nohighlight">\(N_r\)</span> = total number of rays in the voxel for direction of <em>d</em>,</p>
<p><em>s</em> = step number,</p>
<p><span class="math notranslate nohighlight">\(N_s\)</span> = total number of steps for ray r in the voxel for direction of
<em>d</em>,</p>
<p><span class="math notranslate nohighlight">\(L_{d,r,s}\)</span> = length of the steps s for ray r in the voxel for direction
of <em>d</em>,</p>
<p><span class="math notranslate nohighlight">\(L_d\)</span> = length of the voxel along direction of <em>d</em>,</p>
<p><span class="math notranslate nohighlight">\(m_s\)</span> = material of step <em>s</em>,</p>
<p><em>m</em> = material number,</p>
<p><span class="math notranslate nohighlight">\(N_m\)</span> = total number of materials in the voxel, and</p>
<p><span class="math notranslate nohighlight">\(V_m\)</span> = volume fraction of material m in the voxel.</p>
</div>
<div class="section" id="point-testing">
<h5>Point Testing<a class="headerlink" href="#point-testing" title="Permalink to this headline"></a></h5>
<p>The recursive bisection method is utilized in point testing and uses a
series of point tests to determine the macromaterial fractions. For a
given voxel, the material at the center is compared to the material at
the eight corners. If they are all the same, then the entire volume is
considered to be made of that material. If they are different, then the volume is
divided into two in each dimension. Each subvolume is tested, and the
method is then applied to the subvolumes that are not of a single
material. When the ratio of the volume of the tested region to the
original voxel becomes less than a user-specified tolerance (in the
range of 10-1 to 10-4), then further subdivision and testing are
stopped. This is illustrated in <a class="reference internal" href="#rec-macro"><span class="std std-numref">Fig. 312</span></a>.</p>
<div class="figure align-default" id="rec-macro">
<a class="reference internal image-reference" href="_images/rec-macro.png"><img alt="_images/rec-macro.png" src="_images/rec-macro.png" style="width: 99%;" /></a>
</div>
<p class="centered">
<strong><em>Fig. 4 Successive steps in the recursive macromaterial method</em></strong></p><p>In point testing, the keyword “mmTolerance=f” is interpreted to be where <em>f</em> is the smallest
fraction of the voxel volume that can be achieved by bisection method and hence the limiting
factor for dividing the voxel. This same tolerance <em>f</em> is also used to limit the number of macromaterials.
Before a new macromaterial is created, if one already exists where the fraction of each actual
material matches to within the given tolerance, then the existing material will be used. If
using only a single point at the center of each voxel, then use “mmTolerance=1”.
The mmSubCell keyword is not used in point testing.</p>
</div>
<div class="section" id="example">
<h5>Example<a class="headerlink" href="#example" title="Permalink to this headline"></a></h5>
<p><a class="reference internal" href="#cask-geom"><span class="std std-numref">Fig. 313</span></a> shows an example of a cask geometry with two types of spent fuel (yellows),
steel (blue), resin (green), and other metals (gray). When the Denovo geometry is set up by
testing only the center of each mesh cell, the curved surfaces are not well represented (upper right).
By applying the ray-tracing method and defining a new material made of partial fractions of the original materials,
an improved Denovo model can be made. In the lower left of the figure, the Denovo
model was constructed using one ray (in each dimension) per voxel and a tolerance of 0.1.
This gives 20 new materials that are a mixture of the original 13 actual materials and void.
With mmSubCells=3 and an mmTolerance=0.01, 139 macromaterials are created.</p>
<p>A macromaterial table listing the fractions of each macromaterial is saved to a file called “outputName.mmt”,
where outputName is the name the user chose for his or her output file. This file can be used by the Mesh File
Viewer to display the macromaterials as mixtures of the actual materials, as seen in the lower row of <a class="reference internal" href="#cask-geom"><span class="std std-numref">Fig. 313</span></a>.
See the Mesh File Viewer help pages for more information on how to use colormap files and macromaterial tables.</p>
<div class="figure align-default" id="id30">
<span id="cask-geom"></span><img alt="_images/cask-geom.png" src="_images/cask-geom.png" />
<p class="caption"><span class="caption-number">Fig. 313 </span><span class="caption-text">Cask geometry model (upper left) and the Denovo representation using cell center testing (upper right). Representations using macromaterials determined by ray tracing are shown for mmSubCell=1/mmTolerance=0.1 (lower left) and mmSubCell=3/mmTolerance=0.01 (lower right).*</span><a class="headerlink" href="#id30" title="Permalink to this image"></a></p>
</div>
</div>
</div>
<div class="section" id="optimizing-source-detector-problems">
<h4>Optimizing source/detector problems<a class="headerlink" href="#optimizing-source-detector-problems" title="Permalink to this headline"></a></h4>
<p>For standard source/detector problems in which one tally is to be optimized
in the forward Monte Carlo calculation, an adjoint source based on that
tally must be constructed. An adjoint source requires a unique and
positive identification number, a physical location, and an energy
spectrum. The adjoint source location can be specified either by (1) a
point location (“locationID=” keyword) or (2) a volume described by a
box (“boundingBox” array). A bounding box is specified by maximum and
minimum extent in each dimension—<span class="math notranslate nohighlight">\(x_{max}\)</span> <span class="math notranslate nohighlight">\(x_{min}\)</span> <span class="math notranslate nohighlight">\(y_{max}\)</span> <span class="math notranslate nohighlight">\(y_{min}\)</span> <span class="math notranslate nohighlight">\(z_{max}\)</span>
<span class="math notranslate nohighlight">\(z_{min}\)</span>—in global coordinates. The boundingBox should not be degenerate
(should have volume&gt;0) but can be optionally limited to areas matching a
given unit number (“unit=”), a given region number (“region=”), or a
given material mixture number (“mixture=”). A mixture and a region
cannot both be specified, since that would either be redundant or
mutually exclusive. The energy spectrum of an adjoint source is a
response function (“responseID=”) listing one of the ID numbers of the
responses defined in the definitions block. An optional weight can be
assigned to each adjoint source using the “weight=” keyword. If not
given, the default weight is 1.0.</p>
<p>For example, to optimize a region tally, the user would construct an
adjoint source located in the same place as the tally, with an adjoint
source spectrum equal to the response function that the tally is
computing. Note that the grid geometry 1 and response function 3 must
already be defined in the definitions block.</p>
<div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">importanceMap</span>
   <span class="err">gridGeometryID=</span><span class="m">1</span>
   <span class="err">adjointSource</span> <span class="m">24</span>
       <span class="err">boundingBox</span> <span class="m">12</span><span class="err">.</span><span class="m">0</span> <span class="m">10</span><span class="err">.</span><span class="m">0</span>  <span class="m">5</span><span class="err">.</span><span class="m">0</span> <span class="err">-</span><span class="m">5</span><span class="err">.</span><span class="m">0</span>  <span class="m">10</span><span class="err">.</span><span class="m">0</span> <span class="err">-</span><span class="m">10</span><span class="err">.</span><span class="m">0</span>
       <span class="err">unit=</span><span class="m">1</span> <span class="err">region=</span><span class="m">5</span>
       <span class="err">responseID=</span><span class="m">3</span>
   <span class="n">end</span><span class="err"> </span><span class="n">adjointSource</span>
<span class="n">end</span><span class="err"> </span><span class="n">importanceMap</span>
</pre></div>
</div>
<p>For optimizing a point detector for the calculation of total photon flux,
the importance map block would look like the following:</p>
<div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">importanceMap</span>
   <span class="err">adjointSource</span> <span class="m">21</span>
       <span class="err">locationID=</span><span class="m">4</span>
       <span class="err">responseID=</span><span class="m">1</span>
   <span class="n">end</span><span class="err"> </span><span class="n">adjointSource</span>
   <span class="err">gridGeometryID=</span><span class="m">1</span>
<span class="n">end</span><span class="err"> </span><span class="n">importanceMap</span>
</pre></div>
</div>
<p>where location 4 is the same location used by the point detector. To calculate total photon flux, response function 1 must be defined in the definitions block similar to this response:</p>
<div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">definitions</span>
    <span class="err">response</span> <span class="m">1</span>
         <span class="err">values</span> <span class="m">27</span><span class="err">r</span><span class="m">0</span><span class="err">.</span><span class="m">0</span> <span class="m">19</span><span class="err">r</span><span class="m">1</span><span class="err">.</span> <span class="n">end</span>
    <span class="n">end</span><span class="err"> </span><span class="n">response</span>
    <span class="err"></span>
<span class="n">end</span><span class="err"> </span><span class="n">definitions</span>
</pre></div>
</div>
<p>This response is used for computing total photon flux for the 27 neutron/19 photon group coupled cross section library or like this response</p>
<div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">definitions</span>
    <span class="err">response</span> <span class="m">1</span>
         <span class="err">photon</span>
         <span class="err">bounds</span> <span class="m">1000</span><span class="err">.</span><span class="m">0</span> <span class="m">2</span><span class="err">.</span><span class="m">0</span><span class="err">e</span><span class="m">7</span> <span class="n">end</span>
         <span class="err">values</span>  <span class="m">1</span><span class="err">.</span><span class="m">0</span>   <span class="m">1</span><span class="err">.</span><span class="m">0</span>   <span class="n">end</span>
    <span class="n">end</span><span class="err"> </span><span class="n">response</span>
    <span class="err"></span>
<span class="n">end</span><span class="err"> </span><span class="n">definitions</span>
</pre></div>
</div>
<p>which is independent of the cross section library.</p>
</div>
<div class="section" id="multiple-adjoint-sources">
<h4>Multiple adjoint sources<a class="headerlink" href="#multiple-adjoint-sources" title="Permalink to this headline"></a></h4>
<p>If there are several tallies in very close proximity and/or several different responses being calculated by the tallies, multiple adjoint sources can be used.</p>
<div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">importanceMap</span>
   <span class="err">gridGeometryID=</span><span class="m">1</span>
   <span class="err">adjointSource</span> <span class="m">1</span>
       <span class="err">locationID=</span><span class="m">4</span>  <span class="err">responseID=</span><span class="m">20</span>
   <span class="n">end</span><span class="err"> </span><span class="n">adjointSource</span>
   <span class="err">adjointSource</span> <span class="m">2</span>
       <span class="err">locationID=</span><span class="m">5</span>  <span class="err">responseID=</span><span class="m">21</span>
       <span class="err">weight=</span><span class="m">2</span><span class="err">.</span><span class="m">0</span>
   <span class="n">end</span><span class="err"> </span><span class="n">adjointSource</span>
<span class="n">end</span><span class="err"> </span><span class="n">importanceMap</span>
</pre></div>
</div>
<p>Note that adjoint sources using point locations can be mixed with volumetric adjoint sources (using bounding boxes).</p>
</div>
<div class="section" id="options-for-denovo-s-n-calculations">
<h4>Options for Denovo <span class="math notranslate nohighlight">\(S_n\)</span> calculations<a class="headerlink" href="#options-for-denovo-s-n-calculations" title="Permalink to this headline"></a></h4>
<p>While the default values for various calculational parameters and settings used by Denovo for
the MAVRIC sequence should cover most applications, they can be changed if desired.
The two most basic parameters are the quadrature set used for the discrete ordinates and
the order of the Legendre polynomials used in describing the angular scattering.
The default quadrature order that MAVRIC uses is a level symmetric <span class="math notranslate nohighlight">\(S_8\)</span> set, and the
default scattering order is <span class="math notranslate nohighlight">\(P_3\)</span> (or the maximum number of coefficients contained in the
cross-section library if less than 3). <span class="math notranslate nohighlight">\(S_8\)</span>/ <span class="math notranslate nohighlight">\(P_3\)</span> is an adequate choice for many applications,
but the user is free to changes these. For complex ducts or transport over large distances at small angles,
<span class="math notranslate nohighlight">\(S_{12}\)</span> may be required. <span class="math notranslate nohighlight">\(S_4\)</span>/ <span class="math notranslate nohighlight">\(P_1\)</span> or even <span class="math notranslate nohighlight">\(S_2\)</span>/ <span class="math notranslate nohighlight">\(P_0\)</span> would be useful in doing a very cursory run to confirm that the
problem was input correctly, but this would likely be inadequate for weight window generation in a problem
that is complex enough to require advanced variance reduction.</p>
<p>These and other Denovo options are applied to both
the forward and the adjoint calculations that are required from the
inputs given in the importance map block.</p>
<p>In problems with small sources or media that are not highly scattering,
discrete ordinates can suffer from “ray effects” <a class="bibtex reference internal" href="#lathrop-ray-1968" id="id15">[Lat68]</a><a class="bibtex reference internal" href="#lathrop-remedies-1971" id="id16">[Lat71]</a>
where artifacts of the discrete quadrature directions can be seen in the
computed fluxes. Denovo has a
first-collision capability to help alleviate ray effects. This method
computes the uncollided flux in each mesh cell from a point source. The
uncollided fluxes are then used as a distributed source in the main
discrete-ordinates solution. At the end of the main calculation, the
uncollided fluxes are added to the fluxes computed with the first
collision source, forming the total flux. While this helps reduce ray
effects in many problems, the first-collision capability can take a
significant amount of time to compute on a mesh with many cells or for
many point sources.</p>
<p>Adjoint sources that use point locations will automatically use the
Denovo first-collision capability. Volumetric adjoint sources (that use
a boundingBox) will be treated without the first-collision capability.
The keywords “firstCollision” and “noFirstCollision” will be ignored by
MAVRIC for adjoint calculations. Keywords for Denovo options in the
importance map block are summarized at the end of this section, in
<a class="reference internal" href="#denovo-op"><span class="std std-numref">Table 197</span></a>.</p>
</div>
<div class="section" id="starting-with-an-existing-adjoint-flux-file">
<h4>Starting with an existing adjoint flux file<a class="headerlink" href="#starting-with-an-existing-adjoint-flux-file" title="Permalink to this headline"></a></h4>
<p>An importance map can be made from an existing Denovo flux file by using
the keyword “adjointFluxes=” with the appropriate file name in quotes.
The file must be a binary file using the *.dff file format, and the
number of groups must match the number of groups in the MAVRIC cross
section library (i.e., the library entered on the third line of the
MAVRIC input file). Instead of performing an adjoint calculation, the
fluxes read from the file will be used to create both the mesh-based
importance map and the biased mesh source.</p>
<div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">importanceMap</span>
    <span class="err">adjointFluxes=”c:\mydocu~</span><span class="m">1</span><span class="err">\previousRun.adjoint.dff”</span>
    <span class="err">gridGeometry=</span><span class="m">7</span>
<span class="n">end</span><span class="err"> </span><span class="n">importanceMap</span>
</pre></div>
</div>
<p>If the “adjointFluxes=” keyword is used and any adjoint sources are defined, an error will result. If a forward flux file is supplied for forward-weighting the adjoint source (see below), then an adjoint flux file cannot be specified.</p>
<p>The grid geometry is not required when using a pre-existing flux file. If grid geometry is not supplied, one will be created from the mesh planes that are contained in the Denovo flux file (which were used to compute the fluxes in that file).</p>
</div>
<div class="section" id="forward-weighting-the-adjoint-source">
<h4>Forward-weighting the adjoint source<a class="headerlink" href="#forward-weighting-the-adjoint-source" title="Permalink to this headline"></a></h4>
<p>To optimize a mesh tally or multiple region tallies/point detector
tallies over a large region, instead of a uniform weighting of the
adjoint source, a weighting based on the inverse of the forward response
can be performed. This requires an extra discrete-ordinates calculation but
can help the forward Monte Carlo calculation compute the mesh tally or
group of tallies with more uniform statistical uncertainties.</p>
<p>The same grid geometry will be used in both the forward calculation and
the adjoint calculation, so the user must ensure that the mesh
covers all of the forward sources and all of the adjoint sources, even
if they are point sources.</p>
<p>To use forward-weighted CADIS, specify either of the keywords –
“respWeighting” or “fluxWeighting”. For either, MAVRIC will run Denovo
to create an estimate of the forward flux,
<span class="math notranslate nohighlight">\(\phi\left( \overrightarrow{r},E \right)\)</span>. For response weighting
(“respWeighting”), each adjoint source is inversely weighted by the
integral of the product of the response function used in that adjoint
source and the estimate of the forward flux. For an adjoint source
described by the geometric function <span class="math notranslate nohighlight">\(g(\overrightarrow{r})\)</span> and
the response function <span class="math notranslate nohighlight">\(\sigma_{d}\left( E \right)\)</span> (note that
<span class="math notranslate nohighlight">\(\sigma_{d}\left( E \right) = 1\)</span> for computing total fluxes), the
forward-weighted adjoint source becomes</p>
<div class="math notranslate nohighlight" id="equation-mavric-19">
<span class="eqno">(255)<a class="headerlink" href="#equation-mavric-19" title="Permalink to this equation"></a></span>\[ q_{i}^{+}\left( \overrightarrow{r},E \right) = \frac{\sigma_{d}\left( E \right)g(\overrightarrow{r})}{\int_{}^{}{\sigma_{d}\left( E \right)\ \phi\left( \overrightarrow{r},E \right)}\ \text{dE}} \ \ .\]</div>
<p>Response weighting will calculate more uniform relative uncertainties of
the integral quantities of the tallies in the final Monte Carlo
calculation.</p>
<p>To optimize the calculation of the entire group-wise flux with more
uniform relative uncertainties in each group, the adjoint source should
be weighted inversely by the forward flux,
<span class="math notranslate nohighlight">\(\phi\left( \overrightarrow{r},E \right),\)</span> using the
“fluxWeighting” keyword. For an adjoint source described by the
geometric function <span class="math notranslate nohighlight">\(g(\overrightarrow{r})\)</span> and the response
function <span class="math notranslate nohighlight">\(\sigma_{d}\left( E \right) = 1\)</span>, the forward-weighted
adjoint source becomes</p>
<div class="math notranslate nohighlight" id="equation-mavric-20">
<span class="eqno">(256)<a class="headerlink" href="#equation-mavric-20" title="Permalink to this equation"></a></span>\[q_{i}^{+}\left( \overrightarrow{r},E \right) = \frac{\sigma_{d}\left( E \right)g(\overrightarrow{r})}{\phi\left( \overrightarrow{r},E \right)}\ .\]</div>
<p>For example, consider a problem with a single source and two detectors,
one near the source that measures flux and one far from the source that
measures some response. In a standard Monte Carlo calculation, it is
expected that since more Monte Carlo particles cross the near detector,
it will have a much lower relative uncertainty than the far detector.
Standard CADIS could be used to optimize the calculation of each in
separate simulations:</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>To optimize the flux in the near detector</p></td>
<td><p>To optimize the response in the far detector</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">importanceMap</span>
    <span class="err">gridGeometryID=</span><span class="m">1</span>
    <span class="err">adjointSource</span> <span class="m">1</span>
        <span class="err">boundingBox</span> <span class="err">x</span><span class="m">1</span> <span class="err">x</span><span class="m">2</span> <span class="err">y</span><span class="m">1</span> <span class="err">y</span><span class="m">2</span> <span class="err">z</span><span class="m">1</span> <span class="err">z</span><span class="m">2</span>
        <span class="err">responseID=</span><span class="m">1</span>
    <span class="n">end</span><span class="err"> </span><span class="n">adjointSource</span>
<span class="n">end</span><span class="err"> </span><span class="n">importanceMap</span>
</pre></div>
</div>
</td>
<td><div class="highlight-scale notranslate"><div class="highlight"><pre><span></span><span class="n">read</span><span class="err"> </span><span class="n">importanceMap</span>
    <span class="err">gridGeometryID=</span><span class="m">1</span>
    <span class="err">adjointSource</span> <span class="m">2</span>
        <span class="err">boundingBox</span> <span class="err">u</span><span class="m">1</span> <span class="err">u</span><span class="m">2</span> <span class="err">v</span><span class="m">1</span> <span class="err">v</span><span class="m">2</span> <span class="err">w</span><span class="m">1</span> <span class="err">w</span><span class="m">2</span>
        <span class="err">responseID=</span><span class="m">6</span>
    <span class="n">end</span><span class="err"> </span><span class="n">adjointSource</span>
<span class="n">end</span><span class="err"> </span><span class="n">importanceMap</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
<p>where response 1 was defined as <span class="math notranslate nohighlight">\(\sigma_{1}\left( E \right) = 1\)</span>
and response 6 was defined as <span class="math notranslate nohighlight">\(\sigma_{6}\left( E \right) =\)</span>
flux-to-response conversion factors. The two options for
forward weighting allow the tallies for both detectors to be calculated
in the same MAVRIC simulation. Using “fluxWeighting”, the importance map
and biased source will be made to help distribute Monte Carlo particles
evenly through each energy group and every voxel in both detectors,
making the relative uncertainties close to uniform. With
“respWeighting”, the importance map and biased source will optimize the
total integrated response of each tally.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>To optimize <span class="math notranslate nohighlight">\(\phi\left( \overrightarrow{r},E \right)\)</span> in each detector</p></td>
<td><p>To optimize a total response <span class="math notranslate nohighlight">\(\int_{}^{}{\sigma_{d}\left ( E \right) \phi \left( \overrightarrow{r},E \right)} dE\)</span> (either total flux or total dose)</p></td>
</tr>
<tr class="row-even"><td><div class="highlight-scale notranslate"><div class="highlight"><pre><span></span>  <span class="n">read</span><span class="err"> </span><span class="n">importanceMap</span>
    <span class="err">gridGeometryID=</span><span class="m">1</span>
<span class="err"></span>   <span