File: languageReference.tex

package info (click to toggle)
xmds-doc 0~svn.1884-3.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 8,336 kB
  • ctags: 192
  • sloc: makefile: 135; python: 55
file content (2965 lines) | stat: -rw-r--r-- 86,554 bytes parent folder | download | duplicates (3)
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
% $Id: languageReference.tex 1708 2008-01-29 04:42:52Z gmcmanus $

% Copyright (C) 2000-2007
%
% Code contributed by Greg Collecutt, Joseph Hope and the xmds-devel team
%
% This file is part of xmds.
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software 
% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

\chapter{Language Reference}
\label{chap:languageRef}

%%% simulation
\section{simulation}
\label{lab:simulation}
\index{simulation@\xmdsTag{simulation}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{simulation}{simulation}
\xmdsOption{xmds tags} \xmdsTag{/simulation}

\item[Contains:]  
\xmdsTagLink{name(simulation)}{name}, 
\xmdsTagLink{prop_dim(simulation)}{prop\_dim}, 
\xmdsTagLink{error_check}{error\_check}, 
\xmdsTagLink{stochastic}{stochastic}, 
\xmdsTagLink{globals}{globals}, 
\xmdsTagLink{use_mpi}{use\_mpi}, 
\xmdsTagLink{MPI_Method}{MPI\_Method}, 
\xmdsTagLink{field}{field}, 
\xmdsTagLink{sequence}{sequence}, 
\xmdsTagLink{output}{output}, 
\xmdsTagLink{noises}{noises}, 
\xmdsTagLink{paths}{paths}, 
\xmdsTagLink{benchmark}{benchmark}, 
\xmdsTagLink{binary_output}{binary\_output} (obsolete), 
\xmdsTagLink{use_wisdom}{use\_wisdom}, 
\xmdsTagLink{use_double}{use\_double} (obsolete),
\xmdsTagLink{use_prefs}{use\_prefs},
\xmdsTagLink{argv}{argv},
\xmdsTagLink{threads}{threads},
\xmdsTagLink{use_openmp}{use\_openmp},
\xmdsTagLink{fftw_version}{fftw\_version}

\item[Subelement of:] None

\item[Path to tag:] \xmdsTag{simulation}

\item[Description:] Container tag for the \xmds simulation code.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
   <!-- xmds tags -->
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% name (simulation)
\section{name (simulation)}
\label{lab:name(simulation)}
\index{name (simulation)@\xmdsTag{name} (simulation)}
\begin{xmdsDoc}
\item \optl 
\xmdsTagTarg{name(simulation)}{name}
\xmdsOption{string} \xmdsTag{/name}

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow \xmdsTag{name}

\item[Description:] The name of the \xmds simulation.  Defines the 
name of the output C code file and subsequently the name of the 
simulation binary executable.  This tag is optional, and if not 
specified then the output filenames will be derived from the xmds 
script filename minus its last extension.  For instance, for the 
\texttt{atomlaser.xmds} script, the base for the output \texttt{.cc} 
file will be \texttt{atomlaser}.  This isn't really a very instructive 
example\ldots

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <name> atomlaser </name>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% prop_dim (simulation)
\section{prop\_dim (simulation)}
\label{lab:prop_dim(simulation)}
\index{prop_dim (simulation)@\xmdsTag{prop\_dim} (simulation)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{prop_dim(simulation)}{prop\_dim}
\xmdsOption{string} \textsf{variableName} \xmdsTag{/prop\_dim}

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{prop\_dim}

\item[Description:] The name of the main propagation direction.  This 
name must appear in the equations supplied.  This condition, however, 
is not checked and therefore a possible source of error for the user.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <prop_dim> z </prop_dim>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% error_check
\section{error\_check}
\label{lab:error_check}
\index{error_check@\xmdsTag{error\_check}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{error_check}{error\_check}
\xmdsOption{bool} \xmdsTag{/error\_check}

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow \xmdsTag{error\_check}

\item[Description:] Whether or not to run the simulation at half the
time step as well as at the full time step and give the difference
between the results.  Defaults to \texttt{yes}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <error_check> yes </error_check>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% use_mpi
\section{use\_mpi}
\label{lab:use_mpi}
\index{use_mpi@\xmdsTag{use\_mpi}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{use_mpi}{use\_mpi}
\xmdsOption{bool} \xmdsTag{use\_mpi}

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow \xmdsTag{use\_mpi}

\item[Description:] Whether or not to use MPI routines for parallel processing of the simulation.  This writes very different code depending on whether the simulation is stochastic or non-stochastic.  Only certain problems on certain systems can be efficiently parallelised when the equations are non-stochastic.  Defaults to \texttt{no}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <use_mpi> yes </use_mpi>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% stochastic
\section{stochastic}
\label{lab:stochastic}
\index{stochastic@\xmdsTag{stochastic}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{stochastic}{stochastic}
\xmdsOption{bool} \xmdsTag{/stochastic}

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{stochastic}

\item[Description:] Defaults to \ttt{no}.  Tells \xmds whether or not
the simulation uses Gaussian noise terms.  If this tag is set to
\texttt{yes} then the \xmdsTag{paths}, \xmdsTag{seeds} and
\xmdsTag{noises} tags become compulsory.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <stochastic> no </stochastic>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% MPI_Method
\section{MPI\_Method}
\label{lab:MPI_Method}
\index{MPI_Method@\xmdsTag{MPI\_Method}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{MPI_Method}{MPI\_Method}
\xmdsOption{string} \xmdsTag{/MPI\_Method}

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{MPI\_Method}

\item[Description:] Defaults to \ttt{Scheduling}.  For stochastic simulations
using MPI, it tells \xmds which method to use for splitting the paths 
between different processors.  The default "Scheduling" option is 
usually optimal, but requires the use of threads.  If threads are unavailable, the 
"Uniform" option should be used.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <MPI_Method> Uniform </MPI_Method>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% paths
\section{paths}
\label{lab:paths}
\index{paths@\xmdsTag{paths}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{paths}{paths}
\xmdsOption{int} \xmdsTag{/paths}\\
(\reqd if \xmdsTag{stochastic} is \texttt{yes})

\item[Contains:] integer

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{paths}

\item[Description:] The number of stochastic paths to integrate.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <paths> 3 </paths>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% seed
\section{seed}
\label{lab:seed}
\index{seed@\xmdsTag{seed}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{seed}{seed} \xmdsOption{int} \xmdsOption{int}
\xmdsTag{/seed}\\
(\reqd if \xmdsTag{stochastic} is \texttt{yes})

\item[Contains:] array of two integers

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{seed}

\item[Description:] The seed to the random number generator.
  Internally, these are the seeds passed to the C routine
  \ttt{erand48()} to generate two independent random number
  generators, hence the use of two integers.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <seed> 1 2 </seed>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% noises
\section{noises}
\label{lab:noises}
\index{noises@\xmdsTag{noises}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{noises}{noises}
\xmdsOption{int} \xmdsTag{/noises}\\
(\reqd if \xmdsTag{stochastic} is \texttt{yes})

\item[Contains:] integer

\item[Attributes:] \optl
  \ttt{kind="gaussian|gaussFast|poissonian|uniform"},
  \ttt{mean="\xmdsOption{int}"} (\reqd for \ttt{poissonian})

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{noises}

\item[Description:] The number of noise terms in the simulation.
  \xmds automatically declares the variables \ttt{n\_1} \ldots
  \ttt{n\_\tit{m}} where \tit{m} is the number of noises specified.
  As of \xmds-1.3-3 the \xmdsTag{noises} tag now accepts attributes.
  Currently these are \ttt{gaussian}, \ttt{gaussFast},
  \ttt{poissonian}, and \ttt{uniform}.  Each refers to a different
  noise source; 
  \begin{description}
    \item[\ttt{gaussian}] refers to the original noise routine
      that \xmds uses.  It produces a Gaussian-distributed variable with mean of zero and
      variance of 1/(product of the propagation and transverse step sizes).
    \item[\ttt{gaussFast}] is a slightly faster implementation
      of the same routine, and will eventually replace the old
      \ttt{gaussian} routine.
    \item[\ttt{poissonian}] is a Poissonian noise
      source, and requires the \ttt{mean\_rate} attribute to be set to the
      desired mean rate of the Poissonian noise distribution.  Simulations where the mean rate
      is a function of the propagation dimension or other variables are not supported via this method,
      but judicious use of the functions element can allow this rate to be adjusted manually.
    \item[\ttt{uniform}] gives uniformly distributed noise on the
      interval $[0,1)$.
  \end{description}

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <noises kind="gaussian"> 1 </noises>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% benchmark
\section{benchmark}
\label{lab:benchmark}
\index{benchmark@\xmdsTag{benchmark}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{benchmark}{benchmark}
\xmdsOption{bool} \xmdsTag{/benchmark} \xmdsOneTwo

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{benchmark}

\item[Description:] Defaults to \texttt{no}.  Tells \xmds whether or
  not to put timing code around the main section of code (that part of
  the code excluding fftw creation and deletion) as a way of
  benchmarking the simulation, or at least giving an idea of how long
  the main section of code will take.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <benchmark> yes </benchmark>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% binary_output
\section{binary\_output}
\label{lab:binary_output}
\index{binary_output@\xmdsTag{binary\_output}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{binary_output}{binary\_output}
\xmdsOption{bool} \xmdsTag{/binary\_output} \xmdsOneTwo\\
\tsc{Obsolete}: see \xmdsTag{output}

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{binary\_output}

\item[Description:] Defaults to \texttt{no}.  If set to \texttt{yes} 
\xmds saves data file in binary format instead of the default, ascii.

This tag is now obsolete.  Please specify the \ttt{format} attribute
in the \xmdsTag{output} tag.  
For example: \xmdsTag{output format="binary"}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <binary_output> yes </binary_output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% use_wisdom
\section{use\_wisdom}
\label{lab:use_wisdom}
\index{use_wisdom@\xmdsTag{use\_wisdom}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{use_wisdom}{use\_wisdom}
\xmdsOption{bool} \xmdsTag{/use\_wisdom} \xmdsOneTwo

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{use\_wisdom}

\item[Description:] Defaults to \texttt{no}.  If \texttt{yes} the 
simulation will use fftw's wisdom feature.  The simulation will look 
in the user's \texttt{\~{}/.xmds/wisdom} directory (or failing the 
existence of such a directory, in the directory local to the 
simulation binary executable) for a file labelled 
\texttt{<hostname>.wisdom} where \texttt{<hostname>} is the name of 
the computer currently running the simulation.  If such a file exists, 
then the \xmds simulation will load this wisdom as part of the fftw 
plan creation step, thus drastically reducing startup time of the 
simulation.  Any accumulated wisdom will be then added back to this 
file at the fftw plan deletion stage.  If no wisdom file is found, the 
simulation will create one in an appropriate location and then save 
any accumulated wisdom to this file.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <use_wisdom> no </use_wisdom>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% use_double
\section{use\_double}
\label{lab:use_double}
\index{use_double@\xmdsTag{use\_double}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{use_double}{use\_double}
\xmdsOption{bool} \xmdsTag{/use\_double} \xmdsOneTwo\\
\tsc{Obsolete}: see \xmdsTag{output}

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{use\_double}

\item[Description:] Defaults to \texttt{yes}.  Decides the precision 
of the output data.  Only useful when \xmdsTag{use\_binary} is set 
to \texttt{yes}.  If set to \texttt{no} then single precision output 
is used.  This option is useful in reducing the size of the output 
files.

This tag is now obsolete.  Please specify the \ttt{precision}
attribute in the \xmdsTag{output} tag.  
For example: \xmdsTag{output precision="double"}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <use_double> no </use_double>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% use_prefs
\section{use\_prefs}
\label{lab:use_prefs}
\index{use_prefs@\xmdsTag{use\_prefs}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{use_prefs}{use\_prefs}
\xmdsOption{bool} \xmdsTag{/use\_prefs} \xmdsOneTwo

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{use\_prefs}

\item[Description:] Defaults to \ttt{yes}.  Tells \xmds whether or
  not to use the user preferences file (called \ttt{xmds.prefs})
  located in either the user's \ttt{.xmds} directory or within the
  directory local to the \xmds simulation script.  By default, \xmds
  will use the preferences file if it exists, if not then it uses the
  preferences set when \xmds was built.  One can explicitly use the
  build preferences by setting \xmdsTag{use\_prefs} to \ttt{no}.

  The format of the preferences file is a sequence of key/value pairs
  separated by an equals sign (=).  For instance, if one wished to
  change the compiler used by \xmds to compile simulations then one
  needs to change the \ttt{XMDS\_CC} variable.  Hence, to do set this
  to \ttt{icc}, for example, one would enter the following line into
  the \ttt{xmds.prefs} file:\\
  \ttt{XMDS\_CC = icc}

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <use_prefs> no </use_prefs>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% threads
\section{threads}
\label{lab:threads}
\index{threads@\xmdsTag{threads}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{threads}{threads}
\xmdsOption{int} \xmdsTag{/threads}

\item[Contains:] integer
\item[Subelement of:] \xmdsTagLink{simulation}{simulation}
\item[Path to tag:] \xmdsTag{simulation} \textarrow \xmdsTag{threads}
\item[Description:] If set to a value of $n \neq 1$, this tag tells \xmds to create a simulation that uses the threaded version of the FFT library, and to use $n$ threads for calculating the FFT's.
\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
	<threads> 3 </threads>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% use_openmp
\section{use\_openmp}
\label{lab:use_openmp}
\index{use_openmp@\xmdsTag{use\_openmp}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{use_openmp}{use\_openmp}
\xmdsOption{bool} \xmdsTag{/use\_openmp}

\item[Contains:] boolean
\item[Subelement of:] \xmdsTagLink{simulation}{simulation}
\item[Path to tag:] \xmdsTag{simulation} \textarrow \xmdsTag{use\_openmp}
\item[Description:] Defaults to \ttt{no}. Tells \xmds whether to make use of \htmladdnormallink{OpenMP}{http://www.openmp.org} compiler directives to instruct the compiler how to parallelise parts of the simulation other than the FFT's. The simulation will compile correctly if OpenMP by the compiler, and you will need to ensure that the correct flags are passed to the compiler to ensure that it does enable OpenMP support (e.g.\ for Intel's C compiler the flag \ttt{-openmp} must be passed to the compiler to enable OpenMP). OpenMP cannot be used simultaneously with MPI for deterministic simulations. Also, the number of OpenMP threads used in a simulation defaults to the number of physical processors available. Note that best performance will be achieved if FFTW is compiled to use OpenMP threads instead of the default \ttt{pthreads} if your simulations make use of OpenMP threads.

See the OpenMP website (\htmladdnormallink{http://www.openmp.org}{http://www.openmp.org}) for more information about OpenMP. As of mid-2006, Intel's icc compiler supports OpenMP, however the current release of GCC (4.1.1) does not. Support for OpenMP is planned for the 4.2 release of GCC.
\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <use_openmp> yes </use_openmp>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%% 

%%% fftw_version
\section{fftw\_version}
\label{lab:fftw_version}
\index{fftw_version@\xmdsTag{fftw\_version}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{fftw_version}{fftw\_version}
\xmdsOption{int} \xmdsTag{/fftw\_version}

\item[Contains:] integer

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow \xmdsTag{fftw\_version}

\item[Description:] Defaults to \ttt{2}. This tag tells \xmds which version of the fftw
    library to use. Currently, fftw3 does not support distributed-memory fourier transforms
    using MPI, but only shared-memory transforms using threads. Consequently, fftw version 3
    can only be used for simulations that are not MPI-using deterministic simulations. Stochastic
    MPI simulations can take advantage of fftw3 as they do not need distributed-memory fourier transforms.
    
    To override the libraries that \xmds links against when compiling a simulation that uses fftw3, override
    the \ttt{FFTW3\_LIBS} library in your \ttt{xmds.prefs} file.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <fftw_version> 3 </fftw_version>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% globals
\section{globals}
\label{lab:globals}
\index{globals@\xmdsTag{globals}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{globals}{globals}
\xmdsOption{C code} \xmdsTag{/globals}

\item[Contains:] \CDATA block with C++ code

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{globals}

\item[Description:] Defines variables and constants that are globally
available to all sections of the output C code.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <globals>
        <![CDATA[
            const double energy = 4;
            const double vel = 0.0;
            const double hwhm = 1.0;
        ]]>
    </globals>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% argv
\section{argv}
\label{lab:argv}
\index{argv@\xmdsTag{argv}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{argv}{argv}
\xmdsOption{xmds tags} \xmdsTag{/argv} \xmdsOneTwo

\item[Contains:] \xmdsTagLink{arg}{arg}

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{argv}

\item[Description:] Overall tag containing the arguments to be
  supplied at the simulation command line.  Command line arguments can
  be very useful if one wants to vary parameters within the simulation,
  between simulation runs.  Hence one can write a (Perl/Python/shell)
  script to run the simulation over the various parameters, without
  having to rewrite an \xmds script, recompile and then rerun.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <argv>
        <!-- xmds tags -->
    </argv>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% arg
\subsection{arg}
\label{lab:arg}
\index{arg@\xmdsTag{arg}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{arg}{arg}
\xmdsOption{xmds tags} \xmdsTag{/arg} \xmdsOneTwo

\item[Contains:] \xmdsTagLink{name(arg)}{name}, 
\xmdsTagLink{type(arg)}{type},
\xmdsTagLink{default_value}{default\_value}

\item[Subelement of:] \xmdsTagLink{argv}{argv}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{argv} \textarrow \xmdsTag{arg}

\item[Description:] Container for the tags describing a given command
  line argument.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <argv>
        <arg>
            <!-- xmds tags -->
        </arg>
    </argv>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% name (arg)
\subsection{name (arg)}
\label{lab:name(arg)}
\index{name (arg)@\xmdsTag{name} (arg)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{name(arg)}{name}
\xmdsOption{char *} \xmdsTag{/name} \xmdsOneTwo

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{arg}{arg}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{argv} \textarrow \xmdsTag{arg} \textarrow \xmdsTag{name}

\item[Description:] The name of the command line argument.  This tag
  is used to create a flag to specify the value of the variable
  entered at the command line.  Two forms are accepted: a short form
  and a long form, each conforming to the GNU getopt conventions.  For
  instance, for a variable named \ttt{nconst} the flag used at the
  command line will have a short form of \ttt{-n} and a long form of
  \ttt{--nconst}.  However, if another variable has been chosen
  beginning with the letter n, then \ttt{-n} is no longer unique, and
  to make the short flag unique, \xmds chooses the next character in
  the variable name, in this case the letter c, and making the short
  form flag \ttt{-c}.  The long form remains the same,
  i.e.~\ttt{--nconst}.  Of course, if the letter c has also been used
  then \xmds loops through all of the other letters in the variable
  name until it finds a match.  If no match is found \xmds reports an
  error.

  To check the short and long forms of the flags the simulation
  expects, the user can use the \ttt{-h} or \ttt{--help} options with
  the simulation.  For instance, with the \ttt{nlse} simulation, one
  can enter the following command to get a listing of the arguments
  the \xmds simulation expects at its command line:
\begin{xmdsCode}
% nlse --help
\end{xmdsCode}

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <argv>
        <arg>
            <name> nconst </name>
            <type> int </type>
            <default_value> 2 </default_value>
        </arg>
    </argv>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% type (arg)
\subsection{type (arg)}
\label{lab:type(arg)}
\index{type (arg)@\xmdsTag{type} (arg)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{type(arg)}{type}
\xmdsOption{char *} \xmdsTag{/type} \xmdsOneTwo

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{arg}{arg}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{argv} \textarrow \xmdsTag{arg} \textarrow \xmdsTag{type}

\item[Description:] The type of the command line argument, e.g. int,
  double, char *.  At present this mechanism cannot handle complex
  inputs.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <argv>
        <arg>
            <name> nconst </name>
            <type> int </type>
            <default_value> 2 </default_value>
        </arg>
    </argv>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% default_value (arg)
\subsection{default\_value}
\label{lab:default_value}
\index{default_value@\xmdsTag{default\_value}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{default_value}{default\_value}
\xmdsOption{char *} \xmdsTag{/default\_value} \xmdsOneTwo

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{arg}{arg}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{argv} \textarrow \xmdsTag{arg} \textarrow \xmdsTag{default\_value}

\item[Description:] The default value of the command line argument.
  Values will be converted from the string entered into the type
  given in the \xmdsTag{type} tag.  If the variable is not specified
  at the command line then this is the value used by the simulation.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <argv>
        <arg>
            <name> nconst </name>
            <type> int </type>
            <default_value> 2 </default_value>
        </arg>
    </argv>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% field
\section{field}
\label{lab:field}
\index{field@\xmdsTag{field}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{field}{field}
\xmdsOption{xmds tags} \xmdsTag{/field}

\item[Contains:] \xmdsTagLink{name(field)}{name}, 
\xmdsTagLink{dimensions}{dimensions}, 
\xmdsTagLink{lattice(field)}{lattice}, 
\xmdsTagLink{domains}{domains}, 
\xmdsTagLink{samples(field)}{samples},
\xmdsTagLink{vector}{vector}

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{globals} \textarrow \xmdsTag{field}

\item[Description:] Container element to hold the tags describing the
  field to be integrated.  At present, only one field is permitted in
  a simulation.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <!-- xmds tags -->
    </field>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% name (field)
\subsection{name (field)}
\label{lab:name(field)}
\index{name (field)@\xmdsTag{name} (field)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{name(field)}{name}
\xmdsOption{string} \xmdsTag{/name}

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{field}{field}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{name}

\item[Description:] The name of the field to integrate.  Defaults to
  \ttt{main}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <name> main </name>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% dimensions
\subsection{dimensions}
\label{lab:dimensions}
\index{dimensions@\xmdsTag{dimensions}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{dimensions}{dimensions}
\xmdsOption{string} \textsf{variableName} \xmdsOption{string} 
\textsf{variableName} \ldots \xmdsTag{/dimensions}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{field}{field}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{dimensions}

\item[Description:] A space delimited array of the names of dimensions
  in the field other than the propagation dimension.  This element is
  therefore a list of the transverse field dimensions.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <dimensions> t </dimensions>
    </field>
<simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% lattice (field)
\subsection{lattice (field)}
\label{lab:lattice(field)}
\index{lattice (field)@\xmdsTag{lattice} (field)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{lattice(field)}{lattice}
\xmdsOption{int} \xmdsOption{int} \ldots
\xmdsTag{/lattice}\\
(\reqd if \xmdsTag{dimensions} assignment present)

\item[Contains:] array of integers

\item[Subelement of:] \xmdsTagLink{field}{field}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{lattice}

\item[Description:] A space delimited array of integers giving the
  number of points in the grid for each dimension listed in the
  \xmdsTag{dimensions} tag.

\item[Exmaple:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <lattice> 100 </lattice>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% domains
\subsection{domains}
\label{lab:domains}
\index{domains@\xmdsTag{domains}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{domains}{domains}
\xmdsOption{(double, double)} 
\xmdsOption{(double, double)} \ldots \xmdsTag{/domains}\\
(\reqd if \xmdsTag{dimensions} assignment present)

\item[Contains:] array of ordered pairs of doubles

\item[Subelement of:] \xmdsTagLink{field}{field}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{domains}

\item[Description:] This tag specifies the domain range of each
  dimension listed in the \xmdsTag{dimensions} tag.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <domains> (-5, 5) </domains>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% samples (field)
\subsection{samples (field)}
\label{lab:samples(field)}
\index{samples (field)@\xmdsTag{samples} (field)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{samples(field)}{samples}
\xmdsOption{int} \xmdsOption{int} \ldots
\xmdsTag{/samples}

\item[Contains:] array of integers, specifically either \ttt{1} or
  \ttt{0}

\item[Subelement of:] \xmdsTagLink{field}{field}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{samples}

\item[Description:] Tells \xmds which moment groups to sample.  This
  tag should contain a space separated list of \ttt{1}'s and
  \ttt{0}'s.  A \ttt{1} meaning sample the moment group in question,
  and a \ttt{0} meaning do not.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <samples> 1 </samples>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% vector
\subsection{vector}
\label{lab:vector}
\index{vector@\xmdsTag{vector}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{vector}{vector}
\xmdsOption{xmds tags} \xmdsTag{/vector}

\item[Contains:] \xmdsTagLink{name(vector)}{name}, 
\xmdsTagLink{filename(vector)}{filename},
\xmdsTagLink{type(vector)}{type}, 
\xmdsTagLink{components}{components}, 
\xmdsTagLink{fourier_space(vector)}{fourier\_space},
\xmdsTagLink{vectors(vector)}{vectors},
\CDATA

\item[Subelement of:] \xmdsTagLink{field}{field}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{vector}

\item[Description:] A container for tags describing a vector of the
  field.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <vector>
            <!-- xmds tags -->
        </vector>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% name (vector)
\subsubsection{name (vector)}
\label{lab:name(vector)}
\index{name (vector)@\xmdsTag{name} (vector)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{name(vector)}{name}
\xmdsOption{string} \xmdsTag{/name}

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{vector}{vector}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{vector} \textarrow 
\xmdsTag{name}

\item[Description:] Name of the vector in question.  At least one
  vector must be present, and at least one vector must be called
  \ttt{main}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <vector>
            <name> main </name>
        </vector>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% filename (vector)
\subsubsection{filename (vector)}
\label{lab:filename(vector)}
\index{filename (vector)@\xmdsTag{filename} (vector)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{filename(vector)}{filename}
\xmdsOption{string} \xmdsTag{/filename}

\item[Contains:] string

\item[Attributes:] \optl \ttt{format="ascii"|"binary"|"xsil"}
\item[Attributes for the XSIL format:] 
\optl \ttt{moment\_group="N"} \\
\optl \ttt{geometry\_matching\_mode="strict"|"loose"}

\item[Subelement of:] \xmdsTagLink{vector}{vector}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{vector} \textarrow 
\xmdsTag{filename}

\item[Description:] Tells \xmds the file from which to load the
  initial field.

  The \xmdsTag{filename} tag accepts one optional attribute:
  \ttt{format}.  This attribute can take one of three options;
  \ttt{"ascii"}, \ttt{"binary"}, or \ttt{"xsil"} where \ttt{"ascii"} is the
  default option. However, \ttt{"xsil"} is the most robust of these formats
  as it can load any binary XSIL file produced by XMDS (irrespective of what
  architecture the file was produced on). See \Chap{chap:extraAndAdvancedFeatures}, \Sec{subsec:InitialisationFromXSILFile} for more information on loading XSIL files.

  Caution should be taken here when using the \ttt{"binary"} format
  since loading a binary file is more
  difficult to get correct than loading an ascii file.  However, the
  added difficulty is offset by being able to have smaller and more
  complex input data.  A first thing to note is that the byte ordering
  of the system you are going to be loading the file into has to be
  the same as the file itself.  For instance, creating a binary file
  for input to \xmds on PowerPC \tbf{will not} load correctly on an
  x86 platform.

  For the \ttt{"binary"} and \ttt{"ascii"} formats, \xmds expects the input data
  to be essentially interlaced so that it
  is loaded into memory correctly. The best way to explain this is
  by way of example.  If the input data is to be three vectors, say
  \ttt{x}, \ttt{y} and \ttt{z}, then \xmds expects the data to be
  formed thus:
\begin{alltt}
x[0] y[0] z[0] x[1] y[1] z[1] \ldots
\end{alltt}
  and so on with a new line or space between each entry.  The only difference between the ascii and binary input
  formats is that the newline (or space) character is unnecessary, and \xmds just
  expects a sequence of \tbf{double} values ordered as above.

For complex types, \xmds expects the imaginary part of each variable to follow the real part. If the input data for the previous example were complex numbers, then \xmds would expect the data to be in the order:
\begin{alltt}
real(x[0]) imag(x[0]) real(y[0]) imag(y[0]) real(z[0]) imag(z[0]) \ldots
\end{alltt}

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <vector>
            <filename format="binary"> blah </filename>
        </vector>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% type
\subsubsection{type (vector)}
\label{lab:type(vector)}
\index{type (vector)@\xmdsTag{type} (vector)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{type(vector)}{type}
\xmdsOption{string} of \textsf{complex} or \textsf{double} \xmdsTag{/type}

\item[Contains:] string interpreted as either \tbf{complex} or
  \tbf{double} type

\item[Subelement of:] \xmdsTagLink{vector}{vector}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{vector} \textarrow 
\xmdsTag{type}

\item[Description:] The data type of the vector.  Defaults to
  \tbf{complex} if not specified.  It is a good idea to use
  \tbf{complex} here when one is using a Fourier transform technique to
  integrate the equations, even if initially the variables are
  \tbf{double}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <vector>
            <type> complex </type>
        </vector>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% components
\subsubsection{components}
\label{lab:components}
\index{components@\xmdsTag{components}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{components}{components}
\xmdsOption{string} \textsf{variableName} 
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/components}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{vector}{vector}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{vector} \textarrow 
\xmdsTag{components}

\item[Description:] Names the components of the vector.  If a large array of components are required, it is possible to declare that here by putting the size of the array in parentheses immediately after the name.  Subsequent references to these components must have the index afterwards in parentheses.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <vector>
            <components> phi JoeIsGreat(256) </components>
        </vector>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% fourier_space (vector)
\subsubsection{fourier\_space (vector)}
\label{lab:fourier_space(vector)}
\index{fourier_space (vector)@\xmdsTag{fourier\_space} (vector)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{fourier_space(vector)}{fourier\_space}
\xmdsOption{bool} \xmdsOption{bool} \ldots 
\xmdsTag{/fourier\_space}\\
(\reqd if \xmdsTag{filename} not present)

\item[Contains:] array of booleans

\item[Subelement of:] \xmdsTagLink{vector}{vector}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{vector} \textarrow 
\xmdsTag{fourier\_space}

\item[Description:] Tells \xmds whether the dimension specified is
  initialised in Fourier space.  This is a space separated list of
  \ttt{yes}/\ttt{no} values.  A value of \ttt{yes} meaning the
  dimension is defined in Fourier space, and \ttt{no} meaning the
  dimension is defined in $x$-space.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <vector>
            <fourier_space> no </fourier_space>
        </vector>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% vectors (vector)
\subsubsection{vectors (vector)}
\label{lab:vectors(vector)}
\index{vectors (vector)@\xmdsTag{vectors} (vector)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{vectors(vector)}{vectors}
\xmdsOption{string} \textsf{variableName} 
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/vectors}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{vector}{vector}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{field} \textarrow \xmdsTag{vector} \textarrow 
\xmdsTag{vectors}

\item[Description:] Tells \xmds the names of the variables are to be
  referenced in a \CDATA block.  Defaults to \texttt{main}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <field>
        <vector>
            <vectors> main vc1 </vectors>
        </vector>
    </field>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% sequence
\section{sequence}
\label{lab:sequence}
\index{sequence@\xmdsTag{sequence}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{sequence}{sequence}
\xmdsOption{xmds tags} \xmdsTag{/sequence}

\item[Contains:] \xmdsTagLink{integrate}{integrate}, 
\xmdsTagLink{filter}{filter}, 
\xmdsTagLink{sequence}{sequence}

\item[Subelement of:] \xmdsTagLink{simulation}{simulation} or 
\xmdsTagLink{sequence}{sequence}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} (\textarrow \xmdsTag{sequence})

\item[Description:] Container tag for the sequence of integrations to
  perform.  May contain other sequences within itself.  If
  subsequences exist, then they must contain a \xmdsTag{cycles}
  assignment.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <!-- xmds tags -->
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% cycles
\subsection{cycles}
\label{lab:cycles}
\index{cycles@\xmdsTag{cycles}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{cycles}{cycles}
\xmdsOption{int} \xmdsTag{/cycles}\\
(\reqd in nested \xmdsTag{sequence}s) 

\item[Contains:] integer

\item[Subelement of:] \xmdsTagLink{sequence}{sequence}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{cycles}

\item[Description:] The number of times to perform a given sequence
  (as a subsequence of the main sequence).  Defaults to \ttt{1}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <cycles> 3 </cycles>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% integrate
\subsection{integrate}
\label{lab:integrate}
\index{integrate@\xmdsTag{integrate}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{integrate}{integrate}
\xmdsOption{xmds tags} \xmdsTag{/integrate}

\item[Contains:]
\xmdsTagLink{algorithm}{algorithm},
\xmdsTagLink{interval}{interval},
\xmdsTagLink{iterations}{iterations},
\xmdsTagLink{tolerance}{tolerance},
\xmdsTagLink{max_iterations}{max\_iterations},
\xmdsTagLink{smallmemory}{smallmemory},
\xmdsTagLink{cutoff}{cutoff},
\xmdsTagLink{halt_non_finite}{halt\_non\_finite},
\xmdsTagLink{lattice(integrate)}{lattice},
\xmdsTagLink{samples(integrate)}{samples},
\xmdsTagLink{k_operators}{k\_operators},
\xmdsTagLink{moment_group(integrate)}{moment\_group},
\xmdsTagLink{functions(integrate)}{functions},
\xmdsTagLink{vectors(integrate)}{vectors},
\CDATA

\item[Subelement of:] \xmdsTagLink{sequence}{sequence}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate}

\item[Description:] Container element holding the tags that describe
  how the integration should take place.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <!-- xmds tags -->
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% algorithm
\subsubsection{algorithm}
\label{lab:algorithm}
\index{algorithm@\xmdsTag{algorithm}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{algorithm}{algorithm}
\xmdsOption{string} \textsf{algorithmName} \xmdsTag{/algorithm}

\item[Contains:] string, one of \ttt{RK4EX}, \ttt{RK4IP}, \ttt{ARK45EX}, \ttt{ARK45IP}, \ttt{SIEX},
  or \ttt{SIIP}

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{algorithm}

\item[Description:] The algorithm to use when integrating the
  equations.  Defaults to \ttt{SIEX} if \xmdsTag{stochastic} is
  \texttt{yes} or \ttt{RK4EX} if \xmdsTag{stochastic} is \texttt{no}.
  The six algorithms that \xmds currently contains are:
  \begin{description}
  \item[\ttt{RK4EX}] Fourth-order Runge-Kutta in the explicit
    picture.
  \item[\ttt{RK4IP}] Fourth-order Runge-Kutta in the interaction
    picture.
   \item[\ttt{ARK45EX}] adaptive step size Runge-Kutta-Fehlberg in the explicit
    picture.
  \item[\ttt{ARK45IP}] adaptive step size Runge-Kutta-Fehlberg in the interaction
    picture.
  \item[\ttt{SIEX}] Semi-implicit method in the explicit picture.
  \item[\ttt{SIIP}] Semi-implicit method in the interaction picture.
  \end{description}

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <algorithm> RK4IP </algorithm>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% interval
\subsubsection{interval}
\label{lab:interval}
\index{interval@\xmdsTag{interval}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{interval}{interval}
\xmdsOption{double} \xmdsTag{/interval}

\item[Contains:] double

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{interval}

\item[Description:] The integration range.  This is the interval over
  which the main propagation dimension will be integrated.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <interval> 20 </interval>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% iterations
\subsubsection{iterations}
\label{lab:iterations}
\index{iterations@\xmdsTag{iterations}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{iterations}{iterations}
\xmdsOption{int} \xmdsTag{/iterations}

\item[Contains:] integer

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{iterations}

\item[Description:] When using one of the semi-implicit algorithms
  this option can be altered to control the number of iterations of the
  algorithm to for convergence of the method.  Defaults to \ttt{3}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <iterations> 5 </iterations>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%%% tolerance
\subsubsection{tolerance}
\label{lab:tolerance}
\index{tolerance@\xmdsTag{tolerance}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{tolerance}{tolerance}
\xmdsOption{double} \xmdsTag{/tolerance}

\item[Contains:] double

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{tolerance}

\item[Description:] If one of the adaptive step size methods is used, this assignment controls the maximum \emph{relative} error that is allowed per step on any of the grid points.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <tolerance>1e-10</tolerance>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%%

%%%% max_iterations
\subsubsection{max\_iterations}
\label{lab:max_iterations}
\index{max_iterations@\xmdsTag{max\_iterations}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{max_iterations}{max\_iterations}
\xmdsOption{int} \xmdsTag{/max\_iterations}

\item[Contains:] integer

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{max\_iterations}

\item[Description:] Applies to the ARK45 algorithms only. If the behaviour of the solution is unknown and might result in a very small step size the maximum number of iterations (steps and discarded steps) can be limited with this optional tag. This is particularly useful in the debugging stage or on systems that impose time limits on their running programs.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <max_iterations>5000000</max_iterations>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%%

%%% min_time_step
\subsubsection{min\_time\_step}
\label{lab:min_time_step}
\index{min_time_step@\xmdsTag{min\_time\_step}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{iterations}{min\_time\_step}
\xmdsOption{double} \xmdsTag{/min\_time\_step}

\item[Contains:] double

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow
\xmdsTag{min\_time\_step}

\item[Description:]
The minimum time-step an integration algorithm should try,
before halting that pass of the integration.
This option applies to the adaptive algorithms (ARK45 and ARK89) only.

The default value is \texttt{1e-13},
that is, $10^{-13}$.
A value of \texttt{0} disables the check on the time-step,
which will slightly speed up integrations that do not require the check.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <min_time_step>1e-10</min_time_step>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%%

%%%% smallmemory
\subsubsection{smallmemory}
\label{lab: smallmemory}
\index{smallmemory@\xmdsTag{smallmemory}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{smallmemory}{smallmemory}
\xmdsOption{bool} \xmdsTag{/smallmemory}

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{smallmemory}

\item[Description:] Defaults to \ttt{no}. In this case, when using the ARK45IP algorithm \xmds calculates and stores six copies of the derivative operators per step as each of them can be reused once. For problems with memory limitations it might be better to assign \ttt{yes} to this element, then each array of derivatives needs to be calculated twice per step, but significantly less memory should be used.
\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <smallmemory> yes </smallmemory>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%%

%%%% cutoff
\subsubsection{cutoff}
\label{lab: cutoff}
\index{iterations@\xmdsTag{cutoff}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{cutoff}{cutoff}
\xmdsOption{double} \xmdsTag{/cutoff}

\item[Contains:] double

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{cutoff}

\item[Description:] If one of the adaptive step size methods is used, the \ttt{cutoff} value sets the threshold for the function values that are included in the determination of relative errors. Grid points where the function is less than \ttt{cutoff}*peakvalue are not included.
The value defaults to 1/1000;

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <cutoff> 1e-5 </cutoff>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%%

%%% halt_non_finite

\subsubsection{halt\_non\_finite}
\label{lab:halt_non_finite}
\index{halt_non_finite@\xmdsTag{halt\_non\_finite}}
\begin{xmdsDoc}

\item \optl \xmdsTagTarg{halt_non_finite}{halt\_non\_finite}
\xmdsOption{bool} \xmdsTag{/halt\_non\_finite}

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow
\xmdsTag{halt\_non\_finite}

\item[Description:]
If \texttt{yes}, then halt the current integration pass
if it produces a non-finite number
in the first component of the main vector.
Since non-finite numbers usually propogate quickly
through the components of the main vector,
this will quickly detect any non-finite number.

Examples of non-finite numbers
are \texttt{1.0/0.0}, which is infinite,
and \texttt{0.0/0.0}, which is not a number (NaN).
Some platforms process non-finite numbers slower than finite numbers;
others process them faster.
Regardless, they are unlikely to be useful results from an integration.

Note that, by default,
\xmds compiles the generated C++ code with optimizations
that sacrifice strict compliance with floating-point arithmetic standards
(e.g. IEEE 754).

Many of these optimizations assume that all floating-point numbers are finite.
Naturally, this may pose problems for a non-finite number check.
In some cases, the check for non-finite numbers is optimized to oblivion.
Depending on other optimizations, the time-step may become NaN
and the integration will never move forward
and therefore never terminate.

An easy way to see if the check for non-finite numbers
survived optimization is to run the following
(supposing \xmds compiled the \ttt{simulation} binary
from \ttt{simulation.xmds}):
\begin{quote}
\begin{verbatim}
strings simulation | grep halt_non_finite:
\end{verbatim}
\end{quote}
(The colon is important.)
If this command prints output similar to the following:
\begin{quote}
\begin{verbatim}
* NOTICE: halt_non_finite: Integration halted.
\end{verbatim}
\end{quote}
then at least the check is not optimized away
and \ttt{halt\_non\_finite} is more likely to work.

When using GCC \xmds enables the \texttt{-ffast-math} flag.
In GCC version 3.3, this seems to pose problems with \ttt{halt\_non\_finite}.
Removing the \texttt{-ffast-math} flag should solve the problem.
Alternatively, keeping this flag
and adding the \texttt{-fno-unsafe-math-optimizations} flag
\textit{after} the \texttt{-ffast-math} flag seems to work
(and should produce faster code).
GCC~4 seems to have no problem.

There seems to be no problem using version 10.1 of Intel's compiler \ttt{icc}.
Note that \ttt{icc} sacrifices floating-point compliance for speed by default,
but this can be changed using the \ttt{-fp-model} flag.

Remember you can change compilation flags by editing the preference file
(see section \ref{sec:preferences} for more information on preferences).
Of course, you can also edit the compilation command printed by \xmds
and run it by hand.

Overall, however, there are no guarantees that \ttt{halt\_non\_finite}
will work when sacrificing accuracy for speed in floating-point arithmetic.

Defaults to \texttt{no}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <halt_non_finite> yes </halt_non_finite>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}

%%% lattice (integrate)
\subsubsection{lattice (integrate)}
\label{lab:lattice(integrate)}
\index{lattice (integrate)@\xmdsTag{lattice} (integrate)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{lattice(integrate)}{lattice}
\xmdsOption{int} \xmdsTag{/lattice}

\item[Contains:] integer

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{lattice}

\item[Description:] The number of points to use over the integration
  interval i.e.~over the number entered in the \xmdsTag{interval}
  assignment.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <lattice> 1000 </lattice>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% samples (integrate)
\subsubsection{samples (integrate)}
\label{lab:samples(integrate)}
\index{samples (integrate)@\xmdsTag{samples} (integrate)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{samples(integrate)}{samples}
\xmdsOption{int} \xmdsOption{int} \ldots
\xmdsTag{/samples}

\item[Contains:] array of integers

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{samples}

\item[Description:] The number of samples to take of each output
  moment group.  This is a space separated list of integers, the
  number of which must be equal to the number of output moment
  groups.  Each integer must be a factor of the \xmdsTag{lattice}
  assignment or \ttt{0}.  If set to \ttt{0} then the given moment
  group is not sampled.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <samples> 50 </samples>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% k_operators
\subsubsection{k\_operators}
\label{lab:k_operators}
\index{k_operators@\xmdsTag{k\_operators}}
\begin{xmdsDoc}
\item \optl
\xmdsTagTarg{k_operators}{k\_operators}
\xmdsOption{xmds tags} \xmdsTag{/k\_operators}

\item[Contains:]
  \xmdsTagLink{vectors(k_operators)}{vectors},
  \xmdsTagLink{constant}{constant},
  \xmdsTagLink{operator_names}{operator\_names}, 
  \CDATA

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{k\_operators}

\item[Description:] Container for tags describing the $k$-space
  (i.e.~Fourier space) operators.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <k_operators>
                <!-- xmds tags -->
            </k_operators>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% vectors (k_operators)
\paragraph{vectors (k\_operators)}
\label{lab:vectors(k_operators)}
\index{vectors (k_operators)@\xmdsTag{vectors} (k\_operators)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{vectors(k_operators)}{vectors}
\xmdsOption{string} \textsf{variableName} 
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/vectors}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{k_operators}{k\_operators}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow
\xmdsTag{k\_operators} \textarrow \xmdsTag{vectors}

\item[Description:] Vectors to be referred to in \CDATA block.
  Defaults to \texttt{main}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <k_operators>
                <vectors> main vc1 </vectors>
            </k_operators>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% constant
\paragraph{constant}
\label{lab:constant}
\index{constant@\xmdsTag{constant}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{constant}{constant}
\xmdsOption{bool} \xmdsTag{/constant}

\item[Contains:] boolean

\item[Subelement of:] \xmdsTagLink{k_operators}{k\_operators}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{k\_operators} \textarrow \xmdsTag{constant}

\item[Description:] Tells \xmds whether or not the $k$-space operators
  are constant over the course of the simulation, in other words, they
  don't depend upon the propagation dimension.  If they are constant,
  then giving a value of \ttt{yes} for this tag speeds up the
  simulation as more efficient code can be used.  Defaults to \texttt{no}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <k_operators>
                <constant> yes </constant>
            </k_operators>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% operator_names
\paragraph{operator\_names}
\label{lab:operator_names}
\index{operator_names@\xmdsTag{operator\_names}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{operator_names}{operator\_names}
\xmdsOption{string} \textsf{variableName}
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/operator\_names}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{k_operators}{k\_operators}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{k\_operators} \textarrow \xmdsTag{operator\_names}

\item[Description:] The names of the $k$-space operators as they
  appear in the \CDATA block within the \xmdsTag{k\_operators}
  element.  This is a space separated list of strings of the operator
  names.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <k_operators>
                <operator_names> L </operator_names>
            </k_operators>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% moment_group (integrate)
\subsubsection{moment\_group (integrate)}
\label{lab: moment_group(integrate)}
\index{moment_group (integrate)@\xmdsTag{moment\_group} (integrate)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{moment_group(integrate)}{moment\_group}
\xmdsOption{xmds tags} \xmdsTag{/moment\_group}

\item[Contains:] \xmdsTagLink{moments}{moments},
  \xmdsTagLink{integrate_dimension}{integrate\_dimension}, 
  \CDATA

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{moment\_group}

\item[Description:] Defines and calculates a number or vector integrated through zero or more of the transverse dimensions of the problem. 

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
  <sequence>
      <integrate>
         <moment_group>
            <moments>joe is great</moments>
            <integrate_dimension>no yes</integrate_dimension>
	  <![CDATA[
		joe += ~psi*psi;
		is += ~phi*phi;
		great += theta;   
		]]>
        </moment_group>      
      </integrate>
   </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% functions (integrate)
\subsubsection{functions (integrate)}
\label{lab: functions(integrate)}
\index{functions (integrate)@\xmdsTag{functions} (integrate)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{functions(integrate)}{functions}
\CDATA \xmdsTag{/functions}

\item[Contains:] \CDATA

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{functions}

\item[Description:] This is the best place to define any functions that do not depend on the transverse dimensions. 

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <functions> 
	     <![CDATA[
		/* Some C code */
               ]]>  
            </functions >
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% vectors (integrate)
\subsubsection{vectors (integrate)}
\label{lab:vectors(integrate)}
\index{vectors (integrate)@\xmdsTag{vectors} (integrate)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{vectors(integrate)}{vectors}
\xmdsOption{string} \textsf{variableName} 
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/vectors}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{vectors}

\item[Description:] The vectors \xmds needs to access in the
  equations.  Given as a space separated list of strings.  Defaults to
  \texttt{main}. 

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <vectors> main vc1 </vectors>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% filter
\subsection{filter}
\label{lab:filter}
\index{filter@\xmdsTag{filter}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{filter}{filter}
\xmdsOption{xmds tags} \xmdsTag{/filter}

\item[Contains:] \xmdsTagLink{vectors(filter)}{vectors}, 
\xmdsTagLink{fourier_space(filter)}{fourier\_space},
\CDATA

\item[Subelement of:] \xmdsTagLink{sequence}{sequence}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{filter}

\item[Description:] Container element for the tags describing how the
  field is to be filtered, if at all.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <filter>
            <!-- xmds tags -->
        </filter>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% moment_group (filter)
\subsubsection{moment\_group (filter)}
\label{lab: moment_group(filter)}
\index{moment_group (filter)@\xmdsTag{moment\_group} (filter)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{moment_group(filter)}{moment\_group}
\xmdsOption{xmds tags} \xmdsTag{/moment\_group}

\item[Contains:] \xmdsTagLink{moments}{moments},
  \xmdsTagLink{integrate_dimension}{integrate\_dimension}, 
  \CDATA

\item[Subelement of:] \xmdsTagLink{filter}{filter}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{filter} \textarrow 
\xmdsTag{moment\_group}

\item[Description:] Defines and calculates a number or vector integrated through zero or more of the transverse dimensions of the problem. 

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
  <sequence>
      <filter>
         <moment_group>
            <moments>joe is great</moments>
            <integrate_dimension>no yes</integrate_dimension>
	  <![CDATA[
		joe += ~psi*psi;
		is += ~phi*phi;
		great += theta;   
		]]>
        </moment_group>      
      </filter>
   </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% functions (filter)
\subsubsection{functions (filter)}
\label{lab: functions(filter)}
\index{functions (filter)@\xmdsTag{functions} (filter)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{functions(filter)}{functions}
\CDATA \xmdsTag{/functions}

\item[Contains:] \CDATA

\item[Subelement of:] \xmdsTagLink{filter}{filter}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{filter} \textarrow 
\xmdsTag{functions}

\item[Description:] This is the best place to define any functions that do not depend on the transverse dimensions. 

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <filter>
            <functions> 
	     <![CDATA[
		/* Some C code */
               ]]>  
            </functions >
        </filter>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% vectors (filter)
\subsubsection{vectors (filter)}
\label{lab:vectors(filter)}
\index{vectors (filter)@\xmdsTag{vectors} (filter)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{vectors(filter)}{vectors}
\xmdsOption{string} \textsf{variableName} 
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/vectors}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{filter}{filter}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{filter} \textarrow 
\xmdsTag{vectors}

\item[Description:] The names of the vectors \xmds should apply the
  filter to.  Given as a space separated list of strings.  Defaults to
  \texttt{main}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
        <filter>
            <vectors> main vc1 </vectors>
        </filter>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% fourier_space (filter)
\subsubsection{fourier\_space (filter)}
\label{lab:fourier_space(filter)}
\index{fourier_space (filter)@\xmdsTag{fourier\_space} (filter)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{fourier_space(filter)}{fourier\_space}
\xmdsOption{boolean} \xmdsOption{boolean} \ldots
\xmdsTag{/fourier\_space}

\item[Contains:] array of booleans

\item[Subelement of:] \xmdsTagLink{filter}{filter}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{integrate} \textarrow \xmdsTag{filter} \textarrow 
\xmdsTag{fourier\_space}

\item[Description:] Tells \xmds in which space the filter is to be
  applied.  This is a list of \ttt{yes}/\ttt{no} options for each
  vector.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <integrate>
        <filter>
            <fourier_space> yes no </fourier_space>
        </filter>
    </integrate>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% cross_propagation
\subsubsection{cross\_propagation}
\label{lab:cross_propagation}
\index{cross_propagation@\xmdsTag{cross\_propagation}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{cross_propagation}{cross\_propagation}
\xmdsOption{xmds tags} \xmdsTag{/cross\_propagation}

\item[Contains:] \xmdsTagLink{vectors(cross_propagation)}{vectors}, 
\xmdsTagLink{prop_dim(cross_propagation)}{prop\_dim},
\CDATA

\item[Subelement of:] \xmdsTagLink{integrate}{integrate}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{integrate} \textarrow \xmdsTag{cross\_propagation}

\item[Description:] Container of the tags describing the cross
  propagation vectors, if any.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <integrate>
        <cross_propagation>
            <!-- xmds tags -->
        </cross_propagation>
    </integrate>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% prop_dim
\paragraph{prop\_dim (cross\_propagation)}
\label{lab:prop_dim(cross_propagation)}
\index{prop_dim (cross_propagation)@\xmdsTag{prop\_dim} (cross\_propagation)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{prop_dim(cross_propagation)}{prop\_dim}
\xmdsOption{string} \xmdsTag{/prop\_dim}

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{cross_propagation}{cross\_propagation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{integrate} \textarrow \xmdsTag{cross\_propagation} 
\textarrow \xmdsTag{prop\_dim}

\item[Description:] The propagation dimension of the cross propagating
  vector.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <integrate>
        <cross_propagation>
            <prop_dim> z </prop_dim>
        </cross_propagation>
    </integrate>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% vectors (cross_propagation)
\paragraph{vectors (cross\_propagation)}
\label{lab:vectors(cross_propagation)}
\index{vectors (cross_propagation)@\xmdsTag{vectors} (cross\_propagation)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{vectors(cross_propagation)}{vectors}
\xmdsOption{string} \textsf{variableName} 
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/vectors}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{cross_propagation}{cross\_propagation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{integrate} \textarrow 
\xmdsTag{cross\_propagation} \textarrow \xmdsTag{vectors}

\item[Description:] The names of the cross propagating vectors as a
  list of strings.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <integrate>
            <cross_propagation>
                <vectors> main vc1 </vectors>
            </cross_propagation>
        </integrate>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% breakpoint
\subsection{breakpoint}
\label{breakpoint}
\index{breakpoint@\xmdsTag{breakpoint}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{breakpoint}{breakpoint}
\xmdsOption{xmds tags} \xmdsTag{/breakpoint}

\item[Contains:] \xmdsTagLink{filename(breakpoint)}{filename}, \xmdsTagLink{fourier_space(breakpoint)}{fourier\_space}, \xmdsTagLink{vectors(breakpoint)}{vectors}

\item[Subelement of:] \xmdsTagLink{sequence}{sequence}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{breakpoint}

\item[Description:] Saves some vectors to a binary XSIL file when this element is reached in the simulation. This can be used for generating an XSIL file that can be used as an input for another simulation, or to check the behaviour of the simulation part way through. This feature is described further in \Chap{chap:extraAndAdvancedFeatures}, \Sec{sec:Breakpoints}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <breakpoint>
            <!-- xmds tags -->
        </breakpoint>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% filename (breakpoint)
\subsubsection{filename (breakpoint)}
\label{lab:filename(breakpoint)}
\index{filename (breakpoint)@\xmdsTag{filename} (breakpoint)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{filename(breakpoint)}{filename}
\xmdsOption{string} \xmdsTag{/filename}

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{breakpoint}{breakpoint}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{breakpoint} \textarrow 
\xmdsTag{filename}

\item[Description:] Sets the XSIL file to which the breakpoint information should be saved.


\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <breakpoint>
            <filename> blah.xsil </filename>
        </breakpoint>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% fourier_space (breakpoint)
\subsubsection{fourier\_space (breakpoint)}
\label{lab:fourier_space(breakpoint)}
\index{fourier_space (breakpoint)@\xmdsTag{fourier\_space} (breakpoint)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{fourier_space(breakpoint)}{fourier\_space}
\xmdsOption{boolean} \xmdsOption{boolean} \ldots
\xmdsTag{/fourier\_space}

\item[Contains:] array of booleans

\item[Subelement of:] \xmdsTagLink{breakpoint}{breakpoint}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{breakpoint} \textarrow 
\xmdsTag{fourier\_space}

\item[Description:] Tells \xmds in which space the breakpoint is to be
  written in.  This is a list of \ttt{yes}/\ttt{no} options for each
  vector.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <breakpoint>
            <fourier_space> yes no </fourier_space>
        </breakpoint>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% vectors (breakpoint)
\subsubsection{vectors (breakpoint)}
\label{lab:vectors(breakpoint)}
\index{vectors (breakpoint)@\xmdsTag{vectors} (breakpoint)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{vectors(breakpoint)}{vectors}
\xmdsOption{string} \textsf{vectorName} 
\xmdsOption{string} \textsf{vectorName} \ldots
\xmdsTag{/vectors}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{breakpoint}{breakpoint}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{sequence} \textarrow \xmdsTag{breakpoint} \textarrow \xmdsTag{vectors}

\item[Description:] The names of the vectors that will be saved to the XSIL file.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <sequence>
        <breakpoint>
            <vectors> main vc1 </vectors>
        </breakpoint>
    </sequence>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% output
\section{output}
\label{lab:output}
\index{output@\xmdsTag{output}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{output}{output}
\xmdsOption{xmds tags} \xmdsTag{/output}

\item[Contains:] \xmdsTagLink{filename(output)}{filename}, 
\xmdsTagLink{group}{group}

\item[Attributes:] \optl \ttt{format="ascii|binary"}, 
  \optl \ttt{precision="double|single"}

\item[Subelement of:] \xmdsTagLink{simulation}{simulation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output}

\item[Description:]  Container for elements describing what data
  should be output and how it should be output.  

  Accepts two optional attributes, \ttt{format} and \ttt{precision}.
  The \ttt{format} attribute defines the output format of the data.
  The options available are \ttt{"ascii"} and \ttt{"binary"}, with
  \ttt{"ascii"} being the default option.  The \ttt{precision}
  attribute defines the output data precision.  This can be either
  \ttt{"double"} or \ttt{"single"}, with these options referring to
  double or single precision floating point numbers respectively.  This
  option is only meaningful when \ttt{format} is set to \ttt{"binary"}
  as the precision does not affect the output when \ttt{"ascii"} is
  chosen.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output format="binary" precision="single">
        <!-- xmds tags -->
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% filename (output)
\subsection{filename (output)}
\label{lab:filename(output)}
\index{filename (output)@\xmdsTag{filename} (output)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{filename(output)}{filename}
\xmdsOption{string} \xmdsTag{/filename}

\item[Contains:] string

\item[Subelement of:] \xmdsTagLink{output}{output}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{filename}

\item[Description:] Optional filename for output data.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <filename> nlse.xsil </filename>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% group
\subsection{group}
\label{lab:group}
\index{group@\xmdsTag{group}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{group}{group}
\xmdsOption{xmds tags} \xmdsTag{/group}

\item[Contains:] \xmdsTagLink{sampling}{sampling}, 
\xmdsTagLink{post_propagation}{post\_propagation}

\item[Subelement of:] \xmdsTagLink{output}{output}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group}

\item[Description:]  Container for tags describing the relevant moment
  group.  There must be at least one group element given.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <!-- xmds tags -->
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% sampling
\subsubsection{sampling}
\label{lab:sampling}
\index{sampling@\xmdsTag{sampling}}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{sampling}{sampling}
\xmdsOption{xmds tags} \xmdsTag{/sampling}

\item[Contains:] \xmdsTagLink{vectors(sampling)}{vectors}, 
  \xmdsTagLink{fourier_space(sampling)}{fourier\_space},
  \xmdsTagLink{lattice(sampling)}{lattice},
  \xmdsTagLink{moments(sampling)}{moments},
  \CDATA

\item[Subelement of:] \xmdsTagLink{group}{group}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow 
\xmdsTag{sampling}

\item[Description:] Container for tags describing how to sample the
  moment group.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <sampling>
                <!-- xmds tags -->
            </sampling>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% type (sampling)
\paragraph{type (sampling)}
\label{lab:type(sampling)}
\index{type (sampling)@\xmdsTag{type} (sampling)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{type(sampling)}{type}
\xmdsOption{string} of \textsf{complex} or \textsf{double} \xmdsTag{/type}

\item[Contains:] string interpreted as either \tbf{complex} or \tbf{double} type

\item[Subelement of:] \xmdsTagLink{sampling}{sampling}

\item[Path to tag:] \xmdsTag{simulation} \textarrow
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow
\xmdsTag{sampling} \textarrow \xmdsTag{type}

\item[Description:] The data type of the output data. Defaults to \tbf{complex}
if the vector that the output data depends on is of type \tbf{complex}, and \tbf{double}
otherwise. Note that a type of \tbf{double} cannot be used with a \xmdsTagLink{post\_propagation}{post\_propagation} tag
as the fourier transforms available to the \xmdsTagLink{post\_propagation}{post\_propagation} tag require the output data
to be of type \tbf{complex}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <sampling>
                <type> complex </type>
            </sampling>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% fourier_space (sampling)
\paragraph{fourier\_space (sampling)}
\label{lab:fourier_space(sampling)}
\index{fourier_space (sampling)@\xmdsTag{fourier\_space} (sampling)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{fourier_space(sampling)}{fourier\_space}
\xmdsOption{bool} \xmdsOption{bool} \ldots
\xmdsTag{/fourier\_space}

\item[Contains:] array of booleans

\item[Subelement of:] \xmdsTagLink{sampling}{sampling}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow 
\xmdsTag{sampling} \textarrow \xmdsTag{fourier\_space}

\item[Description:] A boolean telling \xmds whether or not to sample
  in Fourier space.  This should be a space separated list of
  booleans, one for each transverse dimension.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <sampling>
                <fourier_space> no </fourier_space>
            </sampling>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% vectors (sampling)
\paragraph{vectors (sampling)}
\label{lab:vectors(sampling)}
\index{vectors (sampling)@\xmdsTag{vectors} (sampling)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{vectors(sampling)}{vectors}
\xmdsOption{string} \textsf{variableName} 
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/vectors}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{sampling}{sampling}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow 
\xmdsTag{sampling} \textarrow \xmdsTag{vectors}

\item[Description:] Space separated list of strings giving the names
  of the vectors to sample.  Defaults to \texttt{main}.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <sampling>
                <vectors> main vc1 </vectors>
            </sampling>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% lattice (sampling)
\paragraph{lattice (sampling)}
\label{lab:lattice(sampling)}
\index{lattice (sampling)@\xmdsTag{lattice} (sampling)}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{lattice(sampling)}{lattice}
\xmdsOption{int} \xmdsOption{int} \ldots
\xmdsTag{/lattice}

\item[Contains:] array of integers

\item[Subelement of:] \xmdsTagLink{sampling}{sampling}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow 
\xmdsTag{sampling} \textarrow \xmdsTag{lattice}

\item[Description:] A space separated list of integers, each
  describing how many points to sample of each transverse dimension
  (if greater than 1: see below).  One entry must exist for each
  transverse dimension.

  If an entry is set to \ttt{0}, then \xmds integrates the moments
  over this dimension.  this will cause the output field to no longer
  be a function of this transverse dimension.

  If an entry is set to \ttt{1}, then \xmds will sample the moments on
  a cross-sectional slice of this dimension, also causing the output
  field to lose this transverse dimension.  If this dimension is in
  normal space then \xmds will extract the slice at the middle lattice
  point (point number $N/2+1$ using integer division), otherwise \xmds
  will extract the slice at the zero momentum point, $k=0$.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <sampling>
                <lattice> 50 </lattice>
            </sampling>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% moments (sampling)
\paragraph{moments (sampling)}
\label{lab:moments(sampling)}
\index{moments (sampling)@\xmdsTag{moments} (sampling)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{moments(sampling)}{moments}
\xmdsOption{string} \textsf{variableName} 
\xmdsOption{string} \textsf{variableName} \ldots
\xmdsTag{/moments}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{sampling}{sampling}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow 
\xmdsTag{sampling} \textarrow \xmdsTag{moments}

\item[Description:] A list of strings of the names of the moments to
  sample.  These variables will then be mentioned in the \CDATA block
  following this tag.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <sampling>
                <moments> pow_dens </moments>
            </sampling>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% post_propagation
\subsubsection{post\_propagation}
\label{lab:post_propagation}
\index{post_propagation@\xmdsTag{post\_propagation}}
\begin{xmdsDoc}
\item \optl \xmdsTagTarg{post_propagation}{post\_propagation}
\xmdsOption{xmds tags} \xmdsTag{/post\_propagation}

\item[Contains:]
  \xmdsTagLink{fourier_space(post_propagation)}{fourier\_space},
  \xmdsTagLink{moments(post_propagation)}{moments},
  \CDATA

\item[Subelement of:] \xmdsTagLink{group}{group}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow 
\xmdsTag{post\_propagation}

\item[Description:] Container for tags describing any post propagation
  processing of the data that should be done prior to output to file.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <post_propagation>
                <!-- xmds tags -->
            </post_propagation>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% fourier_space (post_propagation)
\paragraph{fourier\_space (post\_propagation)}
\label{lab:fourier_space(post_propagation)}
\index{fourier_space (post_propagation)@\xmdsTag{fourier\_space} (post\_propagation)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{fourier_space(post_propagation)}{fourier\_space}
\xmdsOption{bool} \xmdsOption{bool} \ldots
\xmdsTag{/fourier\_space}

\item[Contains:] array of booleans

\item[Subelement of:] \xmdsTagLink{post_propagation}{post\_propagation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow 
\xmdsTag{post\_propagation} \textarrow \xmdsTag{fourier\_space}

\item[Description:] Whether or not the post propagation is performed
  in Fourier space.  This is a list of \ttt{yes}/\ttt{no} entries for
  the propagation dimension and as many \emph{remaining} transverse
  dimensions. 

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <post_propagation>
                <fourier_space> no </fourier_space>
            </post_propagation>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%

%%% moments (post_propagation)
\paragraph{moments (post\_propagation)}
\label{lab:moments(post_propagation)}
\index{moments (post_propagation)@\xmdsTag{moments} (post\_propagation)}
\begin{xmdsDoc}
\item \reqd \xmdsTagTarg{moments(post_propagation)}{moments}
\xmdsOption{string} \textsf{variableName} \xmdsOption{string}
\tsf{variableName} \ldots \xmdsTag{/moments}

\item[Contains:] array of strings

\item[Subelement of:] \xmdsTagLink{post_propagation}{post\_propagation}

\item[Path to tag:] \xmdsTag{simulation} \textarrow 
\xmdsTag{output} \textarrow \xmdsTag{group} \textarrow 
\xmdsTag{post\_propagation} \textarrow \xmdsTag{moments}

\item[Description:] The names of the moments (with different names to
  the moments defined directly within the group element) to be derived
  from the post processing.

\item[Example:] \forcenewline
\begin{xmdsCode}
<simulation>
    <output>
        <group>
            <post_propagation>
                <moments> pow_dens </moments>
            </post_propagation>
        </group>
    </output>
</simulation>
\end{xmdsCode}
\end{xmdsDoc}
%%%