src/BWRRelax/relaxNMR.cc
// ---------------- Level 0 via Element Calculation ---------------------
//			  (Extreme Narrowing)
Level 0 via Element Calculation
(Extreme Narrowing)
Level 0 via Element Calculation ( Extreme Narrowing )
void R_0(super_op& LOp, int rank, gen_op* T1s, gen_op* T2s, const complex& J12)
					       LOp    = LOp   + R0
					          out	   in     12
	 Note				T1s, T2s, and LOp assumed in proper bases
                  <a,a'| LOp |b,b'> += <a,a'| R0   |b,b'>
		                                  1,2
 where a, a', b, b' are basis function indices.  This assumes extreme narrowing.
   {
   int hs = T1s[0].dim();			 Get Hilbert space size
   int aaa=0, bbb=0;
   complex Rel;
   for(int a=0; a<hs; a++)			 Sum over transition a-aa
     for(int aa=0; aa<hs; aa++)
       {
       bbb = 0;
       for(int b=0; b<hs; b++)			 Sum over transition b-bb
         for(int bb=0; bb<hs; bb++)
           {
           Rel = LOp.get(aaa,bbb);
           Rel += J12*R_0(hs, T1s, T2s,
	                   rank, a, b, aa, bb);
           LOp.put(aaa, bbb, Rel);		 Add to the relaxation matrix element
           bbb++;
           }
       aaa++;
       }
   return;
   }
void R_0 ( super_op & LOp , int rank , gen_op * T1s , gen_op * T2s , const complex & J12 ) { int hs = T1s [ 0 ] . dim ( ) ; int aaa = 0 , bbb = 0 ; complex Rel ; for ( int a = 0 ; a < hs ; a ++ ) for ( int aa = 0 ; aa < hs ; aa ++ ) { bbb = 0 ; for ( int b = 0 ; b < hs ; b ++ ) for ( int bb = 0 ; bb < hs ; bb ++ ) { Rel = LOp . get ( aaa , bbb ) ; Rel += J12 * R_0 ( hs , T1s , T2s , rank , a , b , aa , bb ) ; LOp . put ( aaa , bbb , Rel ) ; bbb ++ ; } aaa ++ ; } return ; }
Level 0 via Element Calculation
(Extreme Narrowing)
Level 0 via Element Calculation ( Extreme Narrowing )
// Input		LOp   : Current relaxation superoperator //			rank  : Rank of the two interactions // 			T1s   : Spin tensor components, 1st interaction // 			T2s   : Spin tensor components, 2nd interaction //			J12   : Reduced spectral density at 0 Hz  //				(extreme narrowing) for 2 interactions //				times the two interaction constants // Return		void  : Level 0 relaxation superop for interactions //			        1 & 2 added to input superoperator LOp // //				       LOp    = LOp   + R0 //				          out	   in     12 // // Note				T1s, T2s, and LOp assumed in proper bases //                  <a,a'| LOp |b,b'> += <a,a'| R0   |b,b'> //		                                  1,2 // where a, a', b, b' are basis function indices.  This assumes extreme narrowing. // Get Hilbert space size // Sum over transition a-aa // Sum over transition b-bb // Add to the relaxation matrix element