-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaglua.html
4251 lines (4206 loc) · 203 KB
/
maglua.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style media="screen" type="text/css">
body {
color: #000000 ;
background-color: #FFFFFF ;
font-family: sans-serif ;
text-align: justify ;
margin-right: 20px ;
margin-left: 20px ;
}
h1, h2, h3, h4 {
font-weight: normal ;
font-style: italic ;
}
h1 {
padding-top: 0.4em ;
padding-bottom: 0.4em ;
padding-left: 20px ;
margin-left: -20px ;
background-color: #AAAAAA;
}
h2 {
padding-top: 0.1em ;
padding-bottom: 0.1em ;
padding-left: 20px ;
margin-left: -20px ;
background-color: #AAAAAA;
}
h3 {
padding-left: 8px ;
border-left: solid #AAAAAA 1em ;
}
table h3 {
padding-left: 0px ;
border-left: none ;
}
a:link {
color: #000080 ;
background-color: inherit ;
text-decoration: none ;
}
a:visited {
background-color: inherit ;
text-decoration: none ;
}
a:link:hover, a:visited:hover {
color: #000080 ;
background-color: #E0E0FF ;
}
a:link:active, a:visited:active {
color: #FF0000 ;
}
hr {
border: 0 ;
height: 1px ;
color: #a0a0a0 ;
background-color: #a0a0a0 ;
}
:target {
background-color: #AAAAAA ;
border: solid #a0a0a0 2px ;
}
</style>
<title>MagLua Reference Manual</title>
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
</head>
<body>
<H1>MagLua</H1><br> <p>MagLua is an extension to the base Lua language that allows a user to build micromagnetic simulations with the Lua scripting language. <p>MagLua is composed of 2 conceptual parts following the Data Oriented Design paradigm<br> <ul><li>Data - Spin vectors and fields, these are held in a <a href="#SpinSystem">SpinSystem</a>.<li>Transformations - Objects which modify data. Some calculate fields based on spins or external influences such as <a href="#Anisotropy">Anisotropy</a>, <a href="#Dipole">Dipole</a> and <a href="#Thermal">Thermal</a>, others update the spin vectors such as <a href="#LLG.Cartesian">LLG.Cartesian</a>. </ul> <p>The <a href="#Index">Index</a> has links to all objects, methods and functions provided by MagLua.</p><p>The following is a list of the objects and functions which may be combined to create a simulation.<p>
<h2><a name="Anisotropy">Anisotropy</a></h2>
<p>
Computes the single ion anisotropy fields for a <a href="#SpinSystem">SpinSystem</a>
<p><dl><dt>Anisotropy.new() takes the following arguments</dt><dd>1 <a href="#3Vector">3Vector</a> or <a href="#SpinSystem">SpinSystem</a>: System Size</dd></dl>
<hr>
<p>
<h3><a name="Anisotropy:add"><code>Anisotropy:add</code></a></h3>
<dl>
<dt>Description</dt><dd>Add a lattice site to the anisotropy calculation</dd>
<dt>Input</dt><dd>2 <a href="#3Vector">3Vector</a>s, 1 number: The first <a href="#3Vector">3Vector</a> defines a lattice site, the second defines an easy axis and is normalized. The number defines the strength of the Anisotropy.</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:apply"><code>Anisotropy:apply</code></a></h3>
<dl>
<dt>Description</dt><dd>Apply the operator to the SpinSystem</dd>
<dt>Input</dt><dd>1 SpinSystem: System that will receive the resulting fields</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:axis"><code>Anisotropy:axis</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the site, easy axis and strength at the given index.</dd>
<dt>Input</dt><dd>1 Integer: Index of the axis.</dd>
<dt>Output</dt><dd>1 Table of 3 Integers, 1 Table of 3 Numbers, 1 Number: Coordinates of the site, direction of the easy axis and strength of the easy axis.</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:get"><code>Anisotropy:get</code></a></h3>
<dl>
<dt>Description</dt><dd>Fetch the anisotropy direction and magnitude at a given site.</dd>
<dt>Input</dt><dd>1 <a href="#3Vector">3Vector</a>: The <a href="#3Vector">3Vector</a> defines a lattice site.</dd>
<dt>Output</dt><dd>4 Numbers: The first 3 numbers define the normal axis, the 4th number is the magnitude.</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:member"><code>Anisotropy:member</code></a></h3>
<dl>
<dt>Description</dt><dd>Test if the given site index is part of the operator</dd>
<dt>Input</dt><dd>1 <a href="#3Vector">3Vector</a> (Integers): Index of site to test</dd>
<dt>Output</dt><dd>1 Boolean: Result of test</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:mergeAxes"><code>Anisotropy:mergeAxes</code></a></h3>
<dl>
<dt>Description</dt><dd>Combine common site-axes into a single axis with a combined strength</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:numberOfAxes"><code>Anisotropy:numberOfAxes</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the number of easy axes in the operator</dd>
<dt>Output</dt><dd>1 Integer: Number of easy axes.</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:nx"><code>Anisotropy:nx</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the x direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:ny"><code>Anisotropy:ny</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the y direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:nz"><code>Anisotropy:nz</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the z direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:scale"><code>Anisotropy:scale</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the scale applied to field calculatons (default value is 1.0)</dd>
<dt>Output</dt><dd>1 Number: The scale</dd>
</dl><hr>
<p>
<h3><a name="Anisotropy:setScale"><code>Anisotropy:setScale</code></a></h3>
<dl>
<dt>Description</dt><dd>Set a scale to field calculatons (default value is 1.0)</dd>
<dt>Input</dt><dd>1 Number: The value of the new scale</dd>
</dl><hr>
<p>
<h2><a name="AppliedField">AppliedField</a></h2>
<p>
Applies an external, global field to a <a href="#SpinSystem">SpinSystem</a>
<p><dl><dt>AppliedField.new() takes the following arguments</dt><dd>1 <a href="#3Vector">3Vector</a> or <a href="#SpinSystem">SpinSystem</a>: System Size</dd></dl>
<hr>
<p>
<h3><a name="AppliedField:add"><code>AppliedField:add</code></a></h3>
<dl>
<dt>Description</dt><dd>Add the direction and strength of the Applied Field</dd>
<dt>Input</dt><dd>1 <a href="#3Vector">3Vector</a>: The <a href="#3Vector">3Vector</a> defines the strength and direction of the applied field addition</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:get"><code>AppliedField:get</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the direction and strength of the Applied Field</dd>
<dt>Output</dt><dd>3 numbers: The x, y and z components of the field</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:member"><code>AppliedField:member</code></a></h3>
<dl>
<dt>Description</dt><dd>Test if the given site index is part of the operator</dd>
<dt>Input</dt><dd>1 <a href="#3Vector">3Vector</a> (Integers): Index of site to test</dd>
<dt>Output</dt><dd>1 Boolean: Result of test</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:nx"><code>AppliedField:nx</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the x direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:ny"><code>AppliedField:ny</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the y direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:nz"><code>AppliedField:nz</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the z direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:scale"><code>AppliedField:scale</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the scale applied to field calculatons (default value is 1.0)</dd>
<dt>Output</dt><dd>1 Number: The scale</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:set"><code>AppliedField:set</code></a></h3>
<dl>
<dt>Description</dt><dd>Set the direction and strength of the Applied Field</dd>
<dt>Input</dt><dd>1 <a href="#3Vector">3Vector</a>: The <a href="#3Vector">3Vector</a> defines the strength and direction of the applied field</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:setScale"><code>AppliedField:setScale</code></a></h3>
<dl>
<dt>Description</dt><dd>Set a scale to field calculatons (default value is 1.0)</dd>
<dt>Input</dt><dd>1 Number: The value of the new scale</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:setX"><code>AppliedField:setX</code></a></h3>
<dl>
<dt>Description</dt><dd>set the X component of the applied field.</dd>
<dt>Input</dt><dd>1 Number: X component of the applied field</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:setY"><code>AppliedField:setY</code></a></h3>
<dl>
<dt>Description</dt><dd>set the Y component of the applied field.</dd>
<dt>Input</dt><dd>1 Number: Y component of the applied field</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:setZ"><code>AppliedField:setZ</code></a></h3>
<dl>
<dt>Description</dt><dd>set the Z component of the applied field.</dd>
<dt>Input</dt><dd>1 Number: Z component of the applied field</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:x"><code>AppliedField:x</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the X component of the applied field.</dd>
<dt>Output</dt><dd>1 Number: X component of the applied field</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:y"><code>AppliedField:y</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the Y component of the applied field.</dd>
<dt>Output</dt><dd>1 Number: Y component of the applied field</dd>
</dl><hr>
<p>
<h3><a name="AppliedField:z"><code>AppliedField:z</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the Z component of the applied field.</dd>
<dt>Output</dt><dd>1 Number: Z component of the applied field</dd>
</dl><hr>
<p>
<h2><a name="Array.Double">Array.Double</a></h2>
<p>
Class for 3D Data Arrays
<p><dl><dt>Array.Double.new() takes the following arguments</dt><dd>0 to 3 Integers: Length of each dimension X, Y and Z. Default values are 1.</dd></dl>
<hr>
<p>
<h3><a name="Array.Double:addAt"><code>Array.Double:addAt</code></a></h3>
<dl>
<dt>Description</dt><dd>Add a value to an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value: indices(XYZ) of the element to modify, default values are 1. Last argument is the value to add</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:dot"><code>Array.Double:dot</code></a></h3>
<dl>
<dt>Description</dt><dd>Compute the dot product of the current array and another of equal size and type</dd>
<dt>Input</dt><dd>1 Arrays: other array</dd>
<dt>Output</dt><dd>1 Value: result of dot product</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:get"><code>Array.Double:get</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an element from the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table): indices(XYZ) of the element to fetch default values are 1</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:max"><code>Array.Double:max</code></a></h3>
<dl>
<dt>Description</dt><dd>Find maximum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:mean"><code>Array.Double:mean</code></a></h3>
<dl>
<dt>Description</dt><dd>Find mean of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:min"><code>Array.Double:min</code></a></h3>
<dl>
<dt>Description</dt><dd>Find minimum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:nx"><code>Array.Double:nx</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the X dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the X dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:ny"><code>Array.Double:ny</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Y dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Y dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:nz"><code>Array.Double:nz</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Z dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Z dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:pairwiseMultiply"><code>Array.Double:pairwiseMultiply</code></a></h3>
<dl>
<dt>Description</dt><dd>Multiply each data in this array with the data in another storing in a destination array</dd>
<dt>Input</dt><dd>2 Arrays: The pairwise scaling array and the destination array</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:sameSize"><code>Array.Double:sameSize</code></a></h3>
<dl>
<dt>Description</dt><dd>Test if a given array has the same dimensions</dd>
<dt>Input</dt><dd>1 Array</dd>
<dt>Output</dt><dd>1 Boolean: True if sizes match</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:scale"><code>Array.Double:scale</code></a></h3>
<dl>
<dt>Description</dt><dd>Scale all values in the array by the given value</dd>
<dt>Input</dt><dd>1 Value: The scaling factor</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:set"><code>Array.Double:set</code></a></h3>
<dl>
<dt>Description</dt><dd>Set an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value or 1 Array: indices(XYZ) of the element to set, default values are 1. Last argument is the new value. If the last argument is an array then all elements in the array are copied to the calling object.</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:setAll"><code>Array.Double:setAll</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array to the given value</dd>
<dt>Input</dt><dd>1 Value: The new value for all element entries</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:sum"><code>Array.Double:sum</code></a></h3>
<dl>
<dt>Description</dt><dd>Find sum of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Double:zero"><code>Array.Double:zero</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array 0</dd>
</dl><hr>
<p>
<h2><a name="Array.DoubleComplex">Array.DoubleComplex</a></h2>
<p>
Class for 3D Data Arrays
<p><dl><dt>Array.DoubleComplex.new() takes the following arguments</dt><dd>0 to 3 Integers: Length of each dimension X, Y and Z. Default values are 1.</dd></dl>
<hr>
<p>
<h3><a name="Array.DoubleComplex:addAt"><code>Array.DoubleComplex:addAt</code></a></h3>
<dl>
<dt>Description</dt><dd>Add a value to an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value: indices(XYZ) of the element to modify, default values are 1. Last argument is the value to add</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:dot"><code>Array.DoubleComplex:dot</code></a></h3>
<dl>
<dt>Description</dt><dd>Compute the dot product of the current array and another of equal size and type</dd>
<dt>Input</dt><dd>1 Arrays: other array</dd>
<dt>Output</dt><dd>1 Value: result of dot product</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:get"><code>Array.DoubleComplex:get</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an element from the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table): indices(XYZ) of the element to fetch default values are 1</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:max"><code>Array.DoubleComplex:max</code></a></h3>
<dl>
<dt>Description</dt><dd>Find maximum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:mean"><code>Array.DoubleComplex:mean</code></a></h3>
<dl>
<dt>Description</dt><dd>Find mean of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:min"><code>Array.DoubleComplex:min</code></a></h3>
<dl>
<dt>Description</dt><dd>Find minimum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:nx"><code>Array.DoubleComplex:nx</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the X dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the X dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:ny"><code>Array.DoubleComplex:ny</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Y dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Y dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:nz"><code>Array.DoubleComplex:nz</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Z dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Z dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:pairwiseMultiply"><code>Array.DoubleComplex:pairwiseMultiply</code></a></h3>
<dl>
<dt>Description</dt><dd>Multiply each data in this array with the data in another storing in a destination array</dd>
<dt>Input</dt><dd>2 Arrays: The pairwise scaling array and the destination array</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:sameSize"><code>Array.DoubleComplex:sameSize</code></a></h3>
<dl>
<dt>Description</dt><dd>Test if a given array has the same dimensions</dd>
<dt>Input</dt><dd>1 Array</dd>
<dt>Output</dt><dd>1 Boolean: True if sizes match</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:scale"><code>Array.DoubleComplex:scale</code></a></h3>
<dl>
<dt>Description</dt><dd>Scale all values in the array by the given value</dd>
<dt>Input</dt><dd>1 Value: The scaling factor</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:set"><code>Array.DoubleComplex:set</code></a></h3>
<dl>
<dt>Description</dt><dd>Set an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value or 1 Array: indices(XYZ) of the element to set, default values are 1. Last argument is the new value. If the last argument is an array then all elements in the array are copied to the calling object.</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:setAll"><code>Array.DoubleComplex:setAll</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array to the given value</dd>
<dt>Input</dt><dd>1 Value: The new value for all element entries</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:sum"><code>Array.DoubleComplex:sum</code></a></h3>
<dl>
<dt>Description</dt><dd>Find sum of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.DoubleComplex:zero"><code>Array.DoubleComplex:zero</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array 0</dd>
</dl><hr>
<p>
<h2><a name="Array.Float">Array.Float</a></h2>
<p>
Class for 3D Data Arrays
<p><dl><dt>Array.Float.new() takes the following arguments</dt><dd>0 to 3 Integers: Length of each dimension X, Y and Z. Default values are 1.</dd></dl>
<hr>
<p>
<h3><a name="Array.Float:addAt"><code>Array.Float:addAt</code></a></h3>
<dl>
<dt>Description</dt><dd>Add a value to an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value: indices(XYZ) of the element to modify, default values are 1. Last argument is the value to add</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:dot"><code>Array.Float:dot</code></a></h3>
<dl>
<dt>Description</dt><dd>Compute the dot product of the current array and another of equal size and type</dd>
<dt>Input</dt><dd>1 Arrays: other array</dd>
<dt>Output</dt><dd>1 Value: result of dot product</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:get"><code>Array.Float:get</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an element from the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table): indices(XYZ) of the element to fetch default values are 1</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:max"><code>Array.Float:max</code></a></h3>
<dl>
<dt>Description</dt><dd>Find maximum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:mean"><code>Array.Float:mean</code></a></h3>
<dl>
<dt>Description</dt><dd>Find mean of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:min"><code>Array.Float:min</code></a></h3>
<dl>
<dt>Description</dt><dd>Find minimum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:nx"><code>Array.Float:nx</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the X dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the X dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:ny"><code>Array.Float:ny</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Y dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Y dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:nz"><code>Array.Float:nz</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Z dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Z dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:pairwiseMultiply"><code>Array.Float:pairwiseMultiply</code></a></h3>
<dl>
<dt>Description</dt><dd>Multiply each data in this array with the data in another storing in a destination array</dd>
<dt>Input</dt><dd>2 Arrays: The pairwise scaling array and the destination array</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:sameSize"><code>Array.Float:sameSize</code></a></h3>
<dl>
<dt>Description</dt><dd>Test if a given array has the same dimensions</dd>
<dt>Input</dt><dd>1 Array</dd>
<dt>Output</dt><dd>1 Boolean: True if sizes match</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:scale"><code>Array.Float:scale</code></a></h3>
<dl>
<dt>Description</dt><dd>Scale all values in the array by the given value</dd>
<dt>Input</dt><dd>1 Value: The scaling factor</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:set"><code>Array.Float:set</code></a></h3>
<dl>
<dt>Description</dt><dd>Set an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value or 1 Array: indices(XYZ) of the element to set, default values are 1. Last argument is the new value. If the last argument is an array then all elements in the array are copied to the calling object.</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:setAll"><code>Array.Float:setAll</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array to the given value</dd>
<dt>Input</dt><dd>1 Value: The new value for all element entries</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:sum"><code>Array.Float:sum</code></a></h3>
<dl>
<dt>Description</dt><dd>Find sum of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Float:zero"><code>Array.Float:zero</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array 0</dd>
</dl><hr>
<p>
<h2><a name="Array.FloatComplex">Array.FloatComplex</a></h2>
<p>
Class for 3D Data Arrays
<p><dl><dt>Array.FloatComplex.new() takes the following arguments</dt><dd>0 to 3 Integers: Length of each dimension X, Y and Z. Default values are 1.</dd></dl>
<hr>
<p>
<h3><a name="Array.FloatComplex:addAt"><code>Array.FloatComplex:addAt</code></a></h3>
<dl>
<dt>Description</dt><dd>Add a value to an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value: indices(XYZ) of the element to modify, default values are 1. Last argument is the value to add</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:dot"><code>Array.FloatComplex:dot</code></a></h3>
<dl>
<dt>Description</dt><dd>Compute the dot product of the current array and another of equal size and type</dd>
<dt>Input</dt><dd>1 Arrays: other array</dd>
<dt>Output</dt><dd>1 Value: result of dot product</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:get"><code>Array.FloatComplex:get</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an element from the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table): indices(XYZ) of the element to fetch default values are 1</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:max"><code>Array.FloatComplex:max</code></a></h3>
<dl>
<dt>Description</dt><dd>Find maximum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:mean"><code>Array.FloatComplex:mean</code></a></h3>
<dl>
<dt>Description</dt><dd>Find mean of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:min"><code>Array.FloatComplex:min</code></a></h3>
<dl>
<dt>Description</dt><dd>Find minimum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:nx"><code>Array.FloatComplex:nx</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the X dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the X dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:ny"><code>Array.FloatComplex:ny</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Y dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Y dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:nz"><code>Array.FloatComplex:nz</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Z dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Z dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:pairwiseMultiply"><code>Array.FloatComplex:pairwiseMultiply</code></a></h3>
<dl>
<dt>Description</dt><dd>Multiply each data in this array with the data in another storing in a destination array</dd>
<dt>Input</dt><dd>2 Arrays: The pairwise scaling array and the destination array</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:sameSize"><code>Array.FloatComplex:sameSize</code></a></h3>
<dl>
<dt>Description</dt><dd>Test if a given array has the same dimensions</dd>
<dt>Input</dt><dd>1 Array</dd>
<dt>Output</dt><dd>1 Boolean: True if sizes match</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:scale"><code>Array.FloatComplex:scale</code></a></h3>
<dl>
<dt>Description</dt><dd>Scale all values in the array by the given value</dd>
<dt>Input</dt><dd>1 Value: The scaling factor</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:set"><code>Array.FloatComplex:set</code></a></h3>
<dl>
<dt>Description</dt><dd>Set an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value or 1 Array: indices(XYZ) of the element to set, default values are 1. Last argument is the new value. If the last argument is an array then all elements in the array are copied to the calling object.</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:setAll"><code>Array.FloatComplex:setAll</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array to the given value</dd>
<dt>Input</dt><dd>1 Value: The new value for all element entries</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:sum"><code>Array.FloatComplex:sum</code></a></h3>
<dl>
<dt>Description</dt><dd>Find sum of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.FloatComplex:zero"><code>Array.FloatComplex:zero</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array 0</dd>
</dl><hr>
<p>
<h2><a name="Array.Integer">Array.Integer</a></h2>
<p>
Class for 3D Data Arrays
<p><dl><dt>Array.Integer.new() takes the following arguments</dt><dd>0 to 3 Integers: Length of each dimension X, Y and Z. Default values are 1.</dd></dl>
<hr>
<p>
<h3><a name="Array.Integer:addAt"><code>Array.Integer:addAt</code></a></h3>
<dl>
<dt>Description</dt><dd>Add a value to an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value: indices(XYZ) of the element to modify, default values are 1. Last argument is the value to add</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:dot"><code>Array.Integer:dot</code></a></h3>
<dl>
<dt>Description</dt><dd>Compute the dot product of the current array and another of equal size and type</dd>
<dt>Input</dt><dd>1 Arrays: other array</dd>
<dt>Output</dt><dd>1 Value: result of dot product</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:get"><code>Array.Integer:get</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an element from the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table): indices(XYZ) of the element to fetch default values are 1</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:max"><code>Array.Integer:max</code></a></h3>
<dl>
<dt>Description</dt><dd>Find maximum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:mean"><code>Array.Integer:mean</code></a></h3>
<dl>
<dt>Description</dt><dd>Find mean of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:min"><code>Array.Integer:min</code></a></h3>
<dl>
<dt>Description</dt><dd>Find minimum value and corresponding index</dd>
<dt>Output</dt><dd>1 value and 1 integer</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:nx"><code>Array.Integer:nx</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the X dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the X dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:ny"><code>Array.Integer:ny</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Y dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Y dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:nz"><code>Array.Integer:nz</code></a></h3>
<dl>
<dt>Description</dt><dd>Return the size of the Z dimension</dd>
<dt>Output</dt><dd>1 Integer: Size fo the Z dimension</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:pairwiseMultiply"><code>Array.Integer:pairwiseMultiply</code></a></h3>
<dl>
<dt>Description</dt><dd>Multiply each data in this array with the data in another storing in a destination array</dd>
<dt>Input</dt><dd>2 Arrays: The pairwise scaling array and the destination array</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:sameSize"><code>Array.Integer:sameSize</code></a></h3>
<dl>
<dt>Description</dt><dd>Test if a given array has the same dimensions</dd>
<dt>Input</dt><dd>1 Array</dd>
<dt>Output</dt><dd>1 Boolean: True if sizes match</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:scale"><code>Array.Integer:scale</code></a></h3>
<dl>
<dt>Description</dt><dd>Scale all values in the array by the given value</dd>
<dt>Input</dt><dd>1 Value: The scaling factor</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:set"><code>Array.Integer:set</code></a></h3>
<dl>
<dt>Description</dt><dd>Set an element of the array</dd>
<dt>Input</dt><dd>1, 2 or 3 integers (or 1 table), 1 value or 1 Array: indices(XYZ) of the element to set, default values are 1. Last argument is the new value. If the last argument is an array then all elements in the array are copied to the calling object.</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:setAll"><code>Array.Integer:setAll</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array to the given value</dd>
<dt>Input</dt><dd>1 Value: The new value for all element entries</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:sum"><code>Array.Integer:sum</code></a></h3>
<dl>
<dt>Description</dt><dd>Find sum of array</dd>
<dt>Output</dt><dd>1 value</dd>
</dl><hr>
<p>
<h3><a name="Array.Integer:zero"><code>Array.Integer:zero</code></a></h3>
<dl>
<dt>Description</dt><dd>Set all values in the array 0</dd>
</dl><hr>
<p>
<h2><a name="Dipole">Dipole</a></h2>
<p>
Calculates the dipolar field of a <a href="#SpinSystem">SpinSystem</a>
<p><dl><dt>Dipole.new() takes the following arguments</dt><dd>1 <a href="#3Vector">3Vector</a> or <a href="#SpinSystem">SpinSystem</a>: System Size</dd></dl>
<hr>
<p>
<h3><a name="Dipole:apply"><code>Dipole:apply</code></a></h3>
<dl>
<dt>Description</dt><dd>Apply the operator to the SpinSystem</dd>
<dt>Input</dt><dd>1 SpinSystem: System that will receive the resulting fields</dd>
</dl><hr>
<p>
<h3><a name="Dipole:getArray"><code>Dipole:getArray</code></a></h3>
<dl>
<dt>Description</dt><dd>Get a named interaction matrix as an array</dd>
<dt>Input</dt><dd>1 string: The string indicates which AB matrix to access. Can be XX, XY, XZ, YY, YZ or ZZ. </dd>
<dt>Output</dt><dd>1 Array: The interaction matrix for given AB components</dd>
</dl><hr>
<p>
<h3><a name="Dipole:getMatrix"><code>Dipole:getMatrix</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an element of an interaction matrix</dd>
<dt>Input</dt><dd>1 string, 1 <a href="#3Vector">3Vector</a>: The string indicates which AB matrix to access. Can be XX, XY, XZ, YY, YZ or ZZ. The <a href="#3Vector">3Vector</a> indexes into the matrix. Note: indexes are zero-based and are interpreted as offsets.</dd>
<dt>Output</dt><dd>1 number: The fetched value.</dd>
</dl><hr>
<p>
<h3><a name="Dipole:member"><code>Dipole:member</code></a></h3>
<dl>
<dt>Description</dt><dd>Test if the given site index is part of the operator</dd>
<dt>Input</dt><dd>1 <a href="#3Vector">3Vector</a> (Integers): Index of site to test</dd>
<dt>Output</dt><dd>1 Boolean: Result of test</dd>
</dl><hr>
<p>
<h3><a name="Dipole:nx"><code>Dipole:nx</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the x direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="Dipole:ny"><code>Dipole:ny</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the y direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="Dipole:nz"><code>Dipole:nz</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the size in the z direction that this operator was created with.</dd>
<dt>Output</dt><dd>1 Number: size</dd>
</dl><hr>
<p>
<h3><a name="Dipole:scale"><code>Dipole:scale</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the scale applied to field calculatons (default value is 1.0)</dd>
<dt>Output</dt><dd>1 Number: The scale</dd>
</dl><hr>
<p>
<h3><a name="Dipole:setArray"><code>Dipole:setArray</code></a></h3>
<dl>
<dt>Description</dt><dd>Set a named interaction matrix to a new array</dd>
<dt>Input</dt><dd>1 string, 1 Array: The string indicates which AB matrix to set. Can be XX, XY, XZ, YY, YZ or ZZ. The Array must be of appropriate dimensions</dd>
</dl><hr>
<p>
<h3><a name="Dipole:setMatrix"><code>Dipole:setMatrix</code></a></h3>
<dl>
<dt>Description</dt><dd>Set an element of an interaction matrix</dd>
<dt>Input</dt><dd>1 string, 1 <a href="#3Vector">3Vector</a>, 1 number: The string indicates which AB matrix to access. Can be XX, XY, XZ, YY, YZ or ZZ. The <a href="#3Vector">3Vector</a> indexes into the matrix. The number is the value that is set at the index. Note: indexes are zero-based and are interpreted as offsets.</dd>
</dl><hr>
<p>
<h3><a name="Dipole:setScale"><code>Dipole:setScale</code></a></h3>
<dl>
<dt>Description</dt><dd>Set a scale to field calculatons (default value is 1.0)</dd>
<dt>Input</dt><dd>1 Number: The value of the new scale</dd>
</dl><hr>
<p>
<h3><a name="Dipole:setStrength"><code>Dipole:setStrength</code></a></h3>
<dl>
<dt>Description</dt><dd>Set the strength of the Long Range Field</dd>
<dt>Input</dt><dd>1 number: strength of the field</dd>
</dl><hr>
<p>
<h3><a name="Dipole:setTruncation"><code>Dipole:setTruncation</code></a></h3>
<dl>
<dt>Description</dt><dd>Set the truncation distance in spins of the dipolar sum.</dd>
<dt>Input</dt><dd>1 Integer or Table of 3 Integers or 3 Integers: Radius of spins to sum out to. If set to math.huge then extrapolation will be used to approximate infinite radius. If input is more than 1 value then the input is considered as the hard truncation limit for each Cartesian coordinate.</dd>
</dl><hr>
<p>
<h3><a name="Dipole:setUnitCell"><code>Dipole:setUnitCell</code></a></h3>
<dl>
<dt>Description</dt><dd>Set the unit cell of a lattice site</dd>
<dt>Input</dt><dd>3 <a href="#3Vector">3Vector</a>: The A, B and C vectors defining the unit cell. By default, this is {1,0,0},{0,1,0},{0,0,1} or a cubic system.</dd>
</dl><hr>
<p>
<h3><a name="Dipole:strength"><code>Dipole:strength</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the strength of the Long Range Field</dd>
<dt>Output</dt><dd>1 number: strength of the field</dd>
</dl><hr>
<p>
<h3><a name="Dipole:truncation"><code>Dipole:truncation</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the truncation distance in spins of the dipolar sum.</dd>
<dt>Output</dt><dd>4 Integers: Radius of spins to sum out to, hard Limit in X, Y and Z direction.</dd>
</dl><hr>
<p>
<h3><a name="Dipole:unitCell"><code>Dipole:unitCell</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the unit cell of a lattice site</dd>
<dt>Output</dt><dd>3 tables: The A, B and C vectors defining the unit cell. By default, this is {1,0,0},{0,1,0},{0,0,1} or a cubic system.</dd>
</dl><hr>
<p>
<h2><a name="DipoleEwald3D">DipoleEwald3D</a></h2>
<p>
Object used to calculate individual elements of the dipolar interaction tensors
<p><dl><dt>DipoleEwald3D.new() takes the following arguments</dt><dd><a href="#3Vector">3Vector</a> or <a href="#SpinSystem">SpinSystem</a>: Optional lattice size</dd></dl>
<hr>
<p>
<h3><a name="DipoleEwald3D:NSites"><code>DipoleEwald3D:NSites</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the number of terms to use in the series along 1 direction in the 3D sum</dd>
<dt>Output</dt><dd>1 Number: The number of terms (initially 10)</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:calculateTensorElement"><code>DipoleEwald3D:calculateTensorElement</code></a></h3>
<dl>
<dt>Description</dt><dd>Calculate the tensor element.</dd>
<dt>Input</dt><dd>1 String, 1 <a href="#3Vector">3Vector</a>: String is AB pair (`XX', `XY', ..., `ZZ') the <a href="#3Vector">3Vector</a> represents offsets from zero. It takes 3 integer values each ranging from 0 to n-1 where n is the number of unit cells in the lattice in a given direction.</dd>
<dt>Output</dt><dd>1 Number: The tensor element at the requested position.</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:calculateTensorElementRealR"><code>DipoleEwald3D:calculateTensorElementRealR</code></a></h3>
<dl>
<dt>Description</dt><dd>Calculate the tensor element.</dd>
<dt>Input</dt><dd>1 String, 1 <a href="#3Vector">3Vector</a>: String is AB pair (`XX', `XY', ..., `ZZ') the <a href="#3Vector">3Vector</a> represents offsets from zero. It takes 3 real values representing a positon somewhere in the lattice. This 3D point is not transformed by the basis vectors.</dd>
<dt>Output</dt><dd>1 Number: The tensor element at the requested position.</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:eta"><code>DipoleEwald3D:eta</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the crossover eta value determined from search.</dd>
<dt>Output</dt><dd>1 Number: The crossover value eta</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:latticeSize"><code>DipoleEwald3D:latticeSize</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the number of unit cells in each crystallographic direction.</dd>
<dt>Output</dt><dd>3 Numbers: The number of unit cells in each crystallographic direction.</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:setLatticeSize"><code>DipoleEwald3D:setLatticeSize</code></a></h3>
<dl>
<dt>Description</dt><dd>Set the number of unit cells in each crystallographic direction.</dd>
<dt>Input</dt><dd>1 <a href="#3Vector">3Vector</a> or 1 <a href="#SpinSystem">SpinSystem</a>: The number of unit cells in each crystallographic direction.</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:setNSites"><code>DipoleEwald3D:setNSites</code></a></h3>
<dl>
<dt>Description</dt><dd>Set the number of terms to use in the series along 1 direction in the 3D sum</dd>
<dt>Input</dt><dd>1 Number: The number of terms (initially 10)</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:setTau"><code>DipoleEwald3D:setTau</code></a></h3>
<dl>
<dt>Description</dt><dd>Set the tolerance (tau) used in the search for a good eta value</dd>
<dt>Input</dt><dd>1 Number: The new tolerance value (initially 0.001)</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:setUnitCell"><code>DipoleEwald3D:setUnitCell</code></a></h3>
<dl>
<dt>Description</dt><dd>Set the unit cell for the tensor calculations</dd>
<dt>Input</dt><dd>3 <a href="#3Vector">3Vector</a>s: The a, b and c vectors making up the basis vectors for the unit cell,</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:tau"><code>DipoleEwald3D:tau</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the tolerance (tau) used in the search for a good eta value</dd>
<dt>Output</dt><dd>1 Number: The new tolerance value (initially 0.001)</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:unitCell"><code>DipoleEwald3D:unitCell</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the unit cell for the tensor calculations</dd>
<dt>Output</dt><dd>3 Tables: The a, b and c vectors making up the basis vectors for the unit cell,</dd>
</dl><hr>
<p>
<h3><a name="DipoleEwald3D:volume"><code>DipoleEwald3D:volume</code></a></h3>
<dl>
<dt>Description</dt><dd>Get the volume of the unit cell.</dd>
<dt>Output</dt><dd>1 Number: The volume.</dd>
</dl><hr>
<p>
<h2><a name="DisorderedDipole">DisorderedDipole</a></h2>
<p>
Calculates the dipolar field of a <a href="#SpinSystem">SpinSystem</a>
<p><dl><dt>DisorderedDipole.new() takes the following arguments</dt><dd></dd></dl>
<hr>
<p>
<h3><a name="DisorderedDipole:apply"><code>DisorderedDipole:apply</code></a></h3>
<dl>
<dt>Description</dt><dd>Apply the operator to the SpinSystem</dd>
<dt>Input</dt><dd>1 SpinSystem: System that will receive the resulting fields</dd>
</dl><hr>
<p>
<h3><a name="DisorderedDipole:arrayX"><code>DisorderedDipole:arrayX</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an array representing the X components site positions. This array is connected to the Operator so changes to the returned array will change operator.</dd>
<dt>Output</dt><dd>1 Array: The X components of the positions.</dd>
</dl><hr>
<p>
<h3><a name="DisorderedDipole:arrayY"><code>DisorderedDipole:arrayY</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an array representing the Y components site positions. This array is connected to the Operator so changes to the returned array will change operator.</dd>
<dt>Output</dt><dd>1 Array: The Y components of the positions.</dd>
</dl><hr>
<p>
<h3><a name="DisorderedDipole:arrayZ"><code>DisorderedDipole:arrayZ</code></a></h3>
<dl>
<dt>Description</dt><dd>Get an array representing the Z components site positions. This array is connected to the Operator so changes to the returned array will change operator.</dd>
<dt>Output</dt><dd>1 Array: The Z components of the positions.</dd>
</dl><hr>
<p>