DataTypeComparison » History » Version 1
Anil Prabhakar, 07/22/2013 11:55 AM
1 | 1 | Anil Prabhakar | h1. DataTypeComparison |
---|---|---|---|
2 | 1 | Anil Prabhakar | |
3 | 1 | Anil Prabhakar | h2. *+Comparison of the results of simulating OOMMF problem with 'double' and 'float' for different control point specifications+* |
4 | 1 | Anil Prabhakar | |
5 | 1 | Anil Prabhakar | *THE PROBLEM*: |
6 | 1 | Anil Prabhakar | |
7 | 1 | Anil Prabhakar | The problem that was taken into contention for simulating had the following specifications: |
8 | 1 | Anil Prabhakar | |
9 | 1 | Anil Prabhakar | 1) The geometry considered was the following: |
10 | 1 | Anil Prabhakar | |
11 | 1 | Anil Prabhakar | !geometry.png! |
12 | 1 | Anil Prabhakar | |
13 | 1 | Anil Prabhakar | 2) Initial Magnetization: initmag2.ovf |
14 | 1 | Anil Prabhakar | |
15 | 1 | Anil Prabhakar | The problem which was simulated for obtaining the initial magnetization for this problem, had the following specifications: |
16 | 1 | Anil Prabhakar | |
17 | 1 | Anil Prabhakar | Starting orienation: Q=89°, F=90° |
18 | 1 | Anil Prabhakar | Applied field: Bx=100 mT to 0 mT in steps of 25 mT,200 iterations at each step |
19 | 1 | Anil Prabhakar | Relaxation magnetization at Bx=0 mT, with max torque=10-4 |
20 | 1 | Anil Prabhakar | Precision: long double (default setting in 'app/mmsolve/fft.h' |
21 | 1 | Anil Prabhakar | No time control point specification was given. |
22 | 1 | Anil Prabhakar | The OMF file was converted to an OVF file using 'tclsh oommf.tcl avf2ovf <initmag2.omf >initmag2.ovf' |
23 | 1 | Anil Prabhakar | |
24 | 1 | Anil Prabhakar | (3) Field Range: 0.0 0.0 0.0 0.0 0.0 0.0 1 -torque 1e-5 -time 1e-7 |
25 | 1 | Anil Prabhakar | |
26 | 1 | Anil Prabhakar | This implies that 0 field was applied and the simulation was ended when either the torque at a step was less than 1E-5 or when the elapsed field time for the current field step reaches 1E-7 seconds. |
27 | 1 | Anil Prabhakar | |
28 | 1 | Anil Prabhakar | These specification were changed for the different simulations |
29 | 1 | Anil Prabhakar | |
30 | 1 | Anil Prabhakar | *Calculation of Metric* |
31 | 1 | Anil Prabhakar | |
32 | 1 | Anil Prabhakar | The comparison of 2 simulations are done on the basis of their OVF files corresponding to a particular step. The OVF file has the magnetization vector values at all the points considered in the geometry of the sample. |
33 | 1 | Anil Prabhakar | |
34 | 1 | Anil Prabhakar | The format of the OVF file can be understood from the following sample OVF file: |
35 | 1 | Anil Prabhakar | |
36 | 1 | Anil Prabhakar | attachment:sampleOVF.txt |
37 | 1 | Anil Prabhakar | |
38 | 1 | Anil Prabhakar | The metric which we have considered is the Euclidean Norm which is calculated in the following way: |
39 | 1 | Anil Prabhakar | |
40 | 1 | Anil Prabhakar | Let one of the vectors be given by *X*=[x ~1~, x ~2~,...x ~M~] |
41 | 1 | Anil Prabhakar | |
42 | 1 | Anil Prabhakar | Let the other vector be given by *Y*=[y ~1~, y ~2~,...y ~M~] |
43 | 1 | Anil Prabhakar | |
44 | 1 | Anil Prabhakar | The Euclidean Norm is given by: [(x ~1~-y ~1~) ^2^+(x ~2~-y ~2~) ^2^+...(X ~M~-y ~M~) ^2^] ^1/2^ |
45 | 1 | Anil Prabhakar | |
46 | 1 | Anil Prabhakar | *COMPARISON*: |
47 | 1 | Anil Prabhakar | |
48 | 1 | Anil Prabhakar | |_.No. |_.Data Type |_. *M* ~i~ (x,y) |_. *m* x *h* |_ Iterations |_. max( *m* ~i~ - *m* ~0~ )|_.Time spent simulating |_. Figure |_. Comments | |
49 | 1 | Anil Prabhakar | | 1 | Double | *M* ~0~ | 1e-4 | | | | Reference| initmag2.ovf| |
50 | 1 | Anil Prabhakar | | 2 | Double | *M* ~1~ | | 10000| 1.62e-2 | 398.05 seconds | Figure 1 | The largest error is seen approximately at the coordinates (0.0, 1.0) and (1.0, 1.0), where, from the field plot we can see that,a discontinuity arises.| |
51 | 1 | Anil Prabhakar | | 3 | Float | *M* ~2~ | | 10000| 4..5e-3 | 372.54 seconds | Figure 2 | | |
52 | 1 | Anil Prabhakar | |
53 | 1 | Anil Prabhakar | |
54 | 1 | Anil Prabhakar | !double.png! |
55 | 1 | Anil Prabhakar | |
56 | 1 | Anil Prabhakar | Figure 1: Magnetization and Euclidian Norm after simulating with double |
57 | 1 | Anil Prabhakar | with different time control points |
58 | 1 | Anil Prabhakar | |
59 | 1 | Anil Prabhakar | !float.png! |
60 | 1 | Anil Prabhakar | |
61 | 1 | Anil Prabhakar | Figure 2: Magnetization and Euclidean norm after simulating with double and float |
62 | 1 | Anil Prabhakar | with same control specifications. |