Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
documentation:language_reference:objects:responsefunction:functions:invertenergy [2024/09/16 12:06] – created Maurits W. Haverkortdocumentation:language_reference:objects:responsefunction:functions:invertenergy [2024/12/22 20:29] (current) Maurits W. Haverkort
Line 3: Line 3:
  
 ### ###
-alligned paragraph text+InvertEnergy(G) takes response function $G(\omega)$ as an argument and returns $-G(-\omega)^*$. As we only store the poles and their residues we can do this by negating the energy of the poles without the need to change the size of the residue
 ### ###
  
Line 9: Line 9:
  
 ### ###
-description text+This example initializes a response function in the "list of poles" representation and inverts its energy.
 ### ###
  
 ==== Input ==== ==== Input ====
 <code Quanty Example.Quanty> <code Quanty Example.Quanty>
--- some example code+NEDOS   = 10 
 +HalfBW = 1 
 +dE =HalfBW/NEDOS 
 + 
 +a = {0} 
 +b = {} 
 + 
 +for i=1,NEDOS do 
 +  a[#a+1] = (i-0.5) * dE -- energy axis from 0 to 1 
 +  b[#b+1] = 0.5 / NEDOS -- flat density of states 
 +end 
 + 
 +G0 = ResponseFunction.New( {a,b,mu=0,type="ListOfPoles", name="G0"} ) 
 +G0_inv = ResponseFunction.InvertEnergy(G0) 
 + 
 +print(G0) 
 +print(G0_inv) 
 </code> </code>
  
 ==== Result ==== ==== Result ====
 <file Quanty_Output> <file Quanty_Output>
-text produced as output+{ { 0 , 0.05 , 0.15 , 0.25 , 0.35 , 0.45 , 0.55 , 0.65 , 0.75 , 0.85 , 0.95 } ,  
 +  { 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 } , 
 +  mu = 0 , 
 +  name = G0 , 
 +  type = ListOfPoles } 
 +{ { 0 , -0.05 , -0.15 , -0.25 , -0.35 , -0.45 , -0.55 , -0.65 , -0.75 , -0.85 , -0.95 } ,  
 +  { 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 , 0.05 } , 
 +  mu = 0 , 
 +  name = G0 , 
 +  type = ListOfPoles }
 </file> </file>
  
 ===== Table of contents ===== ===== Table of contents =====
-{{indexmenu>.#1|msort}}+{{indexmenu>../#2|tsort}}
  
Print/export