mailr24198 - /branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on June 20, 2014 - 11:39:
Author: tlinnet
Date: Fri Jun 20 11:39:04 2014
New Revision: 24198

URL: http://svn.gna.org/viewcvs/relax?rev=24198&view=rev
Log:
Forcing the dtype to be complex64, instead of complex128.

This solves a range of systemtests.
The one who fails now is:

-test_korzhnev_2005_15n_zq_data
-test_korzhnev_2005_1h_mq_data
-test_korzhnev_2005_1h_sq_data

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
models for Clustered analysis.

Modified:
    branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py

Modified: branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py?rev=24198&r1=24197&r2=24198&view=diff
==============================================================================
--- branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py     (original)
+++ branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py     Fri Jun 20 
11:39:04 2014
@@ -118,19 +118,19 @@
 
     m_r20a = array([
         [-1.0, 0.0],
-        [0.0, 0.0],], complex64)
+        [0.0, 0.0],], float64)
 
     m_r20b = array([
         [0.0, 0.0],
-        [0.0, -1.0],], complex64)
+        [0.0, -1.0],], float64)
 
     m_k_AB = array([
         [-1.0, 0.0],
-        [1.0, 0.0],], complex64)
+        [1.0, 0.0],], float64)
 
     m_k_BA = array([
         [0.0, 1.0],
-        [0.0, -1.0],], complex64)
+        [0.0, -1.0],], float64)
 
     m_dw = array([
         [0.0, 0.0],
@@ -219,9 +219,9 @@
 
     # The M1 and M2 matrices.
     # Equivalent to D+.
-    M1_mat = matrix_exponential_rankN(m1_mat)
+    M1_mat = matrix_exponential_rankN(m1_mat).astype(complex64)
     # Equivalent to Z-.
-    M2_mat = matrix_exponential_rankN(m2_mat)
+    M2_mat = matrix_exponential_rankN(m2_mat).astype(complex64)
 
     # The complex conjugates M1* and M2*
     # Equivalent to D+*.
@@ -390,8 +390,8 @@
     m2_mat = populate_matrix_rankN(R20A=R20A, R20B=R20B, dw=-dw, k_AB=k_AB, 
k_BA=k_BA, tcp=tcp)
 
     # The A+/- matrices.
-    A_pos_mat = matrix_exponential_rankN(m1_mat)
-    A_neg_mat = matrix_exponential_rankN(m2_mat)
+    A_pos_mat = matrix_exponential_rankN(m1_mat).astype(complex64)
+    A_neg_mat = matrix_exponential_rankN(m2_mat).astype(complex64)
 
     # Loop over spins.
     for si in range(NS):
@@ -408,6 +408,11 @@
                     A_pos_i = A_pos_mat[si, mi, oi, i]
                     A_neg_i = A_neg_mat[si, mi, oi, i]
 
+                    #m1_mat_i = m1_mat[si, mi, oi, i]
+                    #m2_mat_i = m2_mat[si, mi, oi, i]
+                    #A_pos_i = matrix_exponential(m1_mat_i)
+                    #A_neg_i = matrix_exponential(m2_mat_i)
+
                     # The evolution for one n.
                     evol_block = dot(A_pos_i, dot(A_neg_i, dot(A_neg_i, 
A_pos_i)))
 




Related Messages


Powered by MHonArc, Updated Fri Jun 20 12:20:03 2014